dealspiggy
12th April 2008, 01:17
first, I ran this free -m command, below is the output:
free -m
total used free shared buffers cached
Mem: 256 240 15 0 1 50
-/+ buffers/cache: 188 67
Swap: 511 209 302
It shows 209M SWAP being used, right?
To see what uses the memory, I ran 'top', below is the output:
2544 apache 15 0 376m 20m 11m S 0 7.9 0:00.85 httpd
2537 apache 15 0 372m 18m 11m S 0 7.4 0:00.47 httpd
2538 apache 15 0 377m 17m 5248 S 0 6.9 0:00.91 httpd
2495 apache 15 0 370m 14m 9m S 0 5.8 0:01.22 httpd
2541 apache 15 0 377m 13m 10m S 0 5.3 0:03.84 httpd
2536 apache 15 0 375m 12m 6476 S 0 5.0 0:01.28 httpd
2539 apache 15 0 375m 12m 6908 S 0 5.0 0:00.59 httpd
2542 apache 15 0 380m 12m 9.8m S 0 5.0 0:01.94 httpd
2529 apache 15 0 372m 11m 4528 S 0 4.4 0:00.37 httpd
2534 apache 15 0 380m 11m 9.8m S 0 4.4 0:01.17 httpd
2510 apache 15 0 374m 10m 6232 S 0 3.9 0:02.03 httpd
2540 apache 15 0 376m 9612 6564 S 0 3.7 0:00.63 httpd
2517 apache 15 0 380m 9380 5816 S 0 3.6 0:01.57 httpd
2533 apache 15 0 376m 9272 4100 S 0 3.5 0:00.43 httpd
2532 apache 16 0 377m 8412 3744 S 0 3.2 0:00.92 httpd
2309 mysql 16 0 424m 8332 2704 S 0 3.2 0:02.20 mysqld
2543 apache 15 0 380m 7828 5656 S 0 3.0 0:00.80 httpd
It looks to me that apache uses much of the SWAP memory, I wonder what I can do to reduce the SWAP usage?
ps:
my server specs:
RAM: 256M
OS: CentOS 5.1
Webmin + Virtualmin
Apache
MySQL 5
PHP 5.2.5
Postfix
This is a test server hosting 4 websites which all have low traffic.
free -m
total used free shared buffers cached
Mem: 256 240 15 0 1 50
-/+ buffers/cache: 188 67
Swap: 511 209 302
It shows 209M SWAP being used, right?
To see what uses the memory, I ran 'top', below is the output:
2544 apache 15 0 376m 20m 11m S 0 7.9 0:00.85 httpd
2537 apache 15 0 372m 18m 11m S 0 7.4 0:00.47 httpd
2538 apache 15 0 377m 17m 5248 S 0 6.9 0:00.91 httpd
2495 apache 15 0 370m 14m 9m S 0 5.8 0:01.22 httpd
2541 apache 15 0 377m 13m 10m S 0 5.3 0:03.84 httpd
2536 apache 15 0 375m 12m 6476 S 0 5.0 0:01.28 httpd
2539 apache 15 0 375m 12m 6908 S 0 5.0 0:00.59 httpd
2542 apache 15 0 380m 12m 9.8m S 0 5.0 0:01.94 httpd
2529 apache 15 0 372m 11m 4528 S 0 4.4 0:00.37 httpd
2534 apache 15 0 380m 11m 9.8m S 0 4.4 0:01.17 httpd
2510 apache 15 0 374m 10m 6232 S 0 3.9 0:02.03 httpd
2540 apache 15 0 376m 9612 6564 S 0 3.7 0:00.63 httpd
2517 apache 15 0 380m 9380 5816 S 0 3.6 0:01.57 httpd
2533 apache 15 0 376m 9272 4100 S 0 3.5 0:00.43 httpd
2532 apache 16 0 377m 8412 3744 S 0 3.2 0:00.92 httpd
2309 mysql 16 0 424m 8332 2704 S 0 3.2 0:02.20 mysqld
2543 apache 15 0 380m 7828 5656 S 0 3.0 0:00.80 httpd
It looks to me that apache uses much of the SWAP memory, I wonder what I can do to reduce the SWAP usage?
ps:
my server specs:
RAM: 256M
OS: CentOS 5.1
Webmin + Virtualmin
Apache
MySQL 5
PHP 5.2.5
Postfix
This is a test server hosting 4 websites which all have low traffic.