LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-28-2006, 03:04 PM   #1
bence8810
Member
 
Registered: Nov 2004
Location: Budapest, Hungary
Distribution: Debian
Posts: 110

Rep: Reputation: 15
Multi Processor - How to utilize it efficiently?


Hi all,

I have purchased an old Netfinity 5500 M20, and quickly upgraded to 4 CPUs and 1,5GB Ram. I would like to get the most out of it, and I would like to get a few websites hosted on it once I place it in a server-farm.

I am familiar with Apache, MySQL, PHP, etc, so the setup will not be a problem, but I only had single CPUd machines. My questions is how am I going to take advantage of the Multi CPU environment?

Do I need to set anything, or Debian (my distro) will just balance the load automatically?

I have gotten my kernel compiled, and now all 4 CPUs are in use. There is a smart led display on the front of the server, which shows all CPUs, and blinks when one is in use. Usually CPU #3 and #4 are blinking the most and I am wondering why.

Thanks ahead for the answers,

Cheers

Ben
 
Old 09-28-2006, 03:33 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 62
Some apps you can force to certain cpus but for the most part the kernels smp feature will juggle the apps across the cpus. If you really want to see it work hard build a kernel. If you have something like gkrellm showing the processor usage and build a kernel with just the ' make ' command it will build one item on one processor and then the next on the second and so forth but using one at a time. To speed things up and to have the make command not wait for one to finish to start a new one use the cammand as so ' make -j8 ' Now all cpus will be used at one time doing 4 task at a time and as so as one is finished the next one is ready to go. Done it before but current use -j4 since current systems are dual amd. On a single cpu use -j2, it is just a bit faster but going more than 2 per cpu may cause it to be slower. Had a quad amd opt and sure was fun doing kernel builds.

Brian1
 
Old 09-30-2006, 06:52 AM   #3
bence8810
Member
 
Registered: Nov 2004
Location: Budapest, Hungary
Distribution: Debian
Posts: 110

Original Poster
Rep: Reputation: 15
Hi

Thanks for your explanation. So basically I am good to go with just my SMP compiled kernel, and the kernel will decide what process should run on what CPU, and distribute the load. I thought I had to specify what to run on which CPU, etc. My imagination was that I will assign one CPU to MySQL, one to Apache for example, and I can then still have 2 processors free for the machine and for other tasks.

I dont quite understand what you explain in the later part of your message, about the "make" command building one thing on only one CPU, etc. When I build a kernel (Debian Way), I just use make-kpkg --initrd --revision:1 kernel_image

Should I be doind something else?

Thanks

Ben

p.s. If anyone has any other ideas what can be achieved with 4CPUs and what is fun, let me know.
 
Old 09-30-2006, 11:06 AM   #4
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 62
The SMP takes care of it all for you. The other part was if you wanted to dediacte a single command to all processors. It was an example that if you compile your kernel that it will go faster using ' make -j8 ' than using just ' make '. This only applies to kernel building.

Brian1
 
Old 09-30-2006, 09:28 PM   #5
bence8810
Member
 
Registered: Nov 2004
Location: Budapest, Hungary
Distribution: Debian
Posts: 110

Original Poster
Rep: Reputation: 15
Hi

Okay, got it finally. I will try to compile my own kernel and measure the time it takes.

I have now another question. My friend also has this server, and his CPUs just came in from the order. Now 3 CPUs are Stepping 3 and one is Stepping 2. Is there any major differences between the two kinds? We did realize that the LEDs on the front of the machine behave differently, the one with the Stepping 2 is always on, and the other 3 are blinking depending on the usage.

All 4 CPUs are exact same MHz, and same Cache, 500Mhz, 512KB cache.

Could you explain about this?

Thanks

Ben
 
Old 10-03-2006, 03:37 AM   #6
bence8810
Member
 
Registered: Nov 2004
Location: Budapest, Hungary
Distribution: Debian
Posts: 110

Original Poster
Rep: Reputation: 15
Hi

Just to report back, compiling a kernel with "make -j8" really does make a difference. Great stuff, thanks for letting me on this little but very useful information.

Cheers

Ben
 
Old 10-15-2006, 03:12 PM   #7
bence8810
Member
 
Registered: Nov 2004
Location: Budapest, Hungary
Distribution: Debian
Posts: 110

Original Poster
Rep: Reputation: 15
Does anyone have experience with running different level of Stepping CPUs in the same server? Please read my post two above for further explanations.

Thanks

Ben
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can two process can be scheduled in two different processor in multi processor ? bishalpoudyal Programming 4 08-31-2006 02:22 PM
Xwindows hangs with multi processor buservt Linux - General 2 06-11-2005 09:16 AM
Multi Processor System? ssnkumar Linux - Software 3 04-02-2004 03:44 AM
Multi Processor system? ssnkumar Linux - General 3 04-02-2004 03:43 AM
Multi processor operating systems norfarm Linux - General 5 08-21-2002 05:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration