iliveisl

 

are you firing on all cores?

8 comments

from time to time, i get asked about how to get OpenSim or a viewer to use all available CPU cores

if you look at your Task Manager when you’re running your local OpenSim or your viewer, you might wonder what the dealio is when you see that some CPU cores are just lazing around. in the first screenshot below, you can see that 4 cores are showing no usage at all (this is my fancy work machine with an i7 processor)

cpu

BUT WAIT! each of those little graph boxes is actually for a thread and not a core! o_O

ahh, so actually, this box has 4 cores that can each run two threads (hyperthreading – not a sewing term) =)

so . . . for someone like me (not as techy as i may appear), i look at that performance thing and think that some of my cores (actually threads) are just sitting around

there’s a lot of misinformation on the web (no! really?) and how apps use CPU is a topic subject to all kinds of misinformation *just call me Miss Info*

i hope that what i’m saying here is mostly correct and not wrong =)

  • so is some of your CPU actually not doing anything?
  • could your viewer or local OpenSim be running twice as well and twice as fast?
  • if so, is there any magic setting you can change to make it run better?

it turns out that your computer isn’t being lazy and you’re not missing out on better performance

i hate learning about something that could have been running better had i only known about x, y, or zed. that makes me feel dumb (i’m glad once i learn it, but i hate that i could’ve been having a better experience if i had only known better)

it turns out that you can manually set programs to have access to all of your threads BUT typically, they already have that set by default (i think this may be different for XP, but that is so 2001) =p

so if that’s the default, why aren’t they being used?

good question and it’s an easy answer – the number of threads that a program uses is evidently part of how that program is coded! so you don’t have any control over that (well, some of you do because you are the ones writing the OpenSim and viewer code!)  =)

a lot of programs simply are not written to use all available threads

for regular people like me, there’s no need to go set “processor affinity” and i don’t think those hold after rebooting anyway

as you can see in the bottom screenshot, MoWeS and OpenSim are both set, by default, to have access to all threads – but that doesn’t mean they can use them all – that’s determined by the app and not your machine in most cases

so why can the number of threads be selected?

another good question and i think one reason is that it lets you see how an app runs on a less powerful machine. if that’s the case, then only developers would have an interest in that

so it turns out that your PC is designed to run things like OpenSim and a viewer pretty much as well as possible. that makes sense since the better a machine can run stuff, the more popular that machine will be!  =)

affinity

Twitter Tumblr Digg Reddit Stumbleupon Delicious Facebook Plusone Pinterest Linkedin Tumblr Posterous Snailmail

written by Ener Hax

August 5th, 2013 at 8:08 am

posted in OpenSim,virtual worlds

tagged with , ,

8 comments to 'are you firing on all cores?'

subscribe to comments with RSS or trackBack to 'are you firing on all cores?'.

  1. Great observations. Yes, indeed – these settings that let cores sit quietly are there for very, very good reasons. I used to work as a mainframe systems programmer a loooong time ago, but the lessons still apply, and they are universal lessons. They hold for everything from water supply to server utilization.

    The one big lesson can be summed up this way: always carry sufficient reserve capacity in every part of your system. If it’s a river dam protecting land and towns, be sure it’s high enough and strong enough to withstand that 100-year flood. If it’s a server farm, be sure there’s enough computing and memory capacity to cover all likely demands on the servers, particularly during an information flood such as occurs during a regional power outage, a broad terrorist attack, or a global tragedy.

    Having sufficient capacity means that nearly all the time your system will look as if it’s loafing along with lots of resource to spare.

    Take this into a multicore, multithreaded computer system, and the same rules hold. The system is set up to keep reserve capacity available for processes that require priority over one’s own. If one tries to grab all the cores, vital processing one takes for granted will just plain come to a stop. That is bad.

    But one must be careful. I learned this lesson trying to run a monster Sim on a Stick on a USB 2.0 port, while trying to edit objects and run Flycam to maneuver my point of view around. I got screen freeze time after time, followed by a sudden jerking to wherever my delayed flycam command told the system to go. But the reason was not loafing cores or threads.

    It turned out that the bottleneck was the USB port and the lack of system cache usage for data off that port. Once I loaded the sim data onto regular disk, the system loaded it into cache, and everything flew once again. Now I reserve editing using Flycam for the disk copy of the sim. The rest works fine when I’m just walking around.

    So don’t mess with the machine to grab cores. You might be very sorry – and you might miss the real villains altogether.

    :-D

    Dana Paxson

    5 Aug 13 at 10:58 am

  2. very nice explanation Dana! (i wish i had 1/100th of that knowledge) =)

    interesting on the SoaS issue – i’ve often wondered what the “rate determining step” was for SoaS

    in your example, it sounds like a faster USB3.0 would have helped a little (especially the 3.1 super speed version) BUT even with that greater speed, the issue would still ultimately be the system cache eh?

    thanks for your wonderful insight, your words educate me and i never take that for granted =)

    Ener Hax

    6 Aug 13 at 12:08 pm

  3. Thanks, Ener! I agree about the USB 3.0/3.1 – it would have been a step or two up in speed. I don’t know where the breaking point is for SoaS, nor how to find it, nor how to derive some good guidance for avoiding it. But getting frequently-used things into main memory and keeping them there almost always produces performance benefits.

    Even after many generations of computer evolution, so much comes down to the simple act of watching the access lights flashing for the stick or the disk drive (or even the network). Lots of flashing means lots of data on the link to main memory – and so lots of extra work for the system.

    Dana Paxson

    14 Aug 13 at 8:56 am

  4. I wonder what performance advantages one could get from running OpenSim from a hybrid Intel PCIe SSD hard drive. Those things have very fast read and write speeds and good memory controllers on board too.

    http://ark.intel.com/products/67009

    http://www.intel.com/content/www/us/en/solid-state-drives/solid-state-drives-910-series.html

    Sincerely,
    Mick Scarbridge (SL).

    Mick Scarbridge

    4 Sep 13 at 6:36 am

  5. Mick, you’ve got a good point. I think it would fly fairly fast. I use SSDs on my machines now for the Windows folders and a few other things, and it makes a huge improvement to startup and shutdown times. The benefits might be pretty good.

    That said, cost becomes a factor. SSD isn’t that cheap.

    And one other thing comes up: the treatment of cache with respect to SSDs. I don’t know – would there be any difference between cache treatment of disk versus cache of SSD?

    I’d be interested in seeing how anyone with SSD is faring with Sim on a Stick.

    Best,

    Dana

    Dana Paxson

    20 Sep 13 at 3:41 pm

  6. The system I have configured for a future project is a professional workstation class system with lots of room for future upgrading. My future system will take about a year to realize, and another year or two to upgrade.

    Here is what I decided on so far, which uses a good SSD drive as the OS drive:

    Asus Z9PE-D8 WS motherboard.

    2x Intel Xeon E5-2609 2.4GHz Quad Core 10MB 80W CPUs (upgrade to 2x Intel Xeon E5-2637 V2 3.5GHz Quad Core 15MB 130W CPUs).

    Kingston 16GB DDR3-1600 REG ECC (4x 4GB) (Upgrade to 32 GB/8x 4GB).

    AMD Radeon HD 7950 3GB (Upgrade to 3x dual-gpu 7990 cards).

    ASUS Xonar Essence STX PCI-E (Studio sound card; DAW-Ready).

    Intel DC S3500 300GB SATA 6Gb/s 2.5inch SSD – Primary drive.

    Western Digital Caviar Black 4TB SATA 6Gb/s – Secondary drive.

    Asus 24x DVD-RW SATA (Black).

    Atech USB 2.0 Card Reader.

    Fractal Design Define XL R2 Titanium Grey Case (upgrade to Mountain Mods UFO2 case).

    Antec HCP-1300 Platinum 1300W Power Supply (upgrade to 1500W Silverstone unit).

    2x Corsair Hydro Series H60 CPU Cooler (Rev. 2).

    Additional Antec Chassis Fans.

    Arctic Cooling MX-2 Thermal Compound.

    Asus Dual USB and ESATA Bracket.

    Smart Drive Classic Enclosure (Silencer and cooler for WDC Black drive).

    Suse Linux Enterprise Desktop (SLED) Operating System.

    Asus VE278Q 27 Inch LCD Monitor (upgrade to triple monitors).

    Logitech G710+ Mechanical Gaming Keyboard .

    Tripp-Lite OmniVS – 1500VA, 940 Watts.

    2x Special Order Part – SATA, PCIE, RAM dust covers.

    The specs make me drool on it, especially after the preplanned upgrades. 8P~~~

    This is a system that is designed to last a minimum of 6 years of 24/7/365 usage, so I can expect about 8 years of use from it as a business owner and gamer. The company I am having build this custom beastie does thermal camera imaging to tune the cooling system for each individual system as part of their extensive 104-point testing and inspection system. They can spot bad parts before they ship, but al of this really does add up. I also loved the old mechanical switch keyboard I had before someone stole it, so the Logitech G710+ unit fits my style and love for mechanical Cherry brand switch keys.

    I would post OpenSim and multiple viewer performance stats once I get that thing delivered and setup.

    Sincerely,
    Mick Scarbridge (SL).

    Mick Scarbridge

    29 Sep 13 at 12:56 am

  7. hey Mick, fancy having someone build it for ya! that’s a lot of peace of mind – i massively lucked out that mine booted right up with no issues

    for others that are budget constrained, be like me and use PC Part Picker!

    http://pcpartpicker.com/

    my build for reference by others: http://iliveisl.com/eners-2012-opensim-pc-build-series/

    Ener Hax

    2 Oct 13 at 2:34 pm

  8. I totally prefer to build my own systems, but this time I wanted something with a good warranty and their thermal imaging camera method of tuning the PC cooling system. The thermal camera can also be used to spot a dud part before it is even shipped, and this system is also for my home business. I wanted something that could do VoIP conference calls, net surfing, watching videos, listening to music, and tinkering with OpenSim at the same time with no errors and while not exceeding 50 percent of total resource usage of any of the components. Things purchased strictly for a business can be written off as business expenses, such as the all-in-one commercial fax/printer/scanner we have.

    I like the system you put together for OpenSim. The Core i5 you chose is ideal for that purpose as it is a stable CPU design. Some peeps here in the family business use i5 CPUs in their laptops.

    I would not recommend using Ikea furniture tho because they tend to break easily after serious use. As an example, a friend of mine in another state had this “big monitor” ego thing where he always wanted the biggest monitor. As a result, his bad choice for a desk combined with his obsession for large (and heavy) monitors had caused the top part of the desk to collapse onto his tower case below it. It collapsed shortly after he had left for a trip in his car and so I called him, first asking if he was driving and suggesting he find a place to park first before telling him the bad news.

    Sincerely,
    Mick Scarbridge (SL).
    aka: Mick Daftwood (IW).

    Mick Scarbridge

    6 Oct 13 at 12:47 pm

leave a reply - add your thoughts

you can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>