from time to time, i get asked about how to get OpenSim or a viewer to use all available CPU cores
if you look at your Task Manager when you’re running your local OpenSim or your viewer, you might wonder what the dealio is when you see that some CPU cores are just lazing around. in the first screenshot below, you can see that 4 cores are showing no usage at all (this is my fancy work machine with an i7 processor)
BUT WAIT! each of those little graph boxes is actually for a thread and not a core! o_O
ahh, so actually, this box has 4 cores that can each run two threads (hyperthreading – not a sewing term) =)
so . . . for someone like me (not as techy as i may appear), i look at that performance thing and think that some of my cores (actually threads) are just sitting around
there’s a lot of misinformation on the web (no! really?) and how apps use CPU is a topic subject to all kinds of misinformation *just call me Miss Info*
i hope that what i’m saying here is mostly correct and not wrong =)
- so is some of your CPU actually not doing anything?
- could your viewer or local OpenSim be running twice as well and twice as fast?
- if so, is there any magic setting you can change to make it run better?
it turns out that your computer isn’t being lazy and you’re not missing out on better performance
i hate learning about something that could have been running better had i only known about x, y, or zed. that makes me feel dumb (i’m glad once i learn it, but i hate that i could’ve been having a better experience if i had only known better)
it turns out that you can manually set programs to have access to all of your threads BUT typically, they already have that set by default (i think this may be different for XP, but that is so 2001) =p
so if that’s the default, why aren’t they being used?
good question and it’s an easy answer – the number of threads that a program uses is evidently part of how that program is coded! so you don’t have any control over that (well, some of you do because you are the ones writing the OpenSim and viewer code!) =)
a lot of programs simply are not written to use all available threads
for regular people like me, there’s no need to go set “processor affinity” and i don’t think those hold after rebooting anyway
as you can see in the bottom screenshot, MoWeS and OpenSim are both set, by default, to have access to all threads – but that doesn’t mean they can use them all – that’s determined by the app and not your machine in most cases
so why can the number of threads be selected?
another good question and i think one reason is that it lets you see how an app runs on a less powerful machine. if that’s the case, then only developers would have an interest in that
so it turns out that your PC is designed to run things like OpenSim and a viewer pretty much as well as possible. that makes sense since the better a machine can run stuff, the more popular that machine will be! =)