Tweaking a web server is very necessary, the less it will consume resource, the more stable it will be and the more website it will be able to handle. Kloxo/lxadmin is a free control panel, and has been working quite great but the problem with it is, it use alot of RAM though kloxo documentation claims that it only eat 33MB ram which is completely wrong in my experience.
There are few ways to tweak kloxo/lxadmin, I already wrote an article on how to replace apache with lighttpd. Lighttpd is much more lighter then apache, though it is bit different but there is an easy way to replace apache with lighttpd in kloxo. You can read
How to install Lighttpd in Kloxo (LXadmin)
Here I’m going to tell, how to tweak mysql in kloxo.
If you are running simple website or blogs, then you do not need innodb. innodb is a mysql storage system and do not require for simple websites. Therefore disabling innodb in kloxo will safe alot of RAM. Same with bdb, it is storage translator in kloxo.
- Login to server using ssh
- open /etc/my.cnf
- and add lines to disable innodb and bdb
- save and close file
- restart mysql, and you will see the huge decrease in RAM.
1 2 3 |
skip-bdb skip-innodb |
RAM usage before disabling innodb and bdb
1 2 3 4 5 6 |
[root@mailserver1 ~]# top top - 07:16:22 up 2:50, 1 user, load average: 0.00, 0.00, 0.00 Tasks: 29 total, 2 running, 27 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 2097152k total, 269420k used, 1827732k free, 0k buffers Swap: 0k total, 0k used, 0k free, 0k cached |
Disabling innodb and bdb
1 2 |
[root@mailserver1 etc]# cp my.cnf my.cnf.backup [root@mailserver1 etc]# nano my.cnf |
Added
1 2 3 |
skip-bdb skip-innodb |
Restart mysql
1 2 3 |
[root@mailserver1 etc]# service mysqld restart Stopping MySQL: [ OK ] Starting MySQL: [ OK ] |
RAM usage after
1 2 3 4 5 6 |
[root@mailserver1 etc]# top top - 07:18:20 up 2:52, 1 user, load average: 0.06, 0.03, 0.01 Tasks: 29 total, 1 running, 28 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 2097152k total, 163464k used, 1933688k free, 0k buffers Swap: 0k total, 0k used, 0k free, 0k cached |
You can clearly notice that ram usage is decreased from 256MB to 164MB after disabling innodb and bdbd.
Comment Policy:
Your words are your own, so be nice and helpful if you can. Please, only use your real name, not your business name or keywords. Using business name or keywords instead of your real name will lead to the comment being deleted. Anonymous commenting is not allowed either. Limit the amount of links submitted in your comment. We accept clean XHTML in comments, but don't overdo it please.