FPS and Processor affinity - Discussion

FPS and Processor affinity - Discussion

Postby Kannkor » 19 Oct 2020, 15:20

This started in discord...
User TheOtherTank sent me some details about FPS and processor affinity. Thought I'd share some preliminary tests so other people could do some as well to see what they find.
I basically took what he did so I could replicate it and do some additional testing to what he did.
My initial testing, says that EQ2 has some sort of multi-core ability. Not fully, but something is getting offloaded enough to make a difference.
Here's what you can do, to test things.
Some knowledge to have...
In windows, cores are listed from 0 to n-1. If your processor supports hyperthreading, those alternate.
Lets take my CPU: 8086k. It has 6 cores with 6 hyperthreads. That means I have a total of 12 logical processors.
In windows it's called --> then in Innerspace it's called:
CPU0-Thread1 --> CPU 1
CPU0-Thread2 --> CPU 2
CPU1-Thread1 --> CPU 3
CPU1-Thread2 --> CPU 4
For optimal advice, we have always said, you want 1 eq2 session per physical core if you could. In my case, that means I would want to use (innerspace) CPU, 1, 3, 5, 7, 9 and 11. And where possible, we want to avoid CPU 1, because the OS always has shit on there. But in this case, we have limited options because it's a 6 core. Anyways, not really the point.
It doesn't matter if you're using ogre proc or not, because we're going to be doing commands that change things to test.
Load a character into the game. I did it with Ogre paused, so things wouldn't really be changing.
To see what CPUs your session is assigned too, type: `proc -list`
To set the session to a single CPU, we use: `proc # only`, for example: `proc 3 only`.
You can type `proc -list` again to see.
For me, it has processor 3 running at 100% usage (use taskmanager performance right click -Logical performance) to see.
My FPS in game is around 37 FPS and is stable.
Lets turn on another core. We do this via `proc # on`
So we end up with `proc 4 on`
We can use `proc -list` again to see both of them are on.
Look at taskmanager again, now we have two cores running around 75% load, and our FPS has increased to 49 FPS. This means we are no longer bottlenecked on our CPU. This definitely implies to me, that EQ2 is able to some what utilize more than 1 thread. It's basically sharing the load equally on both threads.
You can add additional cores if you wish, but since we are no longer maxing out the CPU, it will have no affect.
`proc 5 on 6 on`
Turns on proc 5 and 6 also. You can do `proc -list` again to confirm, then look at task manager. It's now sharing the load between processors 3, 4, 5, and 6. Not evenly, sort of around 60%, 30%, 60%, 30%

A little preliminary, but it sounds like we need to look at our CPU strategy and do some further testing... but it shows we can see gains by having 2 threads assigned to each session.

At the time of writing this, `ogre proc` (that can manage processor affinity) does NOT support more than 1 core. Upon further testing (and time), I will rewrite ogre proc to support multiple, which should allow us better FPS.
Anyone testing with any findings, feel free to share your results. I would include your CPU make/model as well.
Kannkor
 
Posts: 337
Joined: 06 Nov 2013, 11:49

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest