Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Processor utilization
New Posts  All Forums:Forum Nav:

Processor utilization

post #1 of 13
Thread Starter 
I'm compiling the latest Qt SDK, and thought I'd check out system monitor. It appears the four cores on my i5 are being utilized, but they seem to be alternating processing time. Does that look right?

Sanctuary 2
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 3570K Gigabyte GA-Z77X-UP5 TH MSI N560GTX-Ti HAWK 4x4GB Samsung DDR3 PC3 1600 
Hard DriveHard DriveCoolingOS
2xSamsung 830 128GB SATA III SSD - RAID0 OCZ Agility 3 120GB SATA III SSD CoolerMaster Hyper 212 EVO Windows 7 Ultimate 64-bit 
OSMonitorKeyboardPower
Linux Mint 13 64-bit Acer AL2216W 22" LCD Logitech Wave OCZ GameXtream 700W 
CaseMouse
none Logitech G700 
  hide details  
Reply
Sanctuary 2
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 3570K Gigabyte GA-Z77X-UP5 TH MSI N560GTX-Ti HAWK 4x4GB Samsung DDR3 PC3 1600 
Hard DriveHard DriveCoolingOS
2xSamsung 830 128GB SATA III SSD - RAID0 OCZ Agility 3 120GB SATA III SSD CoolerMaster Hyper 212 EVO Windows 7 Ultimate 64-bit 
OSMonitorKeyboardPower
Linux Mint 13 64-bit Acer AL2216W 22" LCD Logitech Wave OCZ GameXtream 700W 
CaseMouse
none Logitech G700 
  hide details  
Reply
post #2 of 13
Yeah it looks like the compile process is hopping between cores. Can you alter the number of of compile jobs? As a rough guide, I treat a HyperThread as half a core, so assuming your i5 has HT, 4 cores + HT effectively equals 6 un-threaded cores. See if you can raise the number of make jobs to 7 - this will keep the cores busy.
Mythica
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel i3 530 Gigabyte GA-H55M-D2H Palit nVidia GT430 Corsair Dominator 4GB TW3X4G1333C9A 
Hard DriveHard DriveOSMonitor
Hitachi Deskstar 7K500 Samsung HD204UI Linux Mint 13 HP L1800 
KeyboardPowerCaseMouse
Trust EasyScroll Silverline Corsair HX520 Lian-Li PC-A04B Logitech Trackman Wheel 
  hide details  
Reply
Mythica
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel i3 530 Gigabyte GA-H55M-D2H Palit nVidia GT430 Corsair Dominator 4GB TW3X4G1333C9A 
Hard DriveHard DriveOSMonitor
Hitachi Deskstar 7K500 Samsung HD204UI Linux Mint 13 HP L1800 
KeyboardPowerCaseMouse
Trust EasyScroll Silverline Corsair HX520 Lian-Li PC-A04B Logitech Trackman Wheel 
  hide details  
Reply
post #3 of 13
Quote:
Originally Posted by parityboy View Post

Yeah it looks like the compile process is hopping between cores. Can you alter the number of of compile jobs? As a rough guide, I treat a HyperThread as half a core, so assuming your i5 has HT, 4 cores + HT effectively equals 6 un-threaded cores. See if you can raise the number of make jobs to 7 - this will keep the cores busy.

i5s don't have HT. thats i7s. the laptop ones do but then that would be 3 because the laptops have 2 cores.
    
CPUMotherboardGraphicsRAM
AMD Phenom II X4 B55 Biostar A880GZ  AMD Radeon HD 4250 iGPU 8GB (2x4GB) Patriot Sector 5 DDR3 
Hard DriveHard DriveHard DriveOptical Drive
Seagate Barracuda 1TB (ST1000DM003) Western Digital Caviar SE 250GB Seagate External 1TB LG DVD Burner 
OSOSOSPower
Debian GNU/Linux 6.0.6 'Squeeze' 64-bit Arch Linux 64-bit FreeBSD 9.0 64-bit LPS Ultra 550 watt 
Case
Thermaltake V4  
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
AMD Phenom II X4 B55 Biostar A880GZ  AMD Radeon HD 4250 iGPU 8GB (2x4GB) Patriot Sector 5 DDR3 
Hard DriveHard DriveHard DriveOptical Drive
Seagate Barracuda 1TB (ST1000DM003) Western Digital Caviar SE 250GB Seagate External 1TB LG DVD Burner 
OSOSOSPower
Debian GNU/Linux 6.0.6 'Squeeze' 64-bit Arch Linux 64-bit FreeBSD 9.0 64-bit LPS Ultra 550 watt 
Case
Thermaltake V4  
  hide details  
