LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 02-21-2008, 03:31 PM   #1
neocontrol
Member
 
Registered: Jul 2005
Posts: 273

Rep: Reputation: 31
Help me understand my top output


Code:
top - 15:26:25 up 364 days,  8:10,  2 users,  load average: 0.12, 0.13, 0.15
Tasks:  69 total,   2 running,  67 sleeping,   0 stopped,   0 zombie
Cpu0  :  8.3% us,  0.0% sy,  0.0% ni, 91.7% id,  0.0% wa,  0.0% hi,  0.0% si
Cpu1  :  4.0% us,  4.0% sy,  0.0% ni, 92.0% id,  0.0% wa,  0.0% hi,  0.0% si
Mem:   4045224k total,  4027540k used,    17684k free,    24240k buffers
Swap:  2048276k total,      144k used,  2048132k free,  3654836k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 9220 mysql     16   0  610m 169m 4632 S    8  4.3   2363:47 mysqld
    1 root      16   0  4756  516  428 S    0  0.0   0:17.24 init
Not to sure what some of the process output is about. Like NI, VIRT, RES, SHR.

Also I noticed that this machine is sucking up nearly all my ram... Which i hear is how Linux is supposed to be. But 4GB? That seems excessive to me.

My real problem relates to that mysqld process. This is off of my mysql machine, and it's running SLLOOOWWWWWW. The machines only responsibilities is running mysql. But runs slow when memory dips low to the point of 15mb or so left.

As you notice, there is almost a full year on the clock, and we've restarted mysql once, about 6 months ago when it was doing the same things.

Memory leak? Possible misconfiguration somewhere?

Thanks,
 
Old 02-21-2008, 03:47 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
What is the output of free -lm? It maybe that there's plenty of RAM left for mysqld. From your top output, it looks like only 4.3% of memory is used by mysqld...
 
Old 02-21-2008, 03:49 PM   #3
neocontrol
Member
 
Registered: Jul 2005
Posts: 273

Original Poster
Rep: Reputation: 31
Code:
             total       used       free     shared    buffers     cached
Mem:          3950       3932         18          0         26       3565
Low:          3950       3932         18
High:            0          0          0
-/+ buffers/cache:        339       3610
Swap:         2000          0       2000
I was thinking that there wasn't that much consumed by mysqld, but the fact that the machine is slow where my websites stop, has me very concerned.
 
Old 02-21-2008, 03:59 PM   #4
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
If you look at the line that's -/+ buffers/cache: it shows that your applications are using 339MB and that 3.6 GB is free for application use. Your swap is also not being used at all for applications.

The first line basically shows that 3.6 GB is being used to cache data. If you needed it for applications (like starting another daemon or whatever), it would free up some of that cache for your applications.

Now as to your slowdown, I don't have any good educated guesses. Maybe some problem with your cached data?
 
Old 02-21-2008, 04:25 PM   #5
neocontrol
Member
 
Registered: Jul 2005
Posts: 273

Original Poster
Rep: Reputation: 31
Thanks, that at least crosses off one thing I thought was wrong.
 
Old 02-21-2008, 05:46 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
It's difficult to say, but it might be purely a DB issue.
Are there a lot of mysql process showing when you run top?

Try logging into mysql and running the following :

show processlist;
show variables;

should give you something to work on.
 
  


Reply



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
Help Determinig Top Output XaViaR Linux - General 2 02-13-2007 04:41 PM
cannot understand some dmesg output ninadb Slackware 8 06-29-2005 04:49 PM
Output of 'top' as backgrond Burgin Linux - General 2 06-09-2005 05:18 PM
help me to understand the output of chkrootkit ddaas Linux - Security 2 04-19-2005 02:28 AM
Odd output of 'top' philforrest Linux - General 1 07-20-2004 12:05 AM

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

All times are GMT -5. The time now is 11:23 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