LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 03-07-2005, 12:51 PM   #1
ginda
Member
 
Registered: Mar 2004
Distribution: SUSE8.2, 9.2, Knoppix
Posts: 323

Rep: Reputation: 31
RAM seems very full?


I have run the free command as my machine when browsing started to feel abit slow...the output is below:


# free
total used free shared buffers cached
Mem: 369760 342196 27564 0 4972 149676
-/+ buffers/cache: 187548 182212
Swap: 1028120 14932 1013188



I have also run the top command output is below:


10785 root 15 0 160m 29m 134m S 0.3 8.1 12:22.22 X
10913 luvjinde 16 0 25420 13m 22m S 0.3 3.6 0:20.27 kdeinit
21344 luvjinde 15 0 28200 15m 25m S 0.3 4.3 0:01.83 kdeinit
21578 root 17 0 1760 940 1540 R 0.3 0.3 0:00.06 top
1 root 16 0 588 160 444 S 0.0 0.0 0:05.11 init
2 root 34 19 0 0 0 S 0.0 0.0 0:00.03 ksoftirqd/0
3 root 5 -10 0 0 0 S 0.0 0.0 0:05.04 events/0
28 root 5 -10 0 0 0 S 0.0 0.0 0:00.10 kblockd/0
38 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 pdflush
39 root 5 -10 0 0 0 S 0.0 0.0 0:00.43 pdflush
41 root 15 -10 0 0 0 S 0.0 0.0 0:00.00 aio/0
40 root 15 0 0 0 0 S 0.0 0.0 0:01.44 kswapd0
193 root 21 0 0 0 0 S 0.0 0.0 0:00.00 kseriod
643 root 6 -10 0 0 0 S 0.0 0.0 0:00.00 kcopyd/0
1730 root 21 0 2500 1188 2288 S 0.0 0.3 0:00.00 hotplug
1731 root 23 0 1360 380 1200 S 0.0 0.1 0:00.00 logger
1747 root 25 0 2500 1184 2288 S 0.0 0.3 0:00.00 pci.agent
1748 root 16 0 1360 480 1200 S 0.0 0.1 0:00.00 logger
2021 root 15 0 0 0 0 S 0.0 0.0 0:00.05 khubd
2071 root 15 0 0 0 0 S 0.0 0.0 0:00.00 pccardd
2089 root 17 0 0 0 0 S 0.0 0.0 0:00.00 pccardd
2134 root 18 0 5132 3436 2824 S 0.0 0.9 0:00.00 webconfd
2159 root 8 -10 0 0 0 S 0.0 0.0 0:00.00 kdldrd/normwrk
2160 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kdldrd/critwrk
2161 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kdldrd/hyperwrk
2162 root 0 -20 0 0 0 S 0.0 0.0 1:00.02 kdldrd/dpc
2163 root 5 -10 0 0 0 S 0.0 0.0 0:06.40 kdldrd/wrk
2195 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 kdldrd/wlan0
2197 root 18 0 1524 700 1236 S 0.0 0.2 0:00.00 cardmgr
2884 root 19 0 1412 428 1200 S 0.0 0.1 0:00.00 hwscand
3164 root 15 0 0 0 0 S 0.0 0.0 0:00.00 khpsbpkt
3191 root 15 0 0 0 0 S 0.0 0.0 0:00.00 knodemgrd_0
3332 root 16 0 1264 364 1232 S 0.0 0.1 0:00.00 dhcpcd


Why is my machine slowing down?
 
Old 03-07-2005, 01:12 PM   #2
ginda
Member
 
Registered: Mar 2004
Distribution: SUSE8.2, 9.2, Knoppix
Posts: 323

Original Poster
Rep: Reputation: 31
Update --

I run the command ps aux to see what was running....i saw a whole bunch of instances of when i tried to open a large video file with kaffiene player, i ended up using mplayer!!

i killed them processes and i monitored by ram and it started to free space every time i killed one, so it was working "GREAT" and machine has speeded up again but just wondering why this happens????

Thanks all
 
Old 03-07-2005, 01:13 PM   #3
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 48
Nothing looks unusual there. Linux always uses almost all of the RAM. Even if you built a monster with 2 Gb of Ram, you'd probably see that it is using 1.9+Gb within half an hour of starting up. We'll need somebody with more knowledge than me to explain why this happends, but it isn't unusual. Just because your Ram is used doesn't mean the computer is slower - can you provide any info on what it is that is happening slower?

Your 2nd post makes more sense - a failed start attempt will hog resources, and will keep working until it gives you an error or you kill it. For whatever reason your kaffein wasn't giving an error, so it took you killing the process for it to free up the memory.
ps -ef or ps-aux depending on distro is often your best friend.


Peace,
JimBass

Last edited by JimBass; 03-07-2005 at 01:15 PM.
 
Old 03-07-2005, 01:30 PM   #4
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
If the process are named kaffiene, you can use the killall command rather than having to use the kill command with each process number.
killall -9 kaffiene
 
