Log in

View Full Version : Running 2 clients on a dual-core machine


Kanazawa
04-15-2008, 05:42 AM
When I start 2 EQ2-Clients they both seem to be locked to one core of the cpu.I wanted to get rid of my notebook on which I normally started the second client and my new computer should have got enough power to handle 2 clients simultanously.Configuration:Intel 8400 Core2 Duo CPU4Gb RAMGeforce 8800GTS 512Windows XP SP2 with patchesI have already tried to manually assign core 0 or 1 to the clients but it doesn't seem to work.Every time I start 2 instances of the game and have one displayed on my main screen and the other on my second performance goes south (around 15-20 fps). Taskmanager shows only 50% CPU-load so it seems both clients are locked to one core.Is there a solution for this problem?

Nazgul
04-15-2008, 07:07 AM
<cite>Kanazawa@Innovation wrote:</cite><blockquote>When I start 2 EQ2-Clients they both seem to be locked to one core of the cpu.I wanted to get rid of my notebook on which I normally started the second client and my new computer should have got enough power to handle 2 clients simultanously.Configuration:Intel 8400 Core2 Duo CPU4Gb RAMGeforce 8800GTS 512Windows XP SP2 with patchesI have already tried to manually assign core 0 or 1 to the clients but it doesn't seem to work.Every time I start 2 instances of the game and have one displayed on my main screen and the other on my second performance goes south (around 15-20 fps). Taskmanager shows only 50% CPU-load so it seems both clients are locked to one core.Is there a solution for this problem?</blockquote>Good question.  Can't answer from a tech point of view, but I box on the one dual core PC.  Alt-Tab on the same monitor keeps the performance pretty good at 'balanced' settings for me.If you have a 'G15', macro Alt-Tab to one of the 'G' buttons - even easier <img src="/smilies/8a80c6485cd926be453217d59a84a888.gif" border="0" alt="SMILEY" />

Trilarian-2
04-15-2008, 11:32 AM
You could make two EXE's from the everquest.exe file(keep the original, then copy to say *-core1 and *-core2).  Then set the CPU affinity different for each EXE(tells your machine which core to use for the thread).To set CPU affinity for a program, download and use <a rel="nofollow" href="http://www.robpol86.com/pages/imagecfg.php" target="_blank">imagecfg</a> from a command line(change the path to match your path).The syntax is <span>imagecfg -a 0x<b>n</b> [File Path] [File Name](note, the program does not work well with spaces in the path, so copy the EXE to your working directory and just point to the filename if you have spaces in the path).where n is:</span><span> 1 = CPU0 2 = CPU1 4 = CPU2 8 = CPU3</span>So, for example if you wanted to set the main EXE to CPU0, you would do:imagecfg -a 0x1 "Everquest2.exe"

Kanazawa
04-16-2008, 04:31 AM
Thanks for your valuable information Trilarian.When first trying I noticed no difference. Then I added the switch -u which "forces" the program to run only on one core and certainly the performance increased to 30-40 fps which makes a big difference in playability.I will experiment with some other settings like soundcard and maybe i will try to add a second, cheap GPU to see if performance can be further increased but for now I am very satisfied with the result.I made a batchfile which does copying and assigning automatically for me when Everquest2.exe gets changed.Just place the file imagecfg.exe in your EQ2 directory and make a batch-file which contains:REM Change to the drive and subdirectory EQ2 is installed********d:cd gameseq2REM Make 2 copies from EQ2*********************copy everquest2.exe everquest2c1.execopy everquest2.exe everquest2c2.exeREM Assign each copy to a core*****************imagecfg -u -a 0x1 everquest2c1.exeimagecfg -u -a 0x2 everquest2c2.exe

Nazgul
04-16-2008, 06:50 AM
<cite>Kanazawa@Innovation wrote:</cite><blockquote>Thanks for your valuable information Trilarian.When first trying I noticed no difference. Then I added the switch -u which "forces" the program to run only on one core and certainly the performance increased to 30-40 fps which makes a big difference in playability.I will experiment with some other settings like soundcard and maybe i will try to add a second, cheap GPU to see if performance can be further increased but for now I am very satisfied with the result.I made a batchfile which does copying and assigning automatically for me when Everquest2.exe gets changed.Just place the file imagecfg.exe in your EQ2 directory and make a batch-file which contains:REM Change to the drive and subdirectory EQ2 is installed********d:cd gameseq2REM Make 2 copies from EQ2*********************copy everquest2.exe everquest2c1.execopy everquest2.exe everquest2c2.exeREM Assign each copy to a core*****************imagecfg -u -a 0x1 everquest2c1.exeimagecfg -u -a 0x2 everquest2c2.exe</blockquote>So it worked ok?I'm no techie as I mentioned before, and the previous post was mainly Greek to me.  An 'idiot's guide' to this would be much appreciated if you have the time or inclination, hehe.

