Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Processor or Memory

by zek152 (Pilgrim)
on Jul 19, 2011 at 13:17 UTC ( [id://915442]=note: print w/replies, xml ) Need Help??


in reply to Reaped: Processor or Memory

As has been mentioned frequency has leveled off. CPU companies (read AMD,Intel, and even ARM to some degree) are using multiple cores to increase performance. However many programs, even though they use multiple threads, are not written to take advantage of the 2,4,6,8 cores seen in modern CPUS.

You asked if it was more important to optimize code for CPU or for memory. Both are important but the greatest gain will come from writing applications that can take advantage of the increasingly parallel architecture that is the future for processors. And of course, compilers,interpreters and virtual machines still need to "catch up".

Replies are listed 'Best First'.
Re^2: Processor or Memory
by Logicus (Initiate) on Jul 19, 2011 at 13:35 UTC
    Apache2 is multi-threaded, AFAIK, when a request is received it spawns off a new thread which the O/S then schedules on any available core.

      Yes. Apache2 is multi-threaded. However that does not mean that it is optimized for multiple-cores. I can't comment on Apache2 but I do know that often there is an overhead to using a different core (because of memory transfers etc.)

      There has been a lot of progress made in the last few years in getting more use out of those multiple cores. An interesting project is http://openmp.org/wp/about-openmp/. I belive that gcc 4.3.2 has support for some of the pragmas with the -fopenmp option.

      Managing resources across cores is a relatively new challenge and will require new ways of programming to conquer.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://915442]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (9)
As of 2024-04-16 09:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found