View previous topic :: View next topic |
Author |
Message |
lednakashim n00b

Joined: 09 Jun 2010 Posts: 24
|
Posted: Sun Dec 09, 2012 10:50 pm Post subject: Applications bouncing around on a hyperthreaded system? |
|
|
I have a ultra-high-end, top-of-the-line Intel core i3 laptop and I am always surprised by my cpu utilization and affinities, especially when it comes to hyperthread utilization. I wonder if there is a way that I can prevent the system from moving around threads, especially if it moves them to HT cores.
For example, I am running a single core physics simulation I wrote and Thunderbird. I see both processes jump around aimlessly between processors. I see Thunderbird cycle through all cores 0,1,2,3 and likewise I see the physics simulation cycle through all cores. The average time spent on a core is about 2 seconds. Whats strange is that the system sometimes puts these processes onto the HT core with what appears to be little utilization of the physical core.
My physics simulation gets an about 10% performance boost when I manually set the CPU affinity (then it doesn't jump everywhere), which makes me wonder if there is something suboptimal with how my process affinities are being managed.
Is there some way for me to hint to kernel how to better manage my applications? For example only to use the HT when the system is under extreme stress. |
|
Back to top |
|
 |
krinn Watchman


Joined: 02 May 2003 Posts: 6510
|
Posted: Sun Dec 09, 2012 11:49 pm Post subject: |
|
|
Intel cpu boost mhz on a core if few cores are in use, so you may get your cpu boost from that on your application when not jumping on all cores.
I would look at CONFIG_PREEMPT* settings in the kernel to try to lower the core jumping effect you have (specially the CONFIG_PREEMPT_VOLUNTARY one if set).
Maybe review your scheduling model in use too. |
|
Back to top |
|
 |
Ant P. Advocate

Joined: 18 Apr 2009 Posts: 4935
|
Posted: Sun Dec 09, 2012 11:56 pm Post subject: |
|
|
You could try a kernel with the BFS scheduler. |
|
Back to top |
|
 |
smartass Apprentice

Joined: 04 Jul 2011 Posts: 189 Location: right behind you ... (you did turn around, didn't you?)
|
Posted: Mon Dec 10, 2012 6:05 am Post subject: |
|
|
You could experiment with stuff like CONFIG_SCHED_MC (multi-core) and/or CONFIG_SCHED_SMT (hyperthreading) to optimize the scheduler for your system.
You could also try to use cgroups to set the affinity automatically. |
|
Back to top |
|
 |
depontius Advocate

Joined: 05 May 2004 Posts: 3315
|
Posted: Mon Dec 10, 2012 6:17 am Post subject: |
|
|
I didn't think Core-I3 had HT - I thought that was only on Core-I7.
I don't know if it's in the kernel yet, but I'm under the impression that there is work ongoing to "stick" things to one core, yet allow it to move if that could allow significant power reduction. (like shutting down one core, moving the work to other(s)) _________________ .sigs waste space and bandwidth |
|
Back to top |
|
 |
pilla Administrator


Joined: 07 Aug 2002 Posts: 7614 Location: Pelotas, BR
|
Posted: Thu Dec 20, 2012 10:58 am Post subject: |
|
|
Moved from Gentoo Chat to Off the Wall.
You can set CPU sets or even pin threads to specific cores. Mind you that HT is multithreading on the same core, even though it appears as two.
It seems that newer i3 processors [url=http://ark.intel.com/products/65693/Intel-Core-i3-3220-Processor-(3M-Cache-3_30-GHz)]also have HT[/url]. _________________ "I'm just very selective about the reality I choose to accept." -- Calvin |
|
Back to top |
|
 |
Prenj n00b


Joined: 20 Nov 2011 Posts: 16
|
|
Back to top |
|
 |
|