You are not logged in.

#1 2012-11-22 21:01:09

Troopa
Member
Registered: 2011-12-12
Posts: 29

get running an application on multiple cores

Hi *

I'm trying new stuff with my Arch - some maybe hardcore stuff - for example i try to get access to more than one cpu core for 1 application. I'm not sure if it works already or if something went wrong. But at first the overview of my problem

I will play a game that supports multiple core usage *throat* Guildwars2. The game should access more than one core but on linux it doesn't or at least wine doesn't. NOW I try that these application can access more than one core at once so that the game will run faster wink

But HOW can I set this? I've already tried some tricks but I'm not sure if they worked or I did a mistake. following tricks I've already tried

//to set that Gw2.exe will use core 0-4, right?
$ taskset -cp 0-4 `ps -ef | grep Gw2.exe | grep -v grep | awk '{print $2}'`

//to define the priority of the process
$ renice 0 -p `ps -ef | grep Gw2.exe | grep -v grep | awk '{print $2}'`

//set frequence to 3.2 GHz for core 0-4. Am I doing it right?
# cpupower -c 0-4 frequency-set -f 3200Mhz

//loaded the module for cpu frequence scaling
$ modprobe powernow-k8
$ modprobe cpufreq_performance
$ cpupower frequency-info

so far, nothing went wrong or at least i didn't noticed it.

Is there anything else I can do about? some commands I can try, some programs I can use or something that need to be developed/implemented first (I'm in an apprenticeship as an computer scientist)

I'm grateful for every help
sincerely Troopa

P.S.: perhaps this post is in the wrong tree big_smile but it affects Hardware tongue


I'm a gnome, a computer engineer and tinkerer

Offline

#2 2012-11-23 08:52:02

mparusinski
Member
Registered: 2012-11-23
Posts: 4

Re: get running an application on multiple cores

A quick look on Google suggests Wine always had some issues with multithreading on multiple CPUs, even tough they use pthreads so thread scheduling is handle by the Linux kernel.

http://bugs.winehq.org/show_bug.cgi?id=23954

It seems taskset doesn't always behave the way you expect:

http://forums.whirlpool.net.au/archive/1487814

Try running the Wine task manager, you may be able to set the CPU affinity there as well.

 wine taskmgr 

Offline

#3 2012-11-23 08:58:34

whoops
Member
Registered: 2009-03-19
Posts: 842

Re: get running an application on multiple cores

Tried around with taskmgr & taskset a lot, too. In my experience, most windows programs & games will try to use multiple cores without taskset or anything, BUT run a lot smoother if you force wine to use only ONE core. Many games even get terrible freezes when they try to use multiple cores. Sometimes 2 cores work fine, but 4 or more is almost always a bad idea and leads to worse performance.

Offline

#4 2012-11-23 09:34:23

brebs
Member
Registered: 2007-04-03
Posts: 3,444

Re: get running an application on multiple cores

mparusinski wrote:

It seems taskset doesn't always behave the way you expect:

http://forums.whirlpool.net.au/archive/1487814

It's their usage which is wrong. Old single-core games, e.g. Thief2 before the new 1.19 patch, should be run with:

taskset -c 0
  or
schedtool -a 0x1 -e

To run on the *first* core.

taskset -c 1 is wrong because that will run wine on the *second* core, which actually made Thief2 much slower.

These 2 commands mix up 0, 1, and hexadecimal, with confusing manpages, to make our lives more difficult!

Offline

#5 2012-11-24 23:07:31

Troopa
Member
Registered: 2011-12-12
Posts: 29

Re: get running an application on multiple cores

thanks for the fast answer. I'll try this new commands as fast as possible
probably tomorrow


I'm a gnome, a computer engineer and tinkerer

Offline

#6 2012-11-29 19:24:07

Troopa
Member
Registered: 2011-12-12
Posts: 29

Re: get running an application on multiple cores

mparusinski wrote:

Try running the Wine task manager, you may be able to set the CPU affinity there as well.

 wine taskmgr 

when I use this command an error appears if I try to start it when Gw2 is running and otherwise around its the same. Why should it help me, even if I can't use both at the same time?


Is there anything else I can do about it? some hardcore core programming or so? Is there a solution or can i forget this problem???

Troopa


I'm a gnome, a computer engineer and tinkerer

Offline

Board footer

Powered by FluxBB