Reducing memory In Kloxo

Let's reduce the Mysql server memory requirements

# nano /etc/my.cnf

inside section [mysqld] add:
skip-innodb
skip-bdb
skip-locking
port = 3306
key_buffer = 16K
max_allowed_packet = 1M
table_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 64K

at the end of the same file add:
[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
    # Remove the next comment character if you are not familiar with SQL
# safe-updates

[isamchk]
key_buffer = 8M
sort_buffer_size = 8M

[myisamchk]
key_buffer = 8M
sort_buffer_size = 8M

[mysqlhotcopy]
interactive-timeout


Let's reduce the Apache server memory requirements

nano /etc/httpd/conf/httpd.conf

We change the KeepAliveTimeout value into:
KeepAliveTimeout 3

We need to modify the IfModule prefork.c section with the following values:
StartServers 1
MinSpareServers 1
MaxSpareServers 5
ServerLimit 50
MaxClients 50
MaxRequestsPerChild 5000

Then we better comment out the unnecessarily loaded modules, such as:
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
#LoadModule ldap_module modules/mod_ldap.so

or whatever you may not need.

Finally, let's verify the Apache configuration:
/usr/sbin/apachectl -t

and apply the new configurations:
/etc/init.d/mysqld restart
/etc/init.d/httpd restart
  • 25 Users Found This Useful
Was this answer helpful?

Related Articles

Setting up a Linux Streaming Server

Linux, streaming server Linux, allows you to stream video, audio or other media on your website....

How to Install LiteSpeed on a WHM/cPanel Server

Here’s how you install LiteSpeed on a WHM/cPanel Server – it should take about 25minutes from...

Change the default SSH port

The Secure Shell (SSH) Protocol by default uses port 22. Accepting this value does not make your...

Using VI Text Editor

Text editors are programs used to create or edit files. One of the most popular editors on...

Reset a MySQL root password

So you've managed to misplace your root login for a MySQL database? Not to worry, the following...