Operating System - Linux
1753543 Members
5376 Online
108795 Solutions
New Discussion юеВ

Diffrence b/w 1 processor and 4 processor server

 
Amber Goel
Occasional Contributor

Diffrence b/w 1 processor and 4 processor server

Hi,

Recently i migrate one application from HP-UNIX L1000 single processor server to HP-UNIX rp3440 4 processor server.
Apllicaction was succsfully migrated. Now i want to take the advantage of 4 processor server. Will i need to change the code to shere the application load on diff processors at run time.
Please give me your suggestions in this regards.
8 REPLIES 8
Dennis Handly
Acclaimed Contributor

Re: Diffrence b/w 1 processor and 4 processor server

You'll need multiple processes or threads to take advantage of more CPUs.
Amber Goel
Occasional Contributor

Re: Diffrence b/w 1 processor and 4 processor server

My application is using socket programming Eather net , X.25 and unix inter sockets. I am not using any thereding concept. My Application is like one exe read data from one socket and worite that data into messege queue , verious other exe continouly pooling on that queue. According to the Messege type other program read data from q and procss it. I want to imporve this proformence. I installed Sybase 15.0 also on the same server.
Dennis Handly
Acclaimed Contributor

Re: Diffrence b/w 1 processor and 4 processor server

If you already have multiple executables, you need to find where you are spending the time. Does top(1) show any using 100% of a CPU?
Summing up all of your executables, are you using 100% of all 4 CPUs?
Are you optimizing your applications? What language(s) is it using?
Amber Goel
Occasional Contributor

Re: Diffrence b/w 1 processor and 4 processor server

In normal case processors are not bussy more then 40%. This is a real time application so verious exe's have to continouly poollin on database , sockets and queues. I am using C and sybase 15.0.
Hein van den Heuvel
Honored Contributor

Re: Diffrence b/w 1 processor and 4 processor server


>> In normal case processors are not bussy more then 40%. This is a real time application so verious exe's have to continouly poollin on database , sockets and queues. I am using C and sybase 15.0.

Then there is no big usage / throughput advantage for more than 1 CPU.

The extra cpus MAY be helping to give better reponse time.

As you already have multipel processes, the HPUX scheduler will already schedule them on the first available CPU unless it is being told otherwise (processor sets, mpsched).

Just verify with the 'top' command.
In the first column you'll see the last cpu used for a given process. Surely this will show all 4, proving SMP is trying to help, not just 0.

And uh... kudos to the salesman!
I hope the right expectations (low) were set.

Cheers,
Hein.
Dennis Handly
Acclaimed Contributor

Re: Diffrence b/w 1 processor and 4 processor server

>Hein: Then there is no big usage / throughput advantage for more than 1 CPU.

Are you sure? If all are at 40%: 4 * 40% == 1.6 CPUs.

>The extra CPUs MAY be helping to give better response time.

They can also do other work, run another application.
Hein van den Heuvel
Honored Contributor

Re: Diffrence b/w 1 processor and 4 processor server

Dennis> Hein: Then there is no big usage / throughput advantage for more than 1 CPU.
Dennis> Are you sure? If all are at 40%: 4 * 40% == 1.6 CPUs.

Yes. Of course. If that 40% was for all 4 CPUs then obviously the application already have a benefit from the extra cpu: Any uage above 25% goes without saying, and any usage above 20% also has a good chance of being aided as is likely to indicate concurrent usage.

I just assumed 40% of 1 CPU because of original question itself. If you see more than 1 cpu worthe being used then why as teh question in the first place.

Grins,
Hein.

rick jones
Honored Contributor

Re: Diffrence b/w 1 processor and 4 processor server

When you look at that output of top (or glance if you have it) if indeed the 40% is overall CPU util over 4 processors, you will probably see your one main process at 100% CPU utilization. In the per-CPU stats at the top (of top) you will also see a single CPU at 100% and several of the other CPUs at < 100%.

A process not using threads cannot take advantage of the services of more than one CPU. If that process is then showing 100% CPU util in top/glance that means it is using as much CPU as it possibly can, and unless you can split it into multiple processes, or rewrite it to use multiple threads within the one process, that is as far as things are going to go.

If you want to start considering threading, I believe you should still be able to obtain a copy of a book titled "Threadtime" by Norton et al, who were/are the threads experts for pthreads on HP-UX. Otherwise, you might just look at the pthreads related manpages or other sources of pthread documentation.
there is no rest for the wicked yet the virtuous have no pillows