Skip to main content Do You utilize CPU Pinning? : r/unRAID
r/unRAID icon
Go to unRAID

Do You utilize CPU Pinning?

I've had a few times where my cpu locked up due to processes like kswapd0 or shfs taking over the whole cpu, so I pinned all of my containers to cpus, just so nothing could take over everything again.

Now that I run 2 vms and about 70 containers, with 50 being up at all times, managing cpu pinning has turned into a pain.

Do you find it worth it for all apps, or do you only pin specific apps that may end up being pretty non-nice with CPU processes? I think I need to rethink how I approach utilizing it.

Of course, the alternative is to not run so many things, but wheres the fun in that.

Discover how fashion brand co-founder Bryan Bonilla uses Acrobat AI Assistant to simplify marketing reports and boost productivity, leaving him more time to be creative and pursue collaborations with more artists. Explore all you can do with an AI Assistant today.
Thumbnail image: Discover how fashion brand co-founder Bryan Bonilla uses Acrobat AI Assistant to simplify marketing reports and boost productivity, leaving him more time to be creative and pursue collaborations with more artists. Explore all you can do with an AI Assistant today.
Sort by:
Best
Open comment sort options

kswapd? Did you enable swap space? Swap can be a huge bottleneck, with lots of contention from pages being moved in both directions (to and from disk).

Disabling that and either running less processes or getting more memory would help.

SwapSpace? I don't recall anything by that name being enabled.

I am consistently running at 87% RAM utilization, but Im hoping it will hold out until Black Friday sales start.

More replies
More replies

I use pinning as fake isolation. Nothing uses core 0 except unRAID, Plex pinned on 1&2, everything else "pinned" on the remainder.

More replies

It depends.
If I know there's a chance for high cpu usage then I'll pin the container else I just leave it unpinned.
Like fe game servers, media server (emby) and media converter (tdarr) I'll pin since I expect high cpu usage or in the case of game servers I expect errors that just start slamming the cpu.

If you really want to pin every container I'd suggest to pin the low usage containers to all but the 1st one or two cores, since that's what unraid prefers to use itself. And then have the thread handler handle what core inside the pinned ones to use.

i dont pin anything as nothing except my VM will ever be able to utilize all cores anyways.

im also only running what i really need so thats like 15 containers running at all times and 5 that i fire up when i need them.

I had to use it on one container with rtorrent. It didn't like to see 64 cores and had some strange freezes until I pinned a few.

More replies

Yes.

I haven't messed around with it yet, but I'm only running Docker containers right now. I don't think my server is consistently loaded up enough to bother.

I tried pinning out different Dockers in the past but I didn't really see a performance impact (positive or negative). As long as Plex can use all cores, I'm happy lol.

I pin backup utilities so they do not take over the system when indexing large data sets.

I used to mess around a lot more with it, like making sure a few cores were only ever used by PLEX, but it really became more of a pain managing it than it was worth.

Only VMs and one slightly misbehaving docker container that I require but tends to shit itself occasionally and bog the whole system down if I let it have every core.

I've had my old build locked up by kswapd as well, even with CPU pinning set. I believe it was one of the docker containers I ran that used swap to not eat up RAM but ended up crashing my system. It went away with the 6.9 beta but that might just have been a container update as I don't keep track of them.

Not for everything, but for a couple of containers where they have the potential to affect user experience. Eg, Sabnzb is pretty cpu intensive when repairing, to the point it can affect other workloads, but it’s also not time sensitive, so I pin it to a handful or cores

I'm up to 24 threads on my server, but I always leave one core (usually 0) unpinned to allow unraid control, I had issues back when I was running a quad core with everything freezing. Now I ballpark memory and cpu requirements per docker when I set them up, realistically I probably don't have to, but habits from older and slower hardware hang around.

I pin vms. Everything else I just let run, but I DO have 32 threads to play with so it’s rarely an issue.