Trilarian-2
04-16-2008, 02:32 PM
<cite>Nazgul wrote:</cite><blockquote><cite></cite>So it worked ok?I'm no techie as I mentioned before, and the previous post was mainly Greek to me.  An 'idiot's guide' to this would be much appreciated if you have the time or inclination, hehe.</blockquote>Sure, give me the path to your Everquest2.exe file and I can convert the script.  You then have two choices, either keep the script seperate which means running it each time Everquest2.exe gets updated via a game update.  Or you can make an icon that will do this everytime and call EQ2 when done (basically replacing your current EQ2 icon on the desktop).

Nazgul
04-16-2008, 07:33 PM
<cite>Trilarian-2 wrote:</cite><blockquote><cite>Nazgul wrote:</cite><blockquote><cite></cite>So it worked ok?I'm no techie as I mentioned before, and the previous post was mainly Greek to me.  An 'idiot's guide' to this would be much appreciated if you have the time or inclination, hehe.</blockquote>Sure, give me the path to your Everquest2.exe file and I can convert the script.  You then have two choices, either keep the script seperate which means running it each time Everquest2.exe gets updated via a game update.  Or you can make an icon that will do this everytime and call EQ2 when done (basically replacing your current EQ2 icon on the desktop).</blockquote>Hey Tri, many thanks for the help <img src="/eq2/images/smilies/283a16da79f3aa23fe1025c96295f04f.gif" border="0" alt="SMILEY" width="15" height="15" />I'm running two instances of the client from separate partitions.  For me, this has been far better performance than running from the same folder.As you were finding, my CPU usage is high 90% when boxing, so if I could use both cores it would be ideal.  Paths to the exe's on my desktop are:"F:GamesSonyEverQuest IIEQ2.exe""G:SonyBoxEverQuest IIEQ2.exe"I would prefer just to replace these shortcuts if possible.Ty.

Autenil
04-17-2008, 03:27 AM
<cite>Kanazawa@Innovation wrote:</cite><blockquote>When I start 2 EQ2-Clients they both seem to be locked to one core of the cpu.I wanted to get rid of my notebook on which I normally started the second client and my new computer should have got enough power to handle 2 clients simultanously.Configuration:Intel 8400 Core2 Duo CPU4Gb RAMGeforce 8800GTS 512Windows XP SP2 with patchesI have already tried to manually assign core 0 or 1 to the clients but it doesn't seem to work.Every time I start 2 instances of the game and have one displayed on my main screen and the other on my second performance goes south (around 15-20 fps). Taskmanager shows only 50% CPU-load so it seems both clients are locked to one core.Is there a solution for this problem?</blockquote>The EQ2 client already assigns affinity for the main thread in an attempt to load balance for multiple clients running.  If you have 4 cores and 4 clients running, each client's main thread should get its own core.Affinity is set on a thread level, so you won't see it in the "set affinity..." dialog in the process manager.The problem you're describing seems to stem from the fact that you're running a dual-head video card and the EQ2 client always tries to run on the primary device.  When you move the client over to the secondary device, performance will decrease (probably because the client is sending all of it's DirectX communication to the primary device but is being displayed on the secondary device).Unfortunately, at this time there's no way to change the device that the EQ2 uses.  If you run both clients on the same monitor, performance should still be good.

