CPU Affinity -- Clientcore changes to INI

Discussion in 'The Veterans' Lounge' started by bobokatt, Sep 1, 2022.

  1. bobokatt Elder

    Can anyone explain this to me?
    The changes that were done a WHILE ago, as to how EQ uses or utililizes multi-core/threads?

    Back in the day I had in my Eqclient.ini that looks like this:
    I have no IDEA if that was even right???? But everything ran GLORIOUS.

    Then they changed it. CPUAffinity was no more and then they added something that looks like this:

    What DO I place in all my eqclients for my 2 accounts???
    I have one account that ALONE runs great. I have the other than in 20 minutues starts lagging so bad that I cannot even open up my bags.

    If I placed this in the wrong section, please move it accordingly.
  2. Jumbur Improved Familiar

  3. Fanra https://everquest.fanra.info

    klanderso, bobokatt and Jumbur like this.
  4. Fanra https://everquest.fanra.info

    While that link does explain how to set a core for an instance (client) of EQ, I get the feeling it is best to just leave it alone and Windows will give all your instances whatever cores are least in use.

    While Windows is not perfect, it is at this point designed to use many cores and spread loads between them.

    If someone running multiple instances (clients) has found that setting a core for each instance (or each after the first) actually does something worth setting it, they can correct me.
    klanderso, Stymie and Zunnoab like this.
  5. Soulbanshee Augur

    It was probably more an issue with older chipsets or kernels/OS, but having certain single threaded processes moved between cores used to cause program instability or performance issues. Pretty sure thats why the CPUaffinity was first added. I don't think its so much a problem on modern systems anymore as process scheduling has become better and core speeds have increased (and/or something to do with core counts increasing).

    Nowadays I think it would be better to set to -1 to let Windows pick the best core to shift the process to so that any 1 core doesn't get overloaded.

    If someone were to set ClientCoreX (where X is the instance of each client running), use only all odd number or all even numbers, to spread across each physical core or else you are running 2 clients on 1 physical core with multithreading. Starting at 0, 0/1 is first core, 2/3 is the second core, etc.
    klanderso, bobokatt and Fanra like this.
  6. Soulbanshee Augur

    Are your options set the same among all the instances? Are you limiting in game FPS lower than 60? How many cores and threads does your CPU have? Laptop? Or something like a lower end desktop processor like Celeron or i3? Thats not typical and I wouldnt expect that to be CPU scheduling but more of an issue with in game settings or a low performing CPU. Or if you set the ClientCore settings to all the same number (higher than -1) so all the instances load up on the same core.

    EQ is still not multithreaded, its a single threaded process, but it should be fine having that process handled by Windows.
    Fanra likes this.
  7. Fanra https://everquest.fanra.info

    Also, do you have two folders of EverQuest or are you running both accounts off the same folder?

    The fact that it runs fine at first and then slowly gets worse tends to suggest a memory leak somewhere. In any case, open your Task Manager (Control-Alt-Delete) and look at the Processes information. What percent is your CPU, Memory, and GPU? Of the two eqgame.exe processes running, how much does each use?

    I did notice that if I ran two, one eqgame.exe was taking up like 70% GPU while the other was using like 29%. However, they both were working fine sitting in the Guild Hall. I have not testing anything and they do have different in-game video settings and resolutions.
  8. Iven Antonius Bayle

    Basically they all should had been automatically updated correctly.
    The adressed EQ client (eqgame.exe) is the value left from the equal sign -> ClientCore0=-1.
    The adressed CPU core/thread is the value right from the equal sign -> ClientCore0=-1.

    The adressing of the game clients and CPU cores/threads does start with zero (0) !
    As example a quad core CPU with 4 (single) threads has an adress range of 0-3:
    Core 1 = 0
    Core 2 = 1
    Core 3 = 2
    Core 4 = 3

    Here a few examples for multiple clients with a short explanation:

    1-6 clients <Standard setup>:
    All clients have access to all cpu cores and threads. The first two core threads do get used at most.
    Good setup for modern desktop CPUs.

    1-6 clients <Setup for 2 clients aka dual boxing on a dual core CPU with 2 (single) threads>:
    The first client does use the first CPU core (aka 0).
    The second client does use the second CPU core (aka 1).
    Could be a good setup for older dual core CPUs.

    1-6 clients <Setup for 3 clients aka triple boxing on a quad core CPU with 8 (dual) threads>:
    The first CPU core with both threads (aka 0 and 1) is reserved for other processes outside of EQ.
    The first client does use the second CPU core on thread 1 (aka 2).
    The second client does use the second CPU core on thread 2 (aka 3).
    The third client does use the third CPU core on thread 1 (aka 4).
    Could be a good setup for older quad core CPUs.
    bobokatt likes this.
  9. bobokatt Elder

    Thank you so much guys. Yah first of all I noted that my actual advanced settings were tottally different for the toon that lags so set them both to the same. Going to test that. I will just set ClientCore0=-1 and let windows figure it out. It's an older I7 with 4 cores 8 threads. 32GB ram and both accounts have their separate folder on a SSD drive. Everything used to run perfect so I have no idea what changed. Sigh. But I will test out more.

    Fanra if I look at my tast manager I see about 3% usage for each instance of EQ. If I look at the wierd graph that shows my 8 threads they are all roughly equally spiking so guess all 8 "threads" get bumped around.32 gb of ram. What a waste.... like pretty much none of that is being used by EQ.
    klanderso likes this.
  10. Soulbanshee Augur

    The ClientCoreX is each client you run, not the number of cores your CPU has.
    ClientCore0 would set the core to use for the first EQ client.
    ClientCore1 would set the core to use for the second EQ client.
    Metanis and MasterMagnus like this.
  11. Iven Antonius Bayle

    CPUAffinity got just renamed into ClientCore for whatever reason. If your theory would be right it would had been renamed into Client1Core0 (Client#Core#) and not into ClientCore0. It is Core# and not Client#. Without an adress (number) the client could not be linked to a cpu core.
  12. Soulbanshee Augur

    It was only a rename, it works exactly the same as CPUAffinity (which wouldnt make sense either according to your explanation). And if what you posit were true then all those entries would already be in your ini, but what happens is those enteries are only added as you launch additional clients, therefore the number is the client instance, and the value is which core to pin it to. You can also see thats how it works by setting a value, launching a bunch of clients, then checking the CPU affinity value for the process under task manager.

    - Renamed the "CPUAffinity" setting to "ClientCore" in the eqclient.ini file. The new default has been set to "-1" which allows the client to run on any and multiple cores. Setting a number other than the default will still force the client to run on a specific core.
  13. Iven Antonius Bayle

    This is what got added to the eqclient.ini after that patch and I never had ran more than two clients:
    CPU has six cores.

    "-1" does mean that all cores which are marked with "-1" can get used by all clients as long as no core is marked with "1".
    Like stated in your quoted patch note, setting a number other than the default (-1) will force the client(s) to run on a specific core. As example setting "ClientCore3=1" would mean that that all clients would only run on core 4 (ClientCore3= core 4) and the others would be ignored if their state is "-1".

    Afaik there are only two toggle states: "-1" and "1".
    "-1" = deactivated ; "1" = activated.
    However if all cores are deactivated, all of them will be automatically activated for game client(s) calculations and the calculation weight can be shared over all of them.
  14. Soulbanshee Augur

    I have 8 cores/16 threads, I do not have that many entries in my ini. I've seen entries get added if I camp desktop and relaunch one client while another is still running, it will keep incrementing the ClientCore# for the next client (or else DBG for some reason is pushing out 6 in the default configuration). A window manager will override the ini and set the game to be allowed on all processors.


    My first client (aka 0) and second client (aka 1) launches on all processors (-1). Screenshot from task manager > Set affinity.

    My third client (aka 2) launches on CPU 12.
  15. Soulbanshee Augur

  16. Iven Antonius Bayle

    You are mixing up things, Soulbanshee. Messing around with the windows task manager can lead to a conflict with the eqclient.ini. Ignore the task manager, all settings should be done in the eqclient.ini only !

    No. Your setup does put all your clients on core 3 (aka ClientCore2). However I am not sure what parameter "12" does really do. It seems to be a false one and could be interpretated as 1 (which is my guess) but maybe also as -1.
  17. Soulbanshee Augur

    Straight from a dev confirming the behavior after the change:
    Iven likes this.
  18. Veteran_BetaTester PIZZA!

    So now what happens if client 1 (first toon), client 2 (second toon) then client 3 (3rd toon, bazar trader)... Now you have client 1 all cores, client 2 all cores.. and trader core 12. Now you stop playing for the day and keep trader going, client 1 and client 2 stop. What happens to trader client 3 core 12? Is client 3 now client 1 usin all cores?
    IF that happens, then you start toon 1 and toon 2 tomorrow, will toon 2 be client 3 core 12?

    She sells sea shells by the sea shore. The shells she sells are surely sea shells. So if she sells shells on the sea shore, I'm sure she sells seashore shells.
  19. Metanis Bad Company

    My strong suspicion is that what WAS client 3 will stay on CPU12. That assignment is not dynamic, it was set when EQgame originally loaded and will not change.

    However, I do not know what will happen when you reload the clients that WERE 1 & 2 on the previous day. It would be an interesting experiment to try.
  20. Iven Antonius Bayle

    Metanis likes this.