Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a
virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month.
Click here for more info.
04-17-2005, 05:49 AM
#1
LQ Newbie
Registered: Sep 2004
Posts: 5
Rep:
free says 500mb memory used... ps aux says otherwise
Hi all. I noticed my server was running very, very slowly (SSH and Plesk both really slow) so I checked the list of processes, there was nothing with memory above 2%, most of it it 0.1%. Plesk is telling me that 98% of memory is being used, but I have added up everything from the "ps aux" command and it's nothing like that. But... the "free" command says I am using about 470mb of 500mb.
I rebooted and it's just the same. I really don't understand where all this memory usage is coming from. Here's my "ps aux" command
Code:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.5 0.0 1532 448 ? S 20:28 0:04 init [3]
root 2 0.0 0.0 0 0 ? SW 20:28 0:00 [migration/0]
root 3 0.0 0.0 0 0 ? SW 20:28 0:00 [keventd]
root 4 0.0 0.0 0 0 ? SW 20:28 0:00 [kapmd]
root 5 0.0 0.0 0 0 ? SWN 20:28 0:00 [ksoftirqd/0]
root 8 0.0 0.0 0 0 ? SW 20:28 0:00 [bdflush]
root 6 1.4 0.0 0 0 ? SW 20:28 0:10 [kswapd]
root 7 0.3 0.0 0 0 ? SW 20:28 0:02 [kscand]
root 9 0.0 0.0 0 0 ? SW 20:28 0:00 [kupdated]
root 10 0.0 0.0 0 0 ? SW 20:28 0:00 [mdrecoveryd]
root 14 0.1 0.0 0 0 ? SW 20:28 0:01 [kjournald]
root 69 0.0 0.0 0 0 ? SW 20:28 0:00 [khubd]
root 689 0.0 0.0 0 0 ? SW 20:28 0:00 [kjournald]
root 1119 0.0 0.0 0 0 ? SW 20:29 0:00 [eth0]
root 1163 0.1 0.1 1576 540 ? S 20:29 0:00 syslogd -m 0
root 1167 0.0 0.0 1528 396 ? S 20:29 0:00 klogd -x
root 1186 0.0 0.0 1580 380 ? S 20:29 0:00 mdadm --monitor -
root 1201 0.0 0.0 83552 488 ? S 20:29 0:00 /sbin/auditd
root 1281 0.0 0.2 7596 1132 ? S 20:29 0:00 cupsd
named 1309 0.0 0.2 36160 1052 ? S 20:29 0:00 /usr/sbin/named -
root 1322 0.0 0.1 3644 824 ? S 20:29 0:00 /usr/sbin/sshd
root 1336 0.0 0.1 2132 744 ? S 20:29 0:00 xinetd -stayalive
postgres 1387 0.0 0.3 9600 1532 ? S 20:29 0:00 /usr/bin/postmast
postgres 1389 0.0 0.2 9160 1304 ? S 20:29 0:00 postgres: stats b
postgres 1390 0.0 0.2 8168 1324 ? S 20:29 0:00 postgres: stats c
root 1411 0.0 0.1 4240 516 ? S 20:29 0:00 /bin/sh /usr/bin/
root 1445 0.0 0.1 3476 772 ? S 20:29 0:00 /usr/lib/courier-
root 1450 0.0 0.1 3248 592 ? S 20:29 0:00 /usr/lib/courier-
mysql 1452 0.2 0.6 106568 3460 ? S 20:29 0:01 /usr/libexec/mysq
root 1461 0.0 0.1 3484 772 ? S 20:29 0:00 /usr/lib/courier-
root 1464 0.0 0.1 3236 592 ? S 20:29 0:00 /usr/lib/courier-
root 1471 0.0 0.1 3484 856 ? S 20:29 0:00 /usr/lib/courier-
root 1473 0.0 0.1 3356 792 ? S 20:29 0:00 /usr/lib/courier-
root 1482 0.0 0.1 3476 772 ? S 20:29 0:00 /usr/lib/courier-
root 1486 0.0 0.1 3232 592 ? S 20:29 0:00 /usr/lib/courier-
qmails 1493 0.5 0.1 1880 536 ? S 20:29 0:03 qmail-send
qmaill 1495 0.0 0.0 1516 444 ? S 20:29 0:00 splogger qmail
root 1496 0.0 0.0 1544 356 ? S 20:29 0:00 qmail-lspawn ./Ma
qmailr 1497 0.0 0.0 1552 344 ? S 20:29 0:00 qmail-rspawn
qmailq 1498 0.0 0.0 1512 304 ? S 20:29 0:00 qmail-clean
root 1524 0.1 0.1 25408 612 ? S 20:29 0:01 /usr/bin/spamd -d
tomcat4 1574 2.0 3.1 239208 16068 ? S 20:29 0:13 /usr/java/j2sdk1.
popuser 1604 0.2 0.8 25296 4288 ? S 20:29 0:01 /usr/bin/spamd --
popuser 1612 0.1 0.2 25292 1060 ? S 20:29 0:01 /usr/bin/spamd --
root 1653 0.1 0.2 22852 1308 ? S 20:29 0:00 /usr/sbin/httpd
root 1801 0.0 0.2 22796 1236 ? S 20:30 0:00 /usr/sbin/httpd
apache 1802 0.0 1.7 28008 8796 ? S 20:30 0:00 /usr/sbin/httpd
apache 1803 0.1 1.0 26076 5372 ? S 20:30 0:00 /usr/sbin/httpd
apache 1804 0.1 0.9 26804 4896 ? S 20:30 0:00 /usr/sbin/httpd
apache 1805 0.1 0.8 26344 4500 ? S 20:30 0:00 /usr/sbin/httpd
apache 1806 0.0 1.0 27396 5164 ? S 20:30 0:00 /usr/sbin/httpd
apache 1807 0.1 1.4 26344 7528 ? S 20:30 0:01 /usr/sbin/httpd
apache 1808 0.1 1.9 28364 9900 ? S 20:30 0:01 /usr/sbin/httpd
apache 1809 0.0 1.7 28012 8736 ? S 20:30 0:00 /usr/sbin/httpd
root 1852 0.0 0.2 13016 1056 ? S 20:30 0:00 /usr/local/psa/ad
psaadm 1856 0.1 1.2 15336 6332 ? S 20:30 0:01 /usr/local/psa/ad
psaadm 1857 0.0 0.2 13148 1176 ? S 20:30 0:00 /usr/local/psa/ad
psaadm 1858 0.1 0.4 14912 2040 ? S 20:30 0:00 /usr/local/psa/ad
psaadm 1859 0.1 0.7 16000 3764 ? S 20:30 0:01 /usr/local/psa/ad
psaadm 1860 0.3 0.2 15908 1224 ? S 20:30 0:01 /usr/local/psa/ad
psaadm 1933 0.1 0.2 15584 1388 ? S 20:30 0:01 /usr/local/psa/ad
drweb 1954 0.0 0.2 10872 1120 ? S 20:30 0:00 /opt/drweb/drwebd
drweb 1955 0.1 0.7 10888 3924 ? S 20:30 0:00 /opt/drweb/drwebd
drweb 1956 0.0 0.7 10888 3836 ? S 20:30 0:00 /opt/drweb/drwebd
drweb 1957 0.0 0.2 10872 1132 ? S 20:30 0:00 /opt/drweb/drwebd
drweb 1958 0.0 0.2 10872 1132 ? S 20:30 0:00 /opt/drweb/drwebd
drweb 1959 0.0 0.2 10872 1132 ? S 20:30 0:00 /opt/drweb/drwebd
drweb 1960 0.0 0.2 10872 1132 ? S 20:30 0:00 /opt/drweb/drwebd
drweb 1961 0.0 0.2 10872 1132 ? S 20:30 0:00 /opt/drweb/drwebd
drweb 1962 0.0 0.2 10872 1132 ? S 20:30 0:00 /opt/drweb/drwebd
drweb 1963 0.0 0.2 10872 1132 ? S 20:30 0:00 /opt/drweb/drwebd
drweb 1964 0.0 0.2 10872 1132 ? S 20:30 0:00 /opt/drweb/drwebd
drweb 1965 0.0 0.6 10888 3476 ? S 20:30 0:00 /opt/drweb/drwebd
drweb 1966 0.0 0.7 10888 3812 ? S 20:30 0:00 /opt/drweb/drwebd
drweb 1967 0.0 0.2 10888 1164 ? S 20:30 0:00 /opt/drweb/drwebd
drweb 1968 0.0 0.2 10888 1180 ? S 20:30 0:00 /opt/drweb/drwebd
drweb 1969 0.0 0.2 10888 1212 ? S 20:30 0:00 /opt/drweb/drwebd
drweb 1970 0.0 0.2 10888 1168 ? S 20:30 0:00 /opt/drweb/drwebd
root 1998 0.0 0.1 1600 588 ? S 20:30 0:00 crond
xfs 2029 0.0 0.1 5348 528 ? S 20:30 0:00 xfs -droppriv -da
root 2050 0.0 0.1 9832 948 ? S 20:30 0:00 smbd -D
root 2055 0.0 0.1 9832 948 ? S 20:30 0:00 smbd -D
root 2057 0.0 0.2 7648 1188 ? S 20:30 0:00 nmbd -D
root 2069 0.0 0.0 3540 424 ? S 20:30 0:00 rhnsd --interval
mailman 2102 0.0 0.1 7128 944 ? S 20:30 0:00 /usr/bin/python /
mailman 2103 0.0 0.3 7236 1868 ? S 20:30 0:00 /usr/bin/python /
mailman 2105 0.0 0.3 7204 1936 ? S 20:30 0:00 /usr/bin/python /
mailman 2106 0.0 0.3 7188 1892 ? S 20:30 0:00 /usr/bin/python /
mailman 2107 0.0 0.3 7240 1828 ? S 20:30 0:00 /usr/bin/python /
mailman 2108 0.0 0.3 7272 1912 ? S 20:30 0:00 /usr/bin/python /
mailman 2109 0.0 0.3 7344 1936 ? S 20:30 0:00 /usr/bin/python /
mailman 2110 0.0 0.3 7236 1824 ? S 20:30 0:00 /usr/bin/python /
mailman 2111 0.0 0.1 7240 940 ? S 20:30 0:00 /usr/bin/python /
root 2119 0.0 0.0 1500 356 tty1 S 20:31 0:00 /sbin/mingetty tt
root 2120 0.0 0.0 1500 356 tty2 S 20:31 0:00 /sbin/mingetty tt
root 2121 0.0 0.0 1500 356 tty3 S 20:31 0:00 /sbin/mingetty tt
root 2122 0.0 0.0 1500 356 tty4 S 20:31 0:00 /sbin/mingetty tt
root 2123 0.0 0.0 1500 356 tty5 S 20:31 0:00 /sbin/mingetty tt
root 2124 0.0 0.0 1500 356 tty6 S 20:31 0:00 /sbin/mingetty tt
root 2125 0.0 0.0 1532 380 ttyS0 S 20:31 0:00 /sbin/agetty -L 9
psaadm 2283 0.0 0.1 13016 988 ? S 20:32 0:00 /usr/local/psa/ad
root 2808 0.0 0.2 6856 1260 ? S 20:33 0:00 sshd: root@pts/0
apache 2951 0.1 1.7 28016 8996 ? S 20:33 0:00 /usr/sbin/httpd
apache 2958 0.1 1.5 27208 7980 ? S 20:33 0:00 /usr/sbin/httpd
root 2986 0.0 0.2 4264 1016 pts/0 S 20:34 0:00 -bash
qmaild 3036 0.0 0.1 3272 808 ? S 20:34 0:00 /var/qmail/bin/qm
qmaild 3262 0.0 0.1 3260 800 ? S 20:34 0:00 /var/qmail/bin/qm
qmaild 3315 0.0 0.1 3280 784 ? S 20:35 0:00 /var/qmail/bin/qm
popuser 4363 0.0 0.0 1412 272 ? S 20:39 0:00 bin/qmail-local -
popuser 4365 0.0 0.2 4240 1076 ? S 20:39 0:00 /bin/sh -c if [
popuser 4367 0.0 0.0 1424 272 ? S 20:39 0:00 bin/qmail-local -
popuser 4369 0.0 0.0 1420 272 ? S 20:39 0:00 bin/qmail-local -
popuser 4370 0.0 0.2 4248 1080 ? S 20:39 0:00 /bin/sh -c if [
popuser 4374 0.0 0.0 1408 272 ? S 20:39 0:00 bin/qmail-local -
popuser 4381 0.0 0.2 4240 1076 ? S 20:39 0:00 /bin/sh -c if [
popuser 4385 0.1 0.1 4244 896 ? S 20:39 0:00 /bin/sh -c if [
popuser 4388 0.0 0.0 1436 272 ? S 20:39 0:00 bin/qmail-local -
popuser 4389 0.0 0.0 1416 268 ? S 20:39 0:00 bin/qmail-local -
popuser 4390 0.0 0.2 4244 1080 ? S 20:39 0:00 /bin/sh -c if [
popuser 4393 0.0 0.0 1424 272 ? S 20:39 0:00 bin/qmail-local -
popuser 4394 0.0 0.2 4248 1080 ? S 20:39 0:00 /bin/sh -c if [
root 4396 0.0 0.0 1600 464 ? S 20:39 0:00 tcp-env /var/qmai
popuser 4397 0.0 0.2 4260 1080 ? S 20:39 0:00 /bin/sh -c if [
popuser 4404 0.0 0.0 1424 272 ? S 20:39 0:00 bin/qmail-local -
popuser 4407 0.0 0.2 4252 1076 ? S 20:39 0:00 /bin/sh -c if [
popuser 4414 0.0 0.0 1420 268 ? S 20:39 0:00 bin/qmail-local -
popuser 4415 0.0 0.2 4244 1076 ? S 20:39 0:00 /bin/sh -c if [
popuser 4439 0.0 0.0 1432 268 ? S 20:39 0:00 bin/qmail-local -
popuser 4441 0.0 0.2 4252 1080 ? S 20:39 0:00 /bin/sh -c if [
popuser 4459 0.0 0.0 1416 276 ? S 20:39 0:00 /var/qmail/bin/qm
popuser 4462 0.2 0.0 1552 352 ? D 20:39 0:00 /var/qmail/bin/qm
popuser 4477 0.0 0.0 1436 312 ? S 20:39 0:00 /var/qmail/bin/qm
popuser 4480 4.9 0.0 1572 380 ? D 20:39 0:00 /var/qmail/bin/qm
popuser 4482 0.0 0.0 1428 312 ? S 20:39 0:00 /var/qmail/bin/qm
popuser 4485 0.4 0.0 1564 380 ? D 20:39 0:00 /var/qmail/bin/qm
popuser 4493 0.0 0.0 1416 308 ? S 20:39 0:00 /var/qmail/bin/qm
popuser 4496 0.2 0.0 1552 376 ? D 20:39 0:00 /var/qmail/bin/qm
popuser 4497 0.0 0.0 1420 312 ? S 20:40 0:00 /var/qmail/bin/qm
popuser 4500 0.2 0.0 1556 380 ? D 20:40 0:00 /var/qmail/bin/qm
root 4501 0.0 0.1 1600 596 ? S 20:40 0:00 CROND
mailman 4503 3.5 0.9 7040 4596 ? D 20:40 0:00 /usr/bin/python -
popuser 4505 0.0 0.0 1416 308 ? S 20:40 0:00 /var/qmail/bin/qm
popuser 4508 0.2 0.0 1552 376 ? D 20:40 0:00 /var/qmail/bin/qm
popuser 4509 0.0 0.0 1420 312 ? S 20:40 0:00 /var/qmail/bin/qm
popuser 4512 0.0 0.0 1556 380 ? D 20:40 0:00 /var/qmail/bin/qm
popuser 4513 0.1 0.0 1432 312 ? S 20:40 0:00 /var/qmail/bin/qm
popuser 4516 0.0 0.0 1568 380 ? D 20:40 0:00 /var/qmail/bin/qm
popuser 4517 0.0 0.0 1416 312 ? S 20:40 0:00 /var/qmail/bin/qm
popuser 4520 0.0 0.0 1552 380 ? D 20:40 0:00 /var/qmail/bin/qm
popuser 4521 0.1 0.0 1424 312 ? S 20:40 0:00 /var/qmail/bin/qm
popuser 4524 0.1 0.0 1560 380 ? D 20:40 0:00 /var/qmail/bin/qm
root 4559 0.0 0.1 2872 888 pts/0 R 20:40 0:00 ps aux
And here's "free"
Code:
total used free shared buffers cached
Mem: 502292 481636 20656 0 43792 23744
-/+ buffers/cache: 414100 88192
Swap: 2048276 196552 1851724
And Plesk says 93-98% of memory is being used.
This is really confusing
Please advise, as you can see there are no processes which are using lots of memory...
Last edited by Fayte; 04-17-2005 at 07:55 AM .
04-17-2005, 06:47 AM
#2
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
What does top show?
If you can, you might consider using my-small.cnf as your template mysql.cnf file to see if that subsides the problem, if you aren't already
The format on that ps aux is hard to follow, you might want to try using the [ code ] brackets.
Cool
04-17-2005, 07:56 AM
#3
LQ Newbie
Registered: Sep 2004
Posts: 5
Original Poster
Rep:
Top shows:
Code:
23:15:20 up 2:46, 1 user, load average: 11.80, 11.45, 11.19
205 processes: 198 sleeping, 5 running, 2 zombie, 0 stopped
CPU states: cpu user nice system irq softirq iowait idle
total 8.4% 0.0% 55.3% 1.6% 0.0% 34.5% 0.0%
Mem: 502292k av, 471680k used, 30612k free, 0k shrd, 43664k buff
149324k actv, 22312k in_d, 6452k in_c
Swap: 2048276k av, 289008k used, 1759268k free 24012k cached
For every process listed it says 0.0% MEM is being used.
I did the code thing, and how do I do that mySQL fix?
Last edited by Fayte; 04-17-2005 at 08:18 AM .
04-18-2005, 02:09 AM
#4
LQ Newbie
Registered: Sep 2004
Posts: 5
Original Poster
Rep:
Please can someone help, this is a bad situation, everything is running really slow and I need to get it sorted
04-18-2005, 10:09 AM
#5
LQ Newbie
Registered: Sep 2004
Posts: 5
Original Poster
Rep:
Bump again... I tried stopping mySQL altogether and nothing... I just don't get it
04-25-2005, 05:47 AM
#6
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
If MySQL isn't running and the problem still exists, then using a my-small.cnf won't do a thing, so don't worry about that (however, just a quick note, it's basically a settings file that adjusts the amount of memory use for smaller/larger systems and generally comes with the source distributions for ease of quick deployment).
So, to shorten your search a bit, I'd venture a guess that it's not lack of RAM that is slowing your system down, maybe HD read/writes, but likely not RAM. Linux utilizes RAM extremely efficiently by actually using it where it's needed, not only WHEN, but where. So, if all your RAM is being 'used' this is a good thing, you didn't pay all that money for nothing
If it's possible, try swapping in a second HD and RAID the 2, or move your mail processes to another machine to see if the speed returns.
But my guess, it's not a RAM issue, but that is odd that they are reporting 2 different results; possibly they are pulling their info from 2 different sources.
Cool
All times are GMT -5. The time now is 08:21 AM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News