LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Multi Processor - How to utilize it efficiently? (https://www.linuxquestions.org/questions/linux-general-1/multi-processor-how-to-utilize-it-efficiently-487775/)

bence8810 09-28-2006 03:04 PM

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

Brian1 09-28-2006 03:33 PM

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

bence8810 09-30-2006 06:52 AM

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.

Brian1 09-30-2006 11:06 AM

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

bence8810 09-30-2006 09:28 PM

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

bence8810 10-03-2006 03:37 AM

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

bence8810 10-15-2006 03:12 PM

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


All times are GMT -5. The time now is 08:08 PM.