OK, so what software handles multi-threading?

Posted:
in Mac Software edited January 2014
So everybody's got a Core2 Duo, or even a quad core or octo core machine these days, right? But what for? Because how many, and which, apps can actually take advantage of multi core processing? Can you list them? I can't. And afaik there are pitifully few applications coded for multi threading. That's borne out if you have a look at a temperature widget for your machine. It will show you the temp in your cores, and you may notice that one core is nicely at working temperature while the other(s) is/are considerably lower temperatures. That's because they're not doing anything! They're hardly ever called upon. They're literally not breaking a sweat. Practically everything is processed by just one core!



So IRL multicore processors are waaay overkill for 99% of people's requirements! Yet we all paid for them...

Comments

  • Reply 1 of 8
    akacakac Posts: 512member
    Well, sure.



    OS X itself (kernel, AppKit)

    Anything using Cocoa networking is automatically multi-threaded.

    Mail

    Safari

    iChat

    iTunes

    VmWare

    XCode

    Photoshop

    Finder



    In fact, almost any app that is written is multi-threaded by its nature of being a Cocoa app because the framework itself uses multi-threading behind the scenes for nearly everything. And you can almost guarantee any app that uses networking is written specifically to be multi-threaded as well. And actually a LOT of apps use NSOperation which is a way of getting multi-threaded good-ness automatically by breaking off operating into threads. Anything using QuickTime, Core Video, Core Audio, Core Image. Need we go on?



    But the fact is - you don't know need to know. All that's important is that the app works quickly and does its job. As a developer, I don't sell my app based on the fact that its multi-threaded. Hardly anyone but very processor intensive apps do.



    Does that help?
  • Reply 2 of 8
    MarvinMarvin Posts: 14,834moderator
    Quote:
    Originally Posted by Rokcet Scientist View Post


    So IRL multicore processors are waaay overkill for 99% of people's requirements! Yet we all paid for them...



    It depends on what apps you run. Even if you don't have any that use multiple cores themselves, the fact that you run multiple apps at once is enough to use two cores. If you encode a movie for example in the background for an hour and it uses one CPU core, you can still use your machine as normal but a single core machine would be out of action until it finished. They are way better for load-balancing. I used a single core machine recently and even watching Flash video, it chokes up and stutters.



    I would say that anything above 2-core is overkill for most people - I wouldn't say 99% but a majority. However, some people will always need to do intensive things like encode a video, transcode an XDCam, HDV or AVCHD, batch compress photos, render image and movie filters, author DVD and Blu-Ray and the closer to instantaneous all those things get, the better the user experience gets.



    It's a false assumption that if you use less that getting less would be cheaper. If Intel make a chip with 16 cores for $284, you can't assume that a chip with 1 would only cost $18 to make. The cost is in the fabrication. They just scale the price according to how good they perform.



    The is the option of a lower performance Celeron and I've said in the past they would suffice for a lot of people and would knock about $200 off the cost of a Mac but those chips do cheapen brands as do Atom ones. Overall, dual core chips are not under-utilized by the majority of people, they greatly enhance the experience.
  • Reply 3 of 8
    Quote:
    Originally Posted by Akac View Post


    Well, sure.



    OS X itself (kernel, AppKit)

    Anything using Cocoa networking is automatically multi-threaded.

    Mail

    Safari

    iChat

    iTunes

    VmWare

    XCode

    Photoshop

    Finder



    In fact, almost any app that is written is multi-threaded by its nature of being a Cocoa app because the framework itself uses multi-threading behind the scenes for nearly everything. And you can almost guarantee any app that uses networking is written specifically to be multi-threaded as well. And actually a LOT of apps use NSOperation which is a way of getting multi-threaded good-ness automatically by breaking off operating into threads. Anything using QuickTime, Core Video, Core Audio, Core Image. Need we go on?



    But the fact is - you don't know need to know. All that's important is that the app works quickly and does its job. As a developer, I don't sell my app based on the fact that its multi-threaded. Hardly anyone but very processor intensive apps do.



    Does that help?



    I've got a hard time imagining how Mail, Safari, iChat, and iTunes would benefit from multi-threading. And if my VMware running Win7 was multi-threaded then I was decidedly less than impressed! It ran like molasses.



    The only applications in your summing up that I can see benefiting from multithreading are Photoshop and Finder.
  • Reply 4 of 8
    bbwibbwi Posts: 812member
    Quote:
    Originally Posted by Rokcet Scientist View Post


    I've got a hard time imagining how Mail, Safari, iChat, and iTunes would benefit from multi-threading. And if my VMware running Win7 was multi-threaded then I was decidedly less than impressed! It ran like molasses.



    The only applications in your summing up that I can see benefiting from multithreading are Photoshop and Finder.



    By default, VMware does not use multiple CPUs. You need to configure this manually. Also, the "molasses" effect probably has more to do with the amount of RAM allocated to the VM and the hard disk not being able to keep up with two OSes. You'll see dramatic improvements in speed if you put the VM on a separate HD
  • Reply 5 of 8
    akacakac Posts: 512member
    Quote:
    Originally Posted by Rokcet Scientist View Post


    I've got a hard time imagining how Mail, Safari, iChat, and iTunes would benefit from multi-threading. And if my VMware running Win7 was multi-threaded then I was decidedly less than impressed! It ran like molasses.



    The only applications in your summing up that I can see benefiting from multithreading are Photoshop and Finder.



    Pretty simply. Mail benefits by being able to have multiple connections to a single server or multiple servers. Do you like downloading an attachment while continuing to read mail? That's multi-threading. Or the fact that Mail can connect to a server with multiple connections to get updated data on the folders in IMAP instead of doing it one at a time. Or how about sending an email while reading/emailing?



    Safari would be very very slow if it wasn't multi-threaded. Look at the activity monitor and watch how opening just one web page connects and grabs a ton of stuff from the webserver. That's multi-threading. How about opening multiple tabs? Downloading multiple files? All multi-threading. Most of it isn't CPU intensive, but some of it is. How about opening multiple pages with lots of 3D, video, Flash?



    Same with iChat. iTunes - playing an audio file while ripping or burning a CD? Multi-threading.



    VMWare is multi-threaded - it has to be. GUI thread and background kernel thread. Plus VMWare runs near 95% the speed of a native OS when configured correctly (its configured conservatively by default). #1 reason for slow VMWare is people giving it way too much memory. If you're giving Win7 in VMWare more than 512MB of RAM on a 2GB machine or 768MB on a 4GB machine, you're in for slow usage.



    Multi-thread != fast. Multi-thread means that it can do many things at once and when you have mutli-core or multi-CPU then it can truly run things simultaneously. A lot of time this does mean things run faster because instead of waiting for one thing to finish before starting the next task it can run them simultaneously (i.e. the idea of downloading two files at once - without multi-thread you'd have to wait for file 1 to finish downloading before file 2 started).



    But it can also mean things run slower if you have lots of threads doing things all at once and not enough cores to handle the threads. Since nearly everything on the Mac now is multi-threaded and multi-core aware and with SL optimized for multi-core, the more cores the better.
  • Reply 6 of 8
    erunnoerunno Posts: 225member
    Pretty much every GUI application in existence has to use several threads in order to avoid the user interface from blocking while it's doing some intense calculations. Note that using several threads does not mean that all threads do an equal amount of work. Partitioning work so that all threads have a maximal workload is still the tedious work of every developer. It's usually also not necessary. Most GUI applications idle and wait for user input. They can do nothing with 1 core as well as with 16 cores. . Someone once told me that some CPUs go into a power saving mode between key strokes if nothing else is to be done.
  • Reply 7 of 8
    bbwibbwi Posts: 812member
    Quote:
    Originally Posted by Erunno View Post


    Someone once told me that some CPU's go into a power saving mode between key strokes if nothing else is to be done.



    This is a new feature called "Core Parking". Win 7 and Server 2008 R2 are the only OSes that support this
  • Reply 8 of 8
    amoryaamorya Posts: 1,103member
    Open Activity Monitor and look at the Threads column.



    Aside from some behind the scenes services, the only app that I'm running that isn't multithreaded is TextEdit. Safari's using 23 threads. Omniweb 18. Finder 17. Photoshop 12. Mail 11. You get the gist.



    Amorya
Sign In or Register to comment.