Trilarian-2
04-17-2008, 11:53 AM
<span class="genmed"><b><span style="color: #ff0000;">Autenil</span></b></span>: Thanks for responding from the developer side.  I am not denying that EQ2 does what you say, but I have a hard time believing it does it correctly 100% of the time.  I base this upon the fact that even running a single client, I see a performance boost by setting the CPU affinity on the EXE forcing it to only run on 1 core(even though if I don't do this I see 1 core taking the load).  Maybe in that particular case, the cpu scheduler is making attempts to split the thread?  I don't know the reason, I just know I see a noticable drop in stuttering and increase in general stability since I added that flag(in fairness, there have been some live updates so its not a 100% controlled enviroment).Putting that aside, it seems the above poster saw a significant increase by forcing the cpu affinity.  I don't run two clients(assuming I'd need two eq2 keys, right?) so can't test either way.  At any rate, it doesn't hurt anything to assign a core and you can easily restore from the backup exe.<span class="name"><b>Nazgul</b></span>: In light of Autenil's post, I would emphasize backing up your original Everquest2.exe as this may all be a moot endeavor.  As I mentioned before, I don't run two clients so I'm just basing this on how I set other programs to cores that don't naturally thread well.Since you have two partitions, you will make two scripts.  Open up whatever text editor you prefer - can be as simple as notepad and copy/paste the two scripts below into separate files(just save to the desktop as script1.bat and script2.bat - can change name to whatever you want, just leave the .bat).  Note that you will need to copy the imagecfg.exe file to both EQ2 directories.Script1(<span class="name"><b>mottimott</b></span>: gonna modify your script as that looks sufficent):<span class="postbody">REM Change to the drive and subdirectory EQ2 is installed********f:cd "</span><span class="postbody">GamesSonyEverQuest II"</span><span class="postbody">REM Make copy of EQ2*********************copy everquest2.exe everquest2c1.exeREM Assign copy to a core*****************imagecfg -u -a 0x1 everquest2c1.exeREM Starting EQ2</span><span class="postbody">*****************everquest2c1.exe</span>Script2:<span class="postbody">REM Change to the drive and subdirectory EQ2 is installed********g:cd "</span><span class="postbody">SonyBoxEverQuest II</span><span class="postbody">"</span> <span class="postbody">REM Make copy of EQ2*********************copy everquest2.exe everquest2c2.exeREM Assign copy to a core*****************imagecfg -u -a 0x2 everquest2c2.exe</span><span class="postbody">REM Starting EQ2</span><span class="postbody">***************** everquest2c2.exe</span><span class="postbody">I would not delete your original shortcuts until after you have run and tested EQ2 for awhile.  If it appears to run faster and stable, then you can remove the old shortcuts.  Also, try Autenil's suggestion and see the difference in running both clients on the same screen vs. a second display.  Hope it helps.</span>

Nazgul
04-17-2008, 01:50 PM
<cite>Trilarian-2 wrote:</cite><blockquote><span class="genmed"><b><span style="color: #ff0000;">Autenil</span></b></span>: Thanks for responding from the developer side.  I am not denying that EQ2 does what you say, but I have a hard time believing it does it correctly 100% of the time.  I base this upon the fact that even running a single client, I see a performance boost by setting the CPU affinity on the EXE forcing it to only run on 1 core(even though if I don't do this I see 1 core taking the load).  Maybe in that particular case, the cpu scheduler is making attempts to split the thread?  I don't know the reason, I just know I see a noticable drop in stuttering and increase in general stability since I added that flag(in fairness, there have been some live updates so its not a 100% controlled enviroment).Putting that aside, it seems the above poster saw a significant increase by forcing the cpu affinity.  I don't run two clients(assuming I'd need two eq2 keys, right?) so can't test either way.  At any rate, it doesn't hurt anything to assign a core and you can easily restore from the backup exe.<span class="name"><b>Nazgul</b></span>: In light of Autenil's post, I would emphasize backing up your original Everquest2.exe as this may all be a moot endeavor.  As I mentioned before, I don't run two clients so I'm just basing this on how I set other programs to cores that don't naturally thread well.Since you have two partitions, you will make two scripts.  Open up whatever text editor you prefer - can be as simple as notepad and copy/paste the two scripts below into separate files(just save to the desktop as script1.bat and script2.bat - can change name to whatever you want, just leave the .bat).  <span style="font-size: medium;color: #ff6600;">Note that you will need to copy the imagecfg.exe file to both EQ2 directories.</span>Script1(<span class="name"><b>mottimott</b></span>: gonna modify your script as that looks sufficent):<span class="postbody">REM Change to the drive and subdirectory EQ2 is installed********f:cd "</span><span class="postbody">GamesSonyEverQuest II"</span><span class="postbody">REM Make copy of EQ2*********************copy everquest2.exe everquest2c1.exeREM Assign copy to a core*****************imagecfg -u -a 0x1 everquest2c1.exeREM Starting EQ2</span><span class="postbody">*****************everquest2c1.exe</span>Script2:<span class="postbody">REM Change to the drive and subdirectory EQ2 is installed********g:cd "</span><span class="postbody">SonyBoxEverQuest II</span><span class="postbody">"</span> <span class="postbody">REM Make copy of EQ2*********************copy everquest2.exe everquest2c2.exeREM Assign copy to a core*****************imagecfg -u -a 0x2 everquest2c2.exe</span><span class="postbody">REM Starting EQ2</span><span class="postbody">***************** everquest2c2.exe</span><span class="postbody">I would not delete your original shortcuts until after you have run and tested EQ2 for awhile.  If it appears to run faster and stable, then you can remove the old shortcuts.  Also, try Autenil's suggestion and see the difference in running both clients on the same screen vs. a second display.  Hope it helps.</span></blockquote>Hey Tri,I tried to follow relevant instructions, but it seems I didn't properly understand the highlighted one as above, hence the error message <or so it appears> below.  This message was the same for both instances of the game.C:Documents and SettingsDave HollowayDesktop>REM Change to the drive and subdirectory EQ2 is installed********C:Documents and SettingsDave HollowayDesktop>g:G:>cd "SonyBoxEverQuest II"G:SonyBoxEverQuest II>REM Make copy of EQ2*********************G:SonyBoxEverQuest II>copy everquest2.exe everquest2c2.exe        1 file(s) copied.G:SonyBoxEverQuest II>REM Assign copy to a core*****************<span style="color: #ff6600;">G:SonyBoxEverQuest II>imagecfg -u -a 0x2 everquest2c2.exe'imagecfg' is not recognized as an internal or external command,operable program or batch file.</span>G:SonyBoxEverQuest II>REM Starting EQ2*****************G:SonyBoxEverQuest II>everquest2c2.exeBy your instruction, I copied the relevant 'notepad' file to each EQ2 directory on the relevant drive.  I would imagine this is my error.Anyway, both desktop icons launched the game.  However, they both bypassed the launcher I believe, and therefore any game update I usually see - was this as intended?Thanks for your efforts <img src="/eq2/images/smilies/e8a506dc4ad763aca51bec4ca7dc8560.gif" border="0" alt="SMILEY" width="15" height="15" />

Trilarian-2
04-17-2008, 02:59 PM
You need to have the program that sets the affinity.  =)From my first post, you need the program <a rel="nofollow" href="http://www.robpol86.com/pages/imagecfg.php" target="_blank">imagecfg</a>.You have a couple options as for the patcher:- Skip patcher until the game complains about needing an update, then manually run the patcher.- Change the script to copy the backup the original EXE, then apply the affinity to the Everquest2.exe so the patcher calls the modified file(will have to be run each time there is an update that overwrites Everquest2.exe).

Nazgul
04-17-2008, 07:25 PM
<cite>Trilarian-2 wrote:</cite><blockquote>You need to have the program that sets the affinity.  =)From my first post, you need the program <a rel="nofollow" href="http://www.robpol86.com/pages/imagecfg.php" target="_blank">imagecfg</a>.You have a couple options as for the patcher:- Skip patcher until the game complains about needing an update, then manually run the patcher.- Change the script to copy the backup the original EXE, then apply the affinity to the Everquest2.exe so the patcher calls the modified file(will have to be run each time there is an update that overwrites Everquest2.exe).</blockquote>Ok Tri, think I'm a little closer now - at least it looks like it recognised the program.C:Documents and SettingsDave HollowayDesktop>REM Change to the drive and subdirectory EQ2 is installed********C:Documents and SettingsDave HollowayDesktop>g:G:>cd "SonyBoxEverQuest II"G:SonyBoxEverQuest II>REM Make copy of EQ2*********************G:SonyBoxEverQuest II>copy everquest2.exe everquest2c2.exe        1 file(s) copied.G:SonyBoxEverQuest II>REM Assign copy to a core*****************<span style="color: #ff6600;">G:SonyBoxEverQuest II>imagecfg -u -a 0x2 everquest2c2.exeeverquest2c2.exe contains no configuration informationeverquest2c2.exe contains a Subsystem Version of 4.0everquest2c2.exe updated with the following configuration information:    Image can only run in uni-processor mode on multi-processor systems    Process Affinity Mask: 00000002    Image can only run in uni-processor mode on multi-processor systems</span>G:SonyBoxEverQuest II>REM Starting EQ2*****************G:SonyBoxEverQuest II>everquest2c2.exeThoughts?