Old 03-07-2005, 02:08 PM   #5
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 54
Quote:
Originally posted by jschiwal
If the process are named kaffiene, you can use the killall command rather than having to use the kill command with each process number.
killall -9 kaffiene
I wouldn't recommend -9 as the de facto method of killing something - it makes no attempt to exit gracefully and free resources. -15 is a better bet and is the default when calling killall with no parameters:
Code:
killall kaffeine
killall (or kill) -9 sends the process the SIGKILL signal which quits immediately with no clean-up operation. killall (or kill) -15 sends the process the SIGTERM signal which instructs it to exit gracefully.

http://burks.brighton.ac.uk/burks/li...00000000000000

has more information.

You should only use -9 if other attempts have failed.
 
Old 03-07-2005, 03:00 PM   #6
ginda
Member
 
Registered: Mar 2004
Distribution: SUSE8.2, 9.2, Knoppix
Posts: 323

Original Poster
Rep: Reputation: 31
Thanks alot people...as for what application was slowing down on my machine...it was firefox....ps aux is a very useful command
 
Old 03-07-2005, 03:04 PM   #7
ginda
Member
 
Registered: Mar 2004
Distribution: SUSE8.2, 9.2, Knoppix
Posts: 323

Original Poster
Rep: Reputation: 31
Actually guys i have rebooted and thought id just check ps aux again and i have noticed the below:

mysql 5673 0.0 3.1 31856 11640 ? S 19:54 0:00 /usr/sbin/mysqld
mysql 5674 0.0 3.1 31856 11640 ? S 19:54 0:00 /usr/sbin/mysqld
mysql 5675 0.0 3.1 31856 11640 ? S 19:54 0:00 /usr/sbin/mysqld
mysql 5676 0.0 3.1 31856 11640 ? S 19:54 0:00 /usr/sbin/mysqld
mysql 5679 0.0 3.1 31856 11640 ? S 19:54 0:00 /usr/sbin/mysqld
mysql 5720 0.0 3.1 31856 11640 ? S 19:54 0:00 /usr/sbin/mysqld
mysql 5721 0.0 3.1 31856 11640 ? S 19:54 0:00 /usr/sbin/mysqld
mysql 5722 0.0 3.1 31856 11640 ? S 19:54 0:00 /usr/sbin/mysqld
mysql 5723 0.0 3.1 31856 11640 ? S 19:54 0:00 /usr/sbin/mysqld


I am running mysql but why is there more than one instance of it?
 
Old 03-07-2005, 03:23 PM   #8
kevinatkins
Member
 
Registered: Jan 2004
Location: cheshire, uk
Distribution: Ubuntu Hoary
Posts: 605

Rep: Reputation: 32
hi,

i think the reason for Linux 'using up' all of the available memory is to do with caching... whereby stuff is left hanging around for quick retrieval later if necessary.. but the 'cached' memory is actually freely available for other use if required.. i think that's the gist of it, but i'm no programmer, so if anyone can explain further, i'm sure it would help a few of us!
 
Old 03-07-2005, 06:48 PM   #9
ginda
Member
 
Registered: Mar 2004
Distribution: SUSE8.2, 9.2, Knoppix
Posts: 323

Original Poster
Rep: Reputation: 31
anyone know why i have so many mysqld instances running?
 
Old 03-07-2005, 08:28 PM   #10
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,159

Rep: Reputation: 328Reputation: 328Reputation: 328Reputation: 328
Many daemons start up multiple copies of themselves so if they get a bunch of requests all at once they have the processes ready to service them. See mod_prefork in Apache for another example.
 
Old 03-07-2005, 10:39 PM   #11
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 10.04/12.04, Scientific Linux 6.3, Android-x86, Maemo
Posts: 1,658

Rep: Reputation: 138Reputation: 138
Yeah there is nothing unusual in the memory allocation you have above.

Linux works better at dynamically re-assigning the memory as needed. It uses the most it can to do things as efficiently as it can.

Linux memory management isn't like Windoze. It's quite the opposite. You WANT as much of your memory filled as possible.
 
Old 03-07-2005, 11:17 PM   #12
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Milwaukee, WI
Distribution: Mint
Posts: 6,642

Rep: Reputation: 69
I consider this article to do a pretty good job explaining Linux Memory management. It may be of interest -- J.W.
 
Old 03-07-2005, 11:17 PM   #13
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,159

Rep: Reputation: 328Reputation: 328Reputation: 328Reputation: 328
The thing to watch is swap space. When the system has to swap a lot that's when performance takes a really big hit. A little swapping is OK, but when you see a lot of swap space used, that's when you know you need to invest in more RAM.
 
  


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
RAM: Does linux require as much ram as Windows XP? hanzj Linux - Newbie 48 04-18-2007 01:14 AM
Buying RAM - must match old RAM? slackaddict Linux - Hardware 5 11-12-2005 02:38 PM
Full RAM not recognized on Compaq 2500 TotalDefiance Slackware 9 06-29-2005 10:19 AM
Win98SE Pentium166MMX/64MB RAM vs Linux AthlonXP+ 3000/512MB RAM : Lucent LT WinModem t3gah Linux - Software 2 04-22-2005 02:01 PM
Which distributions do not support --full-time for ls (ls --full-time)? GCS Linux - Distributions 0 07-28-2004 02:25 AM


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

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration