LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-02-2009, 11:18 PM   #1
abhattacharya
Member
 
Registered: Jul 2007
Distribution: RHEL, Fedora, Debian, Ubuntu
Posts: 94

Rep: Reputation: 15
Unhappy how to speed up program?


Hello everybody,
i have a linux server. specification is as follows:


Form factor/height Tower/5U
Processor (max) Quad-Core Intel® Xeon Processor E5430 up
to 2.66 GHz and up to 1333 MHz front-side
bus
Number of processors (std/max) 4
L2 cache 2x6 MB (dual-core) or 2x12 MB (quad-core)
Memory1(std/max) 4 GB Fully Buffered DIMM 667 MHz
via 8 DIMM slots
Expansion slots 3 PCI-Express, 2 PCI-X and 1 PCI
Disk bays (total/hot-swap) 4/0 or 8/8 (model dependent)
Maximum internal storage 1, 2 6.0 TB hot-swap SATA, 2.4 TB hot-swap SAS, or 3.0 TB simple-swap SATA
Network interface Integrated Gigabit Ethernet
Power supply (std/max) 670W 1/1 or 835W 1/2
Hot-swap components Power supply, fans and hard disk drives
RAID support Integrated RAID-0/-1/-10, optional RAID-5


Operating system installed: Fedora 9 x86_64

I wanted to know that when i run only one program on this machine one of its four processor is used. To use all the processor i have to run 4 programs. Is it possible that for one program the process is distributed in all the 4 processor simultaneously so that the total time reduces. If it is possible then please tell me how should i do that? I mean i want parallel processing of all the processor to get faster results.


Thanx in advance
 
Old 11-02-2009, 11:50 PM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
If you run program, nobody can be sure which parts assume that they are run sequentially. Some programs are already split into parallel exuction units (sometimes threads, sometimes processes) - this is especially true for server programs like Apache. If the program is not prepared to be run by multiple processors - there is nothing you can do. For servers it is usually not relevant anyway.
 
Old 11-03-2009, 01:15 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,348

Rep: Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748
Just to point out that F9 is officially obsolete; current vers F10, F11. NB: F12 is due out soon, which means F10 will be come obsolete (no more updates).
 
Old 11-04-2009, 03:36 AM   #4
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by abhattacharya View Post
Is it possible that for one program the process is distributed in all the 4 processor simultaneously so that the total time reduces.
Well, if you, or someone else, can re-write the program in a parallizeable form (and don't take this as a trivial problem, because, in ther general case, it is anything but), then you should be able to run that form in parallel.

Otherwise, the problem is that you can't parallize the program.
 
Old 11-04-2009, 08:07 AM   #5
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by abhattacharya View Post
i have a linux server. specification is as follows:
Why are there two different choices for many of the details? Have you not yet purchased it and still have some choices?

If you are considering a new system and care a lot about performance, why is the ram 667MHz? Is this a Dell system (they tend to select slow ram, especially when selling you ECC, which I think is a bad idea)?

Quote:
I wanted to know that when i run only one program on this machine one of its four processor is used.
Have you tried it (are you asking or telling us that only one core is used)?

Quote:
Is it possible that for one program the process is distributed in all the 4 processor simultaneously so that the total time reduces.
Programs can be written such that one program can use multiple processors. Those are called multi threaded programs.

Depending on the algorithms needed inside the program, it might be a simple task for a programmer to convert a single threaded version to multi threaded or it might be nearly impossible or anywhere in between.

Depending on the algorithms needed inside the program, making the program multi threaded might greatly reduce the total time, or the multiple threads might contend so badly for the shared L2 cache and/or shared front side bus and shared slow ram that the multi threaded version takes more total time (each thread runs more than four times slower than it would alone).

If the multi threaded version runs slow having a larger L2 cache might break the contention (for ram as well as for L2 itself) and make the multi threading run dramatically faster. Or it might do nothing. That is hard to predict before trying it.

If the multi threaded version runs slow, faster ram will speed it up but at most by the factor that the ram itself is faster.
 
Old 11-04-2009, 11:45 PM   #6
abhattacharya
Member
 
Registered: Jul 2007
Distribution: RHEL, Fedora, Debian, Ubuntu
Posts: 94

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by johnsfine View Post
Why are there two different choices for many of the details? Have you not yet purchased it and still have some choices?

If you are considering a new system and care a lot about performance, why is the ram 667MHz? Is this a Dell system (they tend to select slow ram, especially when selling you ECC, which I think is a bad idea)?
I already bought the server. The specification given here is just copied from IBM site. The actual RAM in my machine is 4GB.


Quote:
Originally Posted by johnsfine View Post
Have you tried it (are you asking or telling us that only one core is used)?
Yes i have tried it and i see that for a single program only 1 processor is running and if i run four simultaneous program then only all the processor start working.


Quote:
Originally Posted by johnsfine View Post
Programs can be written such that one program can use multiple processors. Those are called multi threaded programs.

Depending on the algorithms needed inside the program, it might be a simple task for a programmer to convert a single threaded version to multi threaded or it might be nearly impossible or anywhere in between.

Depending on the algorithms needed inside the program, making the program multi threaded might greatly reduce the total time, or the multiple threads might contend so badly for the shared L2 cache and/or shared front side bus and shared slow ram that the multi threaded version takes more total time (each thread runs more than four times slower than it would alone).

If the multi threaded version runs slow having a larger L2 cache might break the contention (for ram as well as for L2 itself) and make the multi threading run dramatically faster. Or it might do nothing. That is hard to predict before trying it.

If the multi threaded version runs slow, faster ram will speed it up but at most by the factor that the ram itself is faster.

Please consider my ignorance and suggest me how to write a program in multi thread. I use to write program in fortran 77....can i do that in fortran? if yes then how?


anyway Thanks a lot for your quick reply......
 
Old 11-05-2009, 11:30 PM   #7
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555
Quote:
Originally Posted by abhattacharya View Post
...
Please consider my ignorance and suggest me how to write a program in multi thread. I use to write program in fortran 77....can i do that in fortran? if yes then how?

anyway Thanks a lot for your quick reply......
Hi there!

Please allow me to suggest that if you plan to engage in further discussion of how to write a multi-threaded program in Fortran (or any other language, for that matter) kindly start a new thread in the "Programming" forum, as such a topic would not really belong in the "Server" forum; plus, you would get better exposure to other programmers, in the "Programming" forum. If you wish, you could leave a link here, directing interested people to your new thread once it's created (probably a good idea).

Kind regards,

Sasha
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get ethernet speed in your program frostecheg Linux - Kernel 0 12-09-2008 06:49 AM
how to manage memory to speed up my program eep6sa1@ucy.ac.cy Programming 11 11-27-2008 08:25 AM
Which program or module controls fan speed? johnsfine Linux - Hardware 5 02-24-2008 08:46 AM
Speed reading program fadelhomsi Linux - Software 3 11-25-2006 05:47 AM
Need benchmark program which displays bus speed. Arodef Linux - Software 2 07-15-2004 05:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:12 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
Open Source Consulting | Domain Registration