You are not logged in.

#1 2008-09-28 21:29:49

Falcata
Member
From: Michiana
Registered: 2008-01-23
Posts: 501
Website

CPU Cores Juggling Workload?

Sometimes playing Second Life, my CPU cores will suddenly exchange their workload, and the game freezes for a second or so when this occurs.  I think it is related to these issues (one, two), but I have no idea if the workarounds listed will work on Linux.  Does anyone know of a solution?

Last edited by Falcata (2008-09-28 21:35:58)

Offline

#2 2008-09-28 21:44:13

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: CPU Cores Juggling Workload?

Can't see the links, but you can set the cpu affinity of a process using schedtool.

Offline

#3 2008-09-28 21:51:24

Falcata
Member
From: Michiana
Registered: 2008-01-23
Posts: 501
Website

Re: CPU Cores Juggling Workload?

Ah, sorry about that.  I'll post the contents of the first link, since the second one just repeats something from the first.  Any idea if there's an equivalent to this "affinity" thing in Linux?  Is it renice?

Dual core processor machines (Pentium D, Core 2 Duo, Athlon 64X2...etc) have been proliferating in the market since late last year, and as a result, more of our Residents are using this type of PC. Unfortunately, Second Life isn't currently optimized for dual core processor setups.

If you're reporting poor performance and you're running a dual core machine, please do the following:

    * While running SL (or at least have the SL client login up), bringup the Windows Task Manager by pressing CTRL+ALT+Delete
    * Select the Processes tab, and locate SecondLife.exe listed underImage Name
    * Right-click on SecondLife.exe, and from the dropdown, select "SetAffinity..."
    * When the Processor Affinity window pops up, you'll most likely notice that two CPUs are selected, CPU 0 & CPU 1. Select only one of the CPUs, then click on OK.

    Affinity will reset back to using both processors after you log off SL. You will need to repeat the process above after you log back onto SL.

To see if you're running a dual core processor machine, do the following:

    * Bring up the Windows Task Manager by pressing CTRL+ALT+Del
    * Select the Performance tab
    * If you see TWO graphs in the CPU Usage History section, you're running a dual core processor setup.

Additional info:

One of the following applications can be used to permanently change the affinity of a process/application:

    * ImageCfg
    * WinLauncherXP
    * XCPU

If you're running an AMD Dual Core system, you should install AMD's hotfix which is located here:
http://support.steampowered.com/cgi-bin … _faqid=430

If the hotfix isn't enough, you can use a little application called Imagecfg that will allow you to permanently change the affinity of a process/application:
http://www.robpol86.com/pages/imagecfg.php

You can also use other similar programs that set the affinity of an application, such as those listed below:

WinLauncherXP
http://www.majorgeeks.com/WinLauncherXP_d870.html

XCPU
http://www.appliedvisual.com/xcpu.htm

Also, you can create a batch script so the affinity settings persist between logins:

   1. Make a text file with the following contents:

      c:
      cd \\Program Files\\SecondLife
      imagecfg -a 0x1 SecondLife.exe

      and then rename the suffix ".txt" to ".bat" and run it while Second Life is closed.
   2. Start Second Life and confirm affinity is set to only one core.
      You'll need to do this each time you've updated to a new version of Second Life.

Last edited by Falcata (2008-09-28 21:52:12)

Offline

#4 2008-09-28 21:55:10

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: CPU Cores Juggling Workload?

Read the second part of my post (== use schedtool, it's in extra).

Offline

#5 2008-09-28 21:56:57

Falcata
Member
From: Michiana
Registered: 2008-01-23
Posts: 501
Website

Re: CPU Cores Juggling Workload?

Ah, thanks.  I guess I missed that part.

Offline

#6 2008-09-28 22:00:03

Falcata
Member
From: Michiana
Registered: 2008-01-23
Posts: 501
Website

Re: CPU Cores Juggling Workload?

Okay, the man page is making my head hurt.  Could you explain it to me?

Offline

#7 2008-09-28 22:03:53

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: CPU Cores Juggling Workload?

It's easy, "schedtool -a 0x1 -e secondlife_executable" (don't know how you start secondfile) should bind secondlife to the first cpu. Alternatively, you can just pass the PID of a running process.

Offline

#8 2008-09-28 22:21:01

Falcata
Member
From: Michiana
Registered: 2008-01-23
Posts: 501
Website

Re: CPU Cores Juggling Workload?

I tried passing the PID, but it didn't find the process

Offline

#9 2008-09-28 22:27:26

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: CPU Cores Juggling Workload?

Are you sure you got the right PID, through "ps ax"?

Offline

#10 2008-09-28 22:30:20

Falcata
Member
From: Michiana
Registered: 2008-01-23
Posts: 501
Website

Re: CPU Cores Juggling Workload?

Yes, it is.  I copied and pasted to make sure.

Offline

#11 2008-09-28 22:31:43

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: CPU Cores Juggling Workload?

I have no idea.

Offline

#12 2008-09-28 22:55:59

Falcata
Member
From: Michiana
Registered: 2008-01-23
Posts: 501
Website

Re: CPU Cores Juggling Workload?

Well, this sucks.

Offline

#13 2008-09-29 23:00:24

Falcata
Member
From: Michiana
Registered: 2008-01-23
Posts: 501
Website

Re: CPU Cores Juggling Workload?

I got the command to run, by entering the full path of the executable.  However, there was an error when it ran:

/home/zauber/SecondLife/SL_1.22.3/bin/do-not-directly-run-secondlife-bin: error while loading shared libraries: libopenjpeg.so.2: cannot open shared object file: No such file or directory

I'll post about this on Second Life's bug reporter, and see if anyone can help me there.

Last edited by Falcata (2008-09-29 23:01:22)

Offline

#14 2008-09-30 06:37:53

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: CPU Cores Juggling Workload?

/home/zauber/SecondLife/SL_1.22.3/bin/do-not-directly-run-secondlife-bin

Offline

#15 2008-09-30 10:02:35

Falcata
Member
From: Michiana
Registered: 2008-01-23
Posts: 501
Website

Re: CPU Cores Juggling Workload?

Not sure what you're saying, iphitus, other than restating the obvious.

Well, I found a way around the dependencies not being found, by copying the files in Second Life's lib directory to a separate folder, and then created symbolic links to those files. I also had to create a symlink to libxul.so. However, after doing all this, I get this error message with schedtool:

/home/zauber/SecondLife/SL_1.22.3/bin/do-not-directly-run-secondlife-bin: symbol lookup error: /home/zauber/SecondLife/SL_1.22.3/bin/do-not-directly-run-secondlife-bin: undefined symbol: _ZN12nsCharTraitsItE12sEmptyBufferE

Offline

#16 2008-09-30 12:53:07

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: CPU Cores Juggling Workload?

Secondlife probably includes the correct libs with it somewhere in it's install directory. Hence, don't run the binary directly, as there's probably a script that'll run it fine.

I'm guessing a bit, but if secondlife was running fine before, than that's a possible explanation as many other closed apps do this.

Offline

#17 2008-09-30 14:38:01

Falcata
Member
From: Michiana
Registered: 2008-01-23
Posts: 501
Website

Re: CPU Cores Juggling Workload?

iphitus wrote:

Secondlife probably includes the correct libs with it somewhere in it's install directory. Hence, don't run the binary directly, as there's probably a script that'll run it fine.

I'm guessing a bit, but if secondlife was running fine before, than that's a possible explanation as many other closed apps do this.

Yes, it included the correct libs, and I copied them to another folder and made symlinks to them in my /usr/lib directory.  Also, I am not running the binary directly.  I'm running the script that executes it.  Also, the second life game client is open source, though the server software is not.

What I'd like to know is where the "undefined symbol: _ZN12nsCharTraitsItE12sEmptyBufferE" comes from.

Last edited by Falcata (2008-09-30 14:39:47)

Offline

Board footer

Powered by FluxBB