LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Memory and CPU questions...... (https://www.linuxquestions.org/questions/linux-newbie-8/memory-and-cpu-questions-2576/)

ther-a-pea 05-16-2001 09:39 PM

OK.

Red Hat 7.1 Workstation (Not deluxe) complete install...
Ximian Gnome complete install.......

Now, my system is pretty darn bitchin........ but when I check the CPU/Mem usage applet, I am always seeing the CPU bar going from 0-50% then back to zero, kinda like a heartbeat.... And the memory useage seems to just climb the longer the system has been up and running......

Anyone got any ideas why?? Are there 'memory leaks' like in windoze?
Are there any 'Memory Compactors' out there for Linux like there are for Windowz?
Is there a program that will track down runaway threads or loose programs???

Here are my system specs if it helps.....

Intel P-III 1000
Asus CUSL2-C Mainboard
VisionTek GeForce3
Creative Labs SoundBlaster Live! X-Gamer 5.1
256mb Micron PC-133 RAM
46g IBM Deskstar (Win2k)
30g Western Digital (Red Hat)
Pioneer 16x DVD
Philips 8x4x32 CD-RW

I thought my system would just FLY with linux, and it really does most times.... But sometimes it slows down. And there is the fact that the CPU is always 'working'... And the free memory seems to dissappear......

ANYONE have any ideas on what to do??

Thanks.

crabboy 05-16-2001 10:36 PM

Since you said "CPU/Mem usage applet"; I hear the word java. Java is both a memory and CPU hog. It's quite possible that your monitoring program is the one eating up the CPU. I'd suggest that you get to a command line and use 'top'. It will tell you everything you want to know and possibly more than you need to know.

ther-a-pea 05-16-2001 10:44 PM

didn't work :(
 
Well,

I shut off all of my applets (there was only two, heh heh) and then turned off everything else I could think off.

It really didn't make a big difference.... top reported that I was still using 215 megs of memory.. it went down my 1 meg.....

How do I tell what things I need running and what I don't.....

crabboy 05-16-2001 10:57 PM

What does top report as being the biggest hog? Try sorting my mem usage with 'M'. Look at the top man page or top help with 'h' while running top.

ther-a-pea 05-17-2001 12:28 AM

Hmmmmm....
 
It reports that Nautilus is the biggest hog........

jharris 05-17-2001 09:01 PM

Re: didn't work :(
 
Quote:

Originally posted by ther-a-pea
Well,

I shut off all of my applets (there was only two, heh heh) and then turned off everything else I could think off.

It really didn't make a big difference.... top reported that I was still using 215 megs of memory.. it went down my 1 meg.....

How do I tell what things I need running and what I don't.....

When you say 'using' 215 meg of memory what was it being used for, my system has 256MB in and heres what 'free' reports being used:

total used free shared buffers cached
Mem: 255808 103636 152172 0 3508 56400
-/+ buffers/cache: 43728 212080
Swap: 136544 0 136544

So I appear to be using 103MB, but of that 103MB 3.5MB is used for buffers and 53MB is being used as disk cache. If I was to access a few more files and execute a few more programs them I would use all my free memory for caches and buffers. When a program needs to use the RAM these buffers would be flushed and the memory give to the program. You need to look at what the memory is being used for as much as how much is being used. The good old UNIX 'always-full' memory model.

Cheers.

Jamie...

ther-a-pea 05-17-2001 09:24 PM

What free said....
 
Here is what free told me

Mem total:255508
Mem Used:240380
Mem Free:15128
Mem Shared: 0
Mem Buffers: 8716
Mem Cached: 149376

-/+ buffers/Cache Used:82288
-/+ buffers/Cache Free:173220

Swap total:530104
Swap Used: 8
Swap Free: 530096

What does this all mean?

Man, I REALLY hate being the newbie :-) heh heh. I must sound like a total idiot!!

jharris 05-17-2001 09:44 PM

What this really means is that of your 240MB of used memory, 149MB is used for disk caching.

When you run a program like Netscap it is read from the harddisk into memory and executed. When you shut it the program terminates, yet the data read from the HDD is kept in memory so long as that memory isn't needed for anything else. If you then start Netscape again a few moments later (or even hours if the machine hasn't needed the memory for anything else) the OS won't read all the data off the hard disk again, it will simply used the 'cached' copy that is in memory from the last time. This helps to speed things along as even very fask disks are *very* slow compared to memory. A similar process happens when you save things to disk, its stored in memory and then written to disk when its convienient for the OS.

So you're really using about 91MB of memory, the rest is just being used for caching becuase its not needed for anything else. If you had lots of programs running or a program that was chewing all your memory this figure for disk cache would be very small.

Hope that explains things a little. Its just touching the surface.

Cheers!

JAmie...

ther-a-pea 05-17-2001 11:36 PM

Whew!
 
ACtually, that makes me feel ALOT better :-)

I was really worried that I needed to go grab more memory :-)

Thanks,

Rob.

mattkat 10-03-2003 11:06 AM

still missing some memory
 
This thread has been helpful for me, however it has not answered all of my questions on the subject. Essentially I cannot account for all of the memory.

Using a compination of top and free, I've found that I still cannot account for 60-90 megs worth of ram. Is there anything else that might be eating it up? Could 60-90 megs be "missing" from rounding error - everything is displayed in MBs in top.

Any thoughts?

Thanks.


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