Jump to content

mandriva server benchmark


AleXxiO
 Share

Recommended Posts

hi, i have this hw with mandriva and i noticed that i configured bad my webserver... it's always quite without memory... what do you think about it?

Linux localhost 2.6.22.12-server-1mdv #1 SMP Tue Nov 20 09:35:09 EST 2007 i686 Pentium III (Katmai) GNU/Linux
cpu MHz		 : 451.044
cache size	  : 512 KB

free:
		 total	   used	   free	 shared	buffers	 cached
Mem:		158604	 156024	   2580		  0	   1476	 103664
-/+ buffers/cache:	  50884	 107720
Swap:	   457812		108	 457704

[alexxio@localhost ~]$ ps aux | grep httpd | wc -l
10

[alexxio@localhost ~]$ ps aux | grep mysqld | wc -l
4

 

(i think these are too much forks, right?)

 

this is the complete list of running processes with ps aux

USER	   PID %CPU %MEM	VSZ   RSS TTY	  STAT START   TIME COMMAND
root		 1  0.0  0.3   1648   536 ?		Ss   Feb10   0:04 init [3]
root		 2  0.0  0.0	  0	 0 ?		S<   Feb10   0:00 [kthreadd]
root		 3  0.0  0.0	  0	 0 ?		S<   Feb10   0:00 [migration/0]
root		 4  0.0  0.0	  0	 0 ?		S<   Feb10   0:00 [ksoftirqd/0]
root		 5  0.0  0.0	  0	 0 ?		S<   Feb10   0:16 [events/0]
root		 6  0.0  0.0	  0	 0 ?		S<   Feb10   0:00 [khelper]
root		29  0.0  0.0	  0	 0 ?		S<   Feb10   0:00 [kblockd/0]
root		30  0.0  0.0	  0	 0 ?		S<   Feb10   0:00 [kacpid]
root		31  0.0  0.0	  0	 0 ?		S<   Feb10   0:00 [kacpi_notify]
root		94  0.0  0.0	  0	 0 ?		S<   Feb10   0:00 [kseriod]
root	   111  0.0  0.0	  0	 0 ?		S	Feb10   0:00 [pdflush]
root	   113  0.0  0.0	  0	 0 ?		S<   Feb10   0:02 [kswapd0]
root	   114  0.0  0.0	  0	 0 ?		S<   Feb10   0:00 [aio/0]
root	   740  0.0  0.0	  0	 0 ?		S<   Feb10   0:00 [kpsmoused]
root	   770  0.0  0.0	  0	 0 ?		S<   Feb10   0:04 [kjournald]
root	   907  0.0  0.4   2016   660 ?		S<s  Feb10   0:01 /sbin/udevd -d
root	  1719  0.0  0.0	  0	 0 ?		S<   Feb10   0:00 [ksuspend_usbd]
root	  1723  0.0  0.0	  0	 0 ?		S<   Feb10   0:00 [khubd]
root	  1757  0.0  0.0	  0	 0 ?		S<   Feb10   0:00 [kgameportd]
root	  1928  0.0  0.0	  0	 0 ?		S<   Feb10   0:00 [kondemand/0]
root	  1979  0.0  0.0	  0	 0 ?		S<   Feb10   0:00 [ata/0]
root	  1980  0.0  0.0	  0	 0 ?		S<   Feb10   0:00 [ata_aux]
root	  2053  0.0  0.0	  0	 0 ?		S<   Feb10   0:00 [kjournald]
root	  2054  0.0  0.0	  0	 0 ?		S<   Feb10   0:02 [kjournald]
daemon	2435  0.0  0.1   1680   240 ?		Ss   Feb10   0:00 /usr/sbin/atd
root	  2442  0.0  0.3   1704   628 ?		Ss   Feb10   0:01 syslogd -m 0
root	  2523  0.0  0.2   1652   404 ?		Ss   Feb10   0:00 klogd -x
71		2564  0.0  0.4   2304   704 ?		Ss   Feb10   0:00 dbus-daemon --s
root	  2588  0.0  0.6   2720  1000 ?		Ss   Feb10   0:00 crond -p
root	  2698  0.0  1.1   7512  1764 ?		Ssl  Feb10   0:00 console-kit-dae
root	  2719  0.0  0.2   3068   468 ?		S	Feb10   0:00 /usr/sbin/smart
root	  2897  0.0  0.3   1640   492 ?		Ss   Feb10   0:00 /usr/sbin/acpid
81		2938  0.0  2.1   5508  3484 ?		Ss   Feb10   0:03 hald
root	  2939  0.0  0.5   3148   908 ?		S	Feb10   0:00 hald-runner
root	  3057  0.0  0.6   3248   984 ?		S	Feb10   0:00 hald-addon-inpu
81		3108  0.0  0.4   2008   792 ?		S	Feb10   0:00 hald-addon-acpi
bin	   3376  0.0  0.2   1756   452 ?		Ss   Feb10   0:00 portmap
root	  3402  0.0  0.5   2280   804 ?		Ss   Feb10   0:00 xinetd -stayali
avahi	 3436  0.0  0.8   2696  1404 ?		Ss   Feb10   0:00 avahi-daemon: r
root	  3439  0.0  0.4   1828   692 ?		Ss   Feb10   0:00 rpc.statd
xfs	   3455  0.0  1.5   4768  2452 ?		Ss   Feb10   0:00 xfs -port -1 -d
root	  3517  0.0  0.0	  0	 0 ?		S	Feb10   0:05 [pdflush]
root	  3524  0.0  0.2   5212   448 ?		Ss   Feb10   0:00 saslauthd -a pa
root	  3539  0.0  0.4   5104   728 ?		Ss   Feb10   0:00 /usr/sbin/sshd
root	  3711  0.0  0.1   5212   232 ?		S	Feb10   0:00 saslauthd -a pa
root	  3712  0.0  0.1   5212   228 ?		S	Feb10   0:00 saslauthd -a pa
root	  3713  0.0  0.1   5212   228 ?		S	Feb10   0:00 saslauthd -a pa
root	  3714  0.0  0.1   5212   228 ?		S	Feb10   0:00 saslauthd -a pa
nobody	3730  0.0  1.7   6868  2744 ?		Ss   Feb10   0:07 proftpd: (accep
root	  3736  0.0  1.8  12412  2916 ?		Ss   Feb10   0:00 smbd -D
root	  3749  0.0  4.1  20816  6532 ?		Ss   Feb10   0:07 /usr/sbin/httpd
root	  3753  0.0  0.9   7320  1476 ?		Ss   Feb10   0:04 nmbd -D
root	  3760  0.0  0.7  12412  1160 ?		S	Feb10   0:00 smbd -D
apache	3769  0.0  3.2  20892  5088 ?		S	Feb10   0:00 /usr/sbin/httpd
apache	3770  0.0  2.7  20892  4308 ?		S	Feb10   0:00 /usr/sbin/httpd
apache	3771  0.0  3.1  20892  5068 ?		S	Feb10   0:00 /usr/sbin/httpd
apache	3772  0.0  2.7  20892  4312 ?		S	Feb10   0:00 /usr/sbin/httpd
apache	3773  0.0  3.1  20892  5060 ?		S	Feb10   0:00 /usr/sbin/httpd
apache	3774  0.0  3.1  20892  5060 ?		S	Feb10   0:00 /usr/sbin/httpd
apache	3775  0.0  3.1  20892  5056 ?		S	Feb10   0:00 /usr/sbin/httpd
apache	3776  0.0  2.7  20892  4312 ?		S	Feb10   0:00 /usr/sbin/httpd
root	  3833  0.0  0.0	  0	 0 ?		S<   Feb10   0:00 [kauditd]
mysql	 4101  0.0  0.3   6452   492 ?		Ss   Feb10   0:00 /usr/sbin/mysql
mysql	 4103  0.0  0.6  14808  1024 ?		Sl   Feb10   0:40 /usr/sbin/mysql
mysql	 4109  0.1  8.8 111352 14036 ?		Sl   Feb10   5:57 /usr/sbin/mysql
root	  4140  0.0  0.2   1632   432 tty1	 Ss+  Feb10   0:00 /sbin/mingetty
root	  4738  0.0  0.5   3760   804 ?		Ss   Feb10   0:00 SCREEN
root	  4739  0.0  1.0   3904  1672 pts/1	Ss+  Feb10   0:00 /bin/bash
alexxio   6682  0.0  0.5   3760   860 ?		Ss   Feb10   0:00 SCREEN
alexxio   6683  0.0  1.2   4440  1980 pts/2	Ss+  Feb10   0:00 /bin/bash
root	  8139  0.0  1.0   6660  1740 ?		SNs  Feb11   0:10 sendmail: accep
mail	  8156  0.0  0.7   6532  1224 ?		SNs  Feb11   0:00 sendmail: Queue
alexxio  15695  0.0  0.5   3764   840 ?		Ss   12:43   0:01 SCREEN
alexxio  15696  0.0  1.2   4424  1952 pts/3	Ss+  12:43   0:00 /bin/bash
root	 16117  0.0  1.1   7732  1888 ?		Ss   14:32   0:00 sshd: alexxio [
alexxio  16123  0.0  0.7   7768  1212 ?		S	14:34   0:00 sshd: alexxio@p
alexxio  16124  0.0  1.2   4384  1916 pts/0	Ss   14:34   0:00 -bash
alexxio  16728  0.0  0.5   2416   888 pts/0	R+   14:54   0:00 ps aux

can you help me boosting it?

Link to comment
Share on other sites

Looks perfectly normal to me. A Linux system will use all the memory, and this shows that the system is configured properly. I don't see any problems here. You can see this by the fact that swap is hardly being used at all. It's normal to see a little usage which is why you see 108 being used.

 

I would only start to worry if all your swap starts to get used. Then I would just simply suggest - install some more memory.

 

So no need to worry about it.

Link to comment
Share on other sites

Some little tweaks you can do is disable unwanted tty's in /etc/inittab. Here is a sample:

 

1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
#3:2345:respawn:/sbin/mingetty tty3
#4:2345:respawn:/sbin/mingetty tty4
#5:2345:respawn:/sbin/mingetty tty5
#6:2345:respawn:/sbin/mingetty tty6

 

the # at the beginning of the lines comment them out. Just be careful that you comment the right lines, and not the runlevels! As you see above I only have two tty's enabled, and thus I free up some memory. You can also stop the system from going to swap too easily by editing /etc/sysctl.conf and adding:

 

vm.swappiness = 10

 

and then execute:

 

sysctl -p

 

and check by doing:

 

cat /proc/sys/vm/swappiness

 

and it should report 10. Other than that, you need to disable services that you are not using. Take a look at:

 

chkconfig --list | grep :on

 

see what is enabled, and what you are using from this list. Then we can take a look at the rest and decide whether it is safe to disable them or not.

Link to comment
Share on other sites

  • 3 weeks later...
total used free shared buffers cached

Mem: 158604 156024 2580 0 1476 103664

-/+ buffers/cache: 50884 107720

Swap: 457812 108 457704

 

In case ianw wasn't completely understood, when Linux finishes using memory, it caches it instead of returning it to 'free' status, so if you look at your output of free:

 

free: 2580

cached: 103664

 

So, you actually have 2580 + 103664 kbs of free RAM or 106244 kb free, which is 66.99% free. Not too shabby for a box running apache and mysql.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...