The Artima Developer Community
Sponsored Link

Java Community News
Choosing Dual or Quad Core

23 replies on 2 pages. Most recent reply: Sep 16, 2007 11:52 PM by Jeroen Wenting

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 23 replies on 2 pages [ 1 2 | » ]
Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Choosing Dual or Quad Core Posted: Sep 4, 2007 11:16 AM
Reply to this message Reply
Summary
In a recent blog post, Jeff Atwood highlights experiments of major commercial software packages running on dual- and quad-core CPUs, and notes that most software doesn't yet benefit from CPU cores beyond two.
Advertisement

While quad or eight-core CPUs are becoming common in server-class machines, Jeff Atwood notes in a recent blog post, Choosing Dual or Quad Core, that most of the time, CPU cores beyond two do very little. Atwood cites two experiments of running commonly available software on systems with more than two CPU cores, and notes that relatively few commercial software packages benefit from CPU cores beyond two:

For most software, you hit a point of diminishing returns very rapidly after two cores...

The results seem encouraging, until you take a look at the applications that benefit from quad-coreā€”the ones that aren't purely synthetic benchmarks are rendering, encoding, or scientific applications. It's the same old story. Beyond encoding and rendering tasks which are naturally amenable to parallelization, the task manager CPU graphs tell the sad tale of software that simply isn't written to exploit more than two CPUs...

However, there were some surprises in here, such as Excel 2007, and the Lost Planet "concurrent operations" setting. It's possible software engineering will eventually advance to the point that clock speed matters less than parallelism. Or eventually it might be irrelevant, if we don't get to make the choice between faster clock speeds and more CPU cores. But in the meantime, clock speed wins most of the time. More CPU cores isn't automatically better. Typical users will be better off with the fastest possible dual-core CPU they can afford.

Atwood refers to tests of common desktop-class software, and did not include database or application servers. Even in the desktop category, he failed to mention Web browsers that can benefit from parallelism when asynchronously fetching content.

Still, Atwood's point is that very few software packages today take advantage of cores beyond two. If you are not working on application or database servers, how do you plan to take advantage of multi-core CPUs in your applications?


Bill Pyne

Posts: 165
Nickname: billpyne
Registered: Jan, 2007

Re: Choosing Dual or Quad Core Posted: Sep 4, 2007 12:37 PM
Reply to this message Reply
My comment is going to be more from the perspective of a user of desktop applications than a developer. Rarely do I pin the cpu even on a single cpu system. More commonly I get pauses (the spinning beach ball on Mac OS X or the comatose system on Windows XP) from high disk activity. Multi-cores are currently the latest, sexy topic in IT, but I think we'd see much better performance from a solution to the disk crunching that occurs on every desktop I've worked on (Windows, Linux, Mac).

Ronald Tetsuo Miura

Posts: 22
Nickname: ronaldtm
Registered: Jan, 2004

Re: Choosing Dual or Quad Core Posted: Sep 4, 2007 12:57 PM
Reply to this message Reply
If you benchmark using only one application, the results probably won't indicate much improvement, but what happens if you play a video, while browsing the net and work with photoshop at the same time?

Each app alone may not be made to use parallelism power, but if you mix them in the same environment (a pretty common scenario, I guess), the operational system should allocate one app per core, and the gains will not be shown in raw performance, but in system scalability, letting users to run many apps concurrently without impact on overall performance.

Is my thinking valid?

Bill Pyne

Posts: 165
Nickname: billpyne
Registered: Jan, 2007

Re: Choosing Dual or Quad Core Posted: Sep 4, 2007 1:17 PM
Reply to this message Reply
> If you benchmark using only one application, the results
> probably won't indicate much improvement, but what happens
> if you play a video, while browsing the net and work with
> photoshop at the same time?

Playing a video while browsing and working in Photoshop would indeed be CPU intensive, but is it realistic? I'm not trying to be flippant, I just don't understand how someone would simultaneously do all three. I could understand if you're talking about a server that multiple people are simultaneously demanding services of.

