Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 08-31-2004, 06:33 PM   #1
Da Moose
LQ Newbie
Registered: Aug 2004
Posts: 2

Rep: Reputation: 0
Compiled Programs tops out at 30% CPU

Fairly new to Linux so any help here is appreciated.

I have a program that I'vewritten in C/C++ (an ugly bastardization of the two) that is numerically intensive. I've written it on my laptop (IBM T41, Mandrake 10.0, Centrino 1600). It used a couple of libraries including the GNU scientific one and OPT++. Run it on this and it hums along at 98-99% CPU usage.

My department has a linux server that I'd like to be able to use. It has 4 processors. Each is faster than mine. 3 GB RAM. Red hat. Should fly there right? Nope. I ftp the compiled program there and it will only hit about 30% CPU usage when I check using top. Nothing else running. Not 30% of all processors as it lists each seperately (as far as I can tell at least). Figure fine. Probably because I compiled on a Centrino. Recompile all the libraries. Upload my source. Recompile. Exactly the same. Still going along at less than 30% CPU usage.

So as of now I'm stumped. Any ideas why? Things to try? Something I'm doing wrong?

Thanks for any help.
Old 08-31-2004, 06:35 PM   #2
Senior Member
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
Edit: Even 25% of one processor doesnt make sense. nm...

Last edited by Proud; 08-31-2004 at 06:36 PM.
Old 08-31-2004, 06:45 PM   #3
Da Moose
LQ Newbie
Registered: Aug 2004
Posts: 2

Original Poster
Rep: Reputation: 0
Not sure exactly what you're saying here.

I haven't enable message passing or anything fancy so the best I should get is 100% of one processor. Not even getting that.

Here's a snapshot from top. My program is DSGE. I have two instances running.

  7:42pm  up 8 days,  8:56,  6 users,  load average: 2.00, 2.00, 1.90
72 processes: 71 sleeping, 1 running, 0 zombie, 0 stopped
CPU0 states: 19.0% user,  3.4% system, 19.4% nice, 76.2% idle
CPU1 states:  2.0% user,  1.0% system,  2.2% nice, 96.3% idle
CPU2 states:  1.0% user,  0.1% system,  1.0% nice, 98.4% idle
CPU3 states: 19.0% user,  1.2% system, 19.1% nice, 79.2% idle
Mem:  3615404K av, 3056404K used,  559000K free,       0K shrd,   96092K buff
Swap:  522072K av,    5212K used,  516860K free                 1784296K cached

14588 ssmyth    19  19  378M 378M  1276 D N  23.7 10.7  69:46 DSGE
  464 ssmyth    16  10  460M 460M  1256 D N  23.5 13.0   8:17 DSGE
    8 root       9   0     0    0     0 SW    0.7  0.0  87:53 kscand
  974 root       9   0   432  400   308 S     0.1  0.0   2:20 syslogd
    1 root       9   0   248  224   192 S     0.0  0.0   0:20 init
    2 root       9   0     0    0     0 SW    0.0  0.0   0:00 keventd
On each CPU the idle is very high at around 80%. I'm pretty sure I'm not interpreting things wrong and that none of the CPUs are having high usage.


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 to remove compiled programs? piggysmile Linux - Software 2 03-22-2005 05:25 AM
why ./ is used to run C++ compiled programs legend1079 Red Hat 4 03-23-2004 06:32 AM
cannot run C compiled programs Astro Slackware 7 01-27-2004 10:32 PM
1st compiled kernel but still have cpu issues RIgimp75 Slackware 1 01-12-2004 05:05 AM
pre-compiled CPU stress program for linux glock19 Linux - General 1 11-01-2001 12:28 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:53 AM.

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