Reply
post #4 of 13
Ahhh, ok. I get confused with what Intel is doing these days. tongue.gif OK then, set the number of compile jobs to 5 and see what happens. I used to do something similar when I was running Gentoo on a dual-PIII rig back in the good ol' days. biggrin.gif
Mythica
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel i3 530 Gigabyte GA-H55M-D2H Palit nVidia GT430 Corsair Dominator 4GB TW3X4G1333C9A 
Hard DriveHard DriveOSMonitor
Hitachi Deskstar 7K500 Samsung HD204UI Linux Mint 13 HP L1800 
KeyboardPowerCaseMouse
Trust EasyScroll Silverline Corsair HX520 Lian-Li PC-A04B Logitech Trackman Wheel 
  hide details  
Reply
Mythica
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel i3 530 Gigabyte GA-H55M-D2H Palit nVidia GT430 Corsair Dominator 4GB TW3X4G1333C9A 
Hard DriveHard DriveOSMonitor
Hitachi Deskstar 7K500 Samsung HD204UI Linux Mint 13 HP L1800 
KeyboardPowerCaseMouse
Trust EasyScroll Silverline Corsair HX520 Lian-Li PC-A04B Logitech Trackman Wheel 
  hide details  
Reply
post #5 of 13
I've always used Threads + 1 myself tongue.gif
post #6 of 13
Thread Starter 
I recall setting the number of compile threads when I was playing with Gentoo, but how do I go about that, say, in Fedora 17? Probably similar to about any other distro, but I'm still learning the Linux ropes. redface.gif
Sanctuary 2
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 3570K Gigabyte GA-Z77X-UP5 TH MSI N560GTX-Ti HAWK 4x4GB Samsung DDR3 PC3 1600 
Hard DriveHard DriveCoolingOS
2xSamsung 830 128GB SATA III SSD - RAID0 OCZ Agility 3 120GB SATA III SSD CoolerMaster Hyper 212 EVO Windows 7 Ultimate 64-bit 
OSMonitorKeyboardPower
Linux Mint 13 64-bit Acer AL2216W 22" LCD Logitech Wave OCZ GameXtream 700W 
CaseMouse
none Logitech G700 
  hide details  
Reply
Sanctuary 2
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 3570K Gigabyte GA-Z77X-UP5 TH MSI N560GTX-Ti HAWK 4x4GB Samsung DDR3 PC3 1600 
Hard DriveHard DriveCoolingOS
2xSamsung 830 128GB SATA III SSD - RAID0 OCZ Agility 3 120GB SATA III SSD CoolerMaster Hyper 212 EVO Windows 7 Ultimate 64-bit 
OSMonitorKeyboardPower
Linux Mint 13 64-bit Acer AL2216W 22" LCD Logitech Wave OCZ GameXtream 700W 
CaseMouse
none Logitech G700 
  hide details  
Reply
post #7 of 13
Quote:
Originally Posted by Quasimojo View Post

I recall setting the number of compile threads when I was playing with Gentoo, but how do I go about that, say, in Fedora 17? Probably similar to about any other distro, but I'm still learning the Linux ropes. redface.gif

The "j" or jobs flag for make is what you are looking for. Since you are in Fedora 17, you will be using `make -j5` for your i5, (4+1) I don't remember how to do it with cmake.
In gentoo you configured portage's makeflags to "j(x)" and in Arch you would set your makepkg.conf to have makeflags as well. You can set global default makeflags, but this practice is generally not reccomended as some makeflags (even the jobs flag) can produce broken executables under certain circumstances.

That said, I will go on a limb and say you will never run into the "j" flag breaking anything; you can use ~/.bashrc someone correct me if I'm wrong please.

and add MAKEFLAGS="-j5" which should globally change the make flags
You can enable processor specific optimizations for GCC with:
CFLAGS="-march=native"
and
CXXFLAGS="-march=native"

You make want to echo the CFLAGS and CXXFLAGS variables before setting them to the above as flags like O2 and pipe may be enabled already, in which case you may want to copy them over; you can undo the override by commenting out or removing the lines and rebooting, as they are probably set elsewhere as well, and ~/.bashrc will just override them when you login to this user.

The corei7-avx is for you because you have a post Sandy Bridge processor with AVX extensions. I wrongfully suggested this; GCC4.2 added dynamic processor detection via -march=native, which enables -march and -mtune as -m(is) flag detection at build time, when appropriate.
Edited by Xaero252 - 11/12/12 at 8:26pm
    
CPUMotherboardGraphicsRAM
Core i7 920 D0 4.2ghz HT (1.3625v) Asus R3E 2xGTX 460 (non SLi, no overclock) 6x2gb G.skill @ 6-8-6-24-1T 
Hard DriveOptical DriveOSMonitor
WD-VR 300GBx1, 2xWD 1tb,2x60gb Agility Some crappy combo burner... Arch x64 3xDell U2410f rev A02 
KeyboardPowerCaseMouse
X-Armor U9BL TT Toughpower 1200w (NTB more efficient) Mountain Mods Pinnacle 24 CYO Roccat Kone (R.I.P. A4Tech x7) 
Mouse Pad
Steelpad Experience I-1 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Core i7 920 D0 4.2ghz HT (1.3625v) Asus R3E 2xGTX 460 (non SLi, no overclock) 6x2gb G.skill @ 6-8-6-24-1T 
Hard DriveOptical DriveOSMonitor
WD-VR 300GBx1, 2xWD 1tb,2x60gb Agility Some crappy combo burner... Arch x64 3xDell U2410f rev A02 
KeyboardPowerCaseMouse
X-Armor U9BL TT Toughpower 1200w (NTB more efficient) Mountain Mods Pinnacle 24 CYO Roccat Kone (R.I.P. A4Tech x7) 
Mouse Pad
Steelpad Experience I-1 
  hide details  
Reply
post #8 of 13
Quote:
Originally Posted by jrl1357 View Post

Quote:
Originally Posted by parityboy View Post

Yeah it looks like the compile process is hopping between cores. Can you alter the number of of compile jobs? As a rough guide, I treat a HyperThread as half a core, so assuming your i5 has HT, 4 cores + HT effectively equals 6 un-threaded cores. See if you can raise the number of make jobs to 7 - this will keep the cores busy.

i5s don't have HT. thats i7s. the laptop ones do but then that would be 3 because the laptops have 2 cores.

First gen i5-6xx chips have HT; 2c/4t*
General-Drexler
(32 items)
 
Boinc Box
(4 items)
 
 
CPUMotherboardGraphicsGraphics
2600k 4.7GHz@+0.170 #3105C502 Gigabyte GA-G1 Sniper 3 EVGA GTX 580 3GB EVGA GTX 580 3GB 
RAMHard DriveHard DriveHard Drive
Corsair Vengeance 4x4GB 1600MHz Samsung 830 256*2 LSI MEGARaid 6920-81  Seagate Barracuda 2*320Gb Raid0 
Hard DriveHard DriveHard DriveHard Drive
Seagate Barracuda XT 3TB*4 2* Raid1 Hitachi Desktar 7k 3TB Seagate Constellation 2.5" 1TB 320GB Hitachi 
Hard DriveOptical DriveCoolingCooling
Westen Digital Caviar Green 1Tb LaCie external Corsair Hydro H100 + push(stock)/push+pull(Nois... Stack Coolermaster Blademaster (exhaust) 
CoolingCoolingCoolingOS
Corsair stock fan mid-intake + Blademaster(hard... Bionaire Dual weilding 230mm window unit LAMPTRON FC2 Ubuntu 10.10 x64 
OSOSMonitorMonitor
Windows 7 Ultimate x64 Apple OSx SL 10.6.8 Dell U2711 ASUS VW246H 
MonitorKeyboardPowerCase
ASUS VH242H Ducky DK1008 (blue) OCZ ZX Serie 1000w Silverstone TJ10B-W 
MouseAudioAudioAudio
Logitech Anywhere MX Carver M1.0t amp - 2*200watts RMS 2*Pyle Pro 250watt RMS towers 10" sub, 4"*10" horn Logitech Z2300 
CPUMotherboardOSOS
Opteron 6180SE Supermicro H8QG6-F Windows Server 2008 R2 RedHat Linux 
Monitor
Dell U2711 
  hide details  
Reply
General-Drexler
(32 items)
 
Boinc Box
(4 items)
 
 
CPUMotherboardGraphicsGraphics
2600k 4.7GHz@+0.170 #3105C502 Gigabyte GA-G1 Sniper 3 EVGA GTX 580 3GB EVGA GTX 580 3GB 
RAMHard DriveHard DriveHard Drive
Corsair Vengeance 4x4GB 1600MHz Samsung 830 256*2 LSI MEGARaid 6920-81  Seagate Barracuda 2*320Gb Raid0 
Hard DriveHard DriveHard DriveHard Drive
Seagate Barracuda XT 3TB*4 2* Raid1 Hitachi Desktar 7k 3TB Seagate Constellation 2.5" 1TB 320GB Hitachi 
Hard DriveOptical DriveCoolingCooling
Westen Digital Caviar Green 1Tb LaCie external Corsair Hydro H100 + push(stock)/push+pull(Nois... Stack Coolermaster Blademaster (exhaust) 
CoolingCoolingCoolingOS
Corsair stock fan mid-intake + Blademaster(hard... Bionaire Dual weilding 230mm window unit LAMPTRON FC2 Ubuntu 10.10 x64 
OSOSMonitorMonitor
Windows 7 Ultimate x64 Apple OSx SL 10.6.8 Dell U2711 ASUS VW246H 
MonitorKeyboardPowerCase
ASUS VH242H Ducky DK1008 (blue) OCZ ZX Serie 1000w Silverstone TJ10B-W 
MouseAudioAudioAudio
Logitech Anywhere MX Carver M1.0t amp - 2*200watts RMS 2*Pyle Pro 250watt RMS towers 10" sub, 4"*10" horn Logitech Z2300 
CPUMotherboardOSOS
Opteron 6180SE Supermicro H8QG6-F Windows Server 2008 R2 RedHat Linux 
Monitor
Dell U2711 
  hide details  
Reply
post #9 of 13
Quote:
Originally Posted by PR-Imagery View Post

Quote:
Originally Posted by jrl1357 View Post

Quote:
Originally Posted by parityboy View Post

Yeah it looks like the compile process is hopping between cores. Can you alter the number of of compile jobs? As a rough guide, I treat a HyperThread as half a core, so assuming your i5 has HT, 4 cores + HT effectively equals 6 un-threaded cores. See if you can raise the number of make jobs to 7 - this will keep the cores busy.

i5s don't have HT. thats i7s. the laptop ones do but then that would be 3 because the laptops have 2 cores.

First gen i5-6xx chips have HT; 2c/4t*

still, 3t
    
CPUMotherboardGraphicsRAM
AMD Phenom II X4 B55 Biostar A880GZ  AMD Radeon HD 4250 iGPU 8GB (2x4GB) Patriot Sector 5 DDR3 
Hard DriveHard DriveHard DriveOptical Drive
Seagate Barracuda 1TB (ST1000DM003) Western Digital Caviar SE 250GB Seagate External 1TB LG DVD Burner 
OSOSOSPower
Debian GNU/Linux 6.0.6 'Squeeze' 64-bit Arch Linux 64-bit FreeBSD 9.0 64-bit LPS Ultra 550 watt 
Case
Thermaltake V4  
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
AMD Phenom II X4 B55 Biostar A880GZ  AMD Radeon HD 4250 iGPU 8GB (2x4GB) Patriot Sector 5 DDR3 
Hard DriveHard DriveHard DriveOptical Drive
Seagate Barracuda 1TB (ST1000DM003) Western Digital Caviar SE 250GB Seagate External 1TB LG DVD Burner 
OSOSOSPower
Debian GNU/Linux 6.0.6 'Squeeze' 64-bit Arch Linux 64-bit FreeBSD 9.0 64-bit LPS Ultra 550 watt 
Case
Thermaltake V4  
  hide details  
Reply
post #10 of 13
by default, compiling is confined to one core. There are command line switches to enable support for more threads, but this can potentially cause issue with linking (doesn't always, but has been known).
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Processor utilization