The most I ever do on my laptop is listen to music while coding in Eclipse with an email client and IM client running in the background. This combination of four never come close to pinning the CPU. A lot of time I'll shutdown the IM client simply because it becomes a distraction when I'm thinking out particularly difficult bits of code.

I could see high end video production editors having to edit multiple clips in different windows or video game designers having multiple game windows running in parallel. I would hazard a guess that they cover less than 1% of all desktop users.

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: Choosing Dual or Quad Core Posted: Sep 4, 2007 1:44 PM
Reply to this message Reply
> > If you benchmark using only one application, the
> results
> > probably won't indicate much improvement, but what
> happens
> > if you play a video, while browsing the net and work
> with
> > photoshop at the same time?
>
> Playing a video while browsing and working in Photoshop
> would indeed be CPU intensive, but is it realistic? I'm
> not trying to be flippant, I just don't understand how
> someone would simultaneously do all three. I could
> understand if you're talking about a server that multiple
> people are simultaneously demanding services of.
>
> The most I ever do on my laptop is listen to music while
> coding in Eclipse with an email client and IM client
> running in the background. This combination of four never
> come close to pinning the CPU. A lot of time I'll shutdown
> the IM client simply because it becomes a distraction when
> I'm thinking out particularly difficult bits of code.

Especially for those of us running windows, the real cpu hog is security software. McAfee routinely pins my CPU at the most inconvenient times. But at this point, dual-core would hopefully help with that issue. I still probably wouldn't see much help from 4 cores.

On the server side, I'm generally working with 4 - 13 core systems so this isn't really anything new from an application perspective.

nes

Posts: 137
Nickname: nn
Registered: Jul, 2004

Re: Choosing Dual or Quad Core Posted: Sep 4, 2007 2:09 PM
Reply to this message Reply
Give it time. Multi-core processors are available but not widespread on the desktop yet. As people upgrade to multicore CPUs we will see big and resource-hungry applications being slowly rewritten to take advantage of the available hardware. I am sure Microsoft will find a way to use up one third of your CPU cores in the next version of Windows :).

Bill Pyne

Posts: 165
Nickname: billpyne
Registered: Jan, 2007

Re: Choosing Dual or Quad Core Posted: Sep 4, 2007 5:53 PM
Reply to this message Reply
> Especially for those of us running windows, the real cpu
> hog is security software. McAfee routinely pins my CPU at
> the most inconvenient times. But at this point, dual-core
> would hopefully help with that issue. I still probably
> wouldn't see much help from 4 cores.
>
> On the server side, I'm generally working with 4 - 13 core
> systems so this isn't really anything new from an
> application perspective.

Messy housekeeping and background processes tend to suck up a lot of CPU cycles nowadays. In the future, with more media content coming across the internet, extra CPU's would be helpful. For right now, my largest bottleneck is disk I/O. I run auto-update for all my software and downloads always seem to occur right when I want to work. Also, I can't work on my system when a full viral scan is running. I'd like to see multi-controller systems with separate buses to the CPU's or flash memory or anything that alleviates the spinning beach ball! (Maybe a home SAN?)

My old laptop with XP going comatose for minutes at a time without any notification of what was going on caused me to go Mac. Things are better but still not perfect in Mac land. I just upgraded from 500M of RAM to 2G, so hopefully there'll be less beach ball. I'm convinced all my ills are disk I/O, not CPU.

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: Choosing Dual or Quad Core Posted: Sep 4, 2007 8:12 PM
Reply to this message Reply
> My old laptop with XP going comatose for minutes at a time
> without any notification of what was going on caused me to
> go Mac. Things are better but still not perfect in Mac
> land. I just upgraded from 500M of RAM to 2G, so hopefully
> there'll be less beach ball. I'm convinced all my ills are
> disk I/O, not CPU.

I find that most computers are sold with a cpu that is too fast for the disk and ram. I agree that most performance issues these days are io based. I went for a slower cpu and more ram with a smaller but faster disk. I'm pretty happy with what I've got.

One of the issues on Windows (at least XP and NT versions) is that it's too aggressive with paging. This is a really big problem for Java apps, in my experience.

Jeff Ratcliff

Posts: 242
Nickname: jr1
Registered: Feb, 2006

Re: Choosing Dual or Quad Core Posted: Sep 4, 2007 9:32 PM
Reply to this message Reply
> Give it time. Multi-core processors are available but not
> widespread on the desktop yet. As people upgrade to
> multicore CPUs we will see big and resource-hungry
> applications being slowly rewritten to take advantage of
> the available hardware. I am sure Microsoft will find a
> way to use up one third of your CPU cores in the next
> version of Windows :).

I think it remains to be seen if there's a business case to be made for rewriting applications for multiple cores. I think the real-world performance improvement is not yet known and these re-writes could end up being very expensive.

Perhaps Intel and AMD should pay developers to do it.

Steven E. Newton

Posts: 137
Nickname: cm
Registered: Apr, 2003

Re: Choosing Dual or Quad Core Posted: Sep 5, 2007 12:59 AM
Reply to this message Reply
1. For a couple of years now I've joke haha-only-serious about Windows needing at least 2 CPUs. One to run whatever program you are actually using while the other runs the virus scanner and other software to protect the OS from a malware meltdown.

2. As a software developer, most of my work consists of open/reading/writing/closing thousands of tiny files in rapid succession. I always peg the disk I/O long before the CPU gets going. I tried to explain this once to a bunch of IT procurement drones who wanted everyone to have a laptop with a top-end CPU but a horrible disk subsystem.

3. It's a known reproducible bug in Vista that listening to music while doing a local network transfer over a highspeed (gigabit ethernet) link will throttle the net throughput to 10%.

Bill Pyne

Posts: 165
Nickname: billpyne
Registered: Jan, 2007

Re: Choosing Dual or Quad Core Posted: Sep 5, 2007 6:08 AM
Reply to this message Reply
> One of the issues on Windows (at least XP and NT versions)
> is that it's too aggressive with paging. This is a really
> big problem for Java apps, in my experience.

One of the apps that consistently made my old XP system comatose was Eclipse. If it was idle for a while, bringing it out of dormancy would effectively stop use of the system until it was finished. My guess is it had to do with the JVM; I think I even read a article about it a few years back.

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: Choosing Dual or Quad Core Posted: Sep 5, 2007 7:24 AM
Reply to this message Reply
> > One of the issues on Windows (at least XP and NT
> versions)
> > is that it's too aggressive with paging. This is a
> really
> > big problem for Java apps, in my experience.
>
> One of the apps that consistently made my old XP system
> comatose was Eclipse. If it was idle for a while, bringing
> it out of dormancy would effectively stop use of the
> system until it was finished. My guess is it had to do
> with the JVM; I think I even read a article about it a few
> years back.

Don't take this as authoritative, but anecdotally, what appears to happen is that the JVM will not release memory back to the OS in a timely manner (on purpose). The idea being that if you have used that much memory in the past, you will probably need it again. The problem is that Windows will page this unused heap to disk (I think) based on an LRU algorithm. So when your app does need more memory, instead of allocating it from the OS, it's restoring the empty heap space from the page file.

In short, you are paging garbage to and from disk. I don't really completely blame microsoft for this. I think that sun and other JVM writers need to add an option to release unused heap immediately on Windows. Maybe a CLR based Java would be better on Windows. On the other hand, Windows pages to disk when there is a GB of RAM available.

The other problem with apps like eclipse is that unless you tell McAfee and other virus scanners not to, each of it's bazillion jars are scanned on access.

Bill Pyne

Posts: 165
Nickname: billpyne
Registered: Jan, 2007

Re: Choosing Dual or Quad Core Posted: Sep 5, 2007 7:55 AM
Reply to this message Reply
> Don't take this as authoritative, but anecdotally, what
> appears to happen is that the JVM will not release memory
> back to the OS in a timely manner (on purpose). The idea
> being that if you have used that much memory in the past,
> you will probably need it again. The problem is that
> Windows will page this unused heap to disk (I think) based
> on an LRU algorithm. So when your app does need more
> memory, instead of allocating it from the OS, it's
> restoring the empty heap space from the page file.
>
> In short, you are paging garbage to and from disk. I
> don't really completely blame microsoft for this. I think
> that sun and other JVM writers need to add an option to
> release unused heap immediately on Windows. Maybe a CLR
> based Java would be better on Windows. On the other hand,
> Windows pages to disk when there is a GB of RAM
> available.
>
> The other problem with apps like eclipse is that unless
> you tell McAfee and other virus scanners not to, each of
> it's bazillion jars are scanned on access.

That makes sense and I don't blame Microsoft at all for the paging. If I remember correctly (always a question mark) from "Modern Operating Systems 2nd Edition", from Win2K on, Windows provides 4G of memory per process. 2.1G is actually a copy of the OS with certain tables' data changed to be specific to the process, but that still leaves 1.9G available to the process. With all the processes running on a modern pc, aggressive paging would be necessary.

My weekly full system scans with NAV take an enormous amount of time due to jars. I have to run it at 2am so that it finishes by the time I want to use the laptop. Recently I purged my disk of the Sun App server and NetBeans which seems to have cut down some of the scan time. Keeping to topic, I don't think a 2, 4, 8, (infinity)-way system would make much of a difference in my case.

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: Choosing Dual or Quad Core Posted: Sep 5, 2007 8:16 AM
Reply to this message Reply
> That makes sense and I don't blame Microsoft at all for
> the paging. If I remember correctly (always a question
> mark) from "Modern Operating Systems 2nd Edition", from
> Win2K on, Windows provides 4G of memory per process. 2.1G
> is actually a copy of the OS with certain tables' data
> changed to be specific to the process, but that still
> leaves 1.9G available to the process. With all the
> processes running on a modern pc, aggressive paging would
> be necessary.

Maybe I'm misunderstanding you but I still don't get why Windows will page, say 100MB from a process when there is 1 GB of free RAM available.

The explanations I have heard are that the idea is to allow programs to be rapidly loaded into RAM by not having to page out before doing so. But I find it annoying that I have to deal with poor performance because something 'might' happen (that usually never does occur.) I've watched how Linux or Solaris manages this and it will use pretty much all RAM as needed. I'm pretty sure this is not a general requirement.

Bill Pyne

Posts: 165
Nickname: billpyne
Registered: Jan, 2007

Re: Choosing Dual or Quad Core Posted: Sep 5, 2007 8:37 AM
Reply to this message Reply
> Maybe I'm misunderstanding you but I still don't get why
> Windows will page, say 100MB from a process when there is
> 1 GB of free RAM available.
>
> The explanations I have heard are that the idea is to
> allow programs to be rapidly loaded into RAM by not having
> to page out before doing so. But I find it annoying that
> I have to deal with poor performance because something
> 'might' happen (that usually never does occur.) I've
> watched how Linux or Solaris manages this and it will use
> pretty much all RAM as needed. I'm pretty sure this is
> not a general requirement.

Sorry, I went onto a theoretical tangent and didn't address the specific problem you mentioned. I don't have my copy of MOS handy, so I can't check and see if Prof. Tanenbaum addresses this issue. If the explanation you've heard is accurate, it seems like shaky reasoning. I'll have to think about that one for a little longer.

Flat View: This topic has 23 replies on 2 pages [ 1  2 | » ]
Topic: Sun Releases NetBeans IDE 6.0 Beta Previous Topic   Next Topic Topic: BeansBinding 1.0 Defines Data Binding Standard for Swing

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use