Could not compile stylesheet for simplistic. Using last compiled stylesheet.

Reduce Kloxo Memory Usage

0
Hi Webmaisters,

Today, I have played again with Kloxo settings and decided to put this in our forum.

Well, if your VPS with Kloxo is running out of memory very fast, this should help you to reduce RAM leakage with 100-200MB even more.

REMEMBER: MAKE BACK UP BEFORE EDIT

1. So, most popular CMS are database driven, so logically we need to optimize MySQL connections:

Find /etc/my.cnf

Innside section (close to the top) [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

and 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

Save the file

2. Apache Optimization

Find /etc/httpd/conf/httpd.conf

Change the KeepAliveTimeout value to:

KeepAliveTimeout 3


In the same file find "IfModule prefork.c" and replace the values:

StartServers 1
MinSpareServers 1
MaxSpareServers 5
ServerLimit 50
MaxClients 50
MaxRequestsPerChild 5000

Uncomment the following modules:

#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


Save the file (you can also uncomment other modules you don't need)

Check for errors (use Putty or JavaConsole)

/usr/sbin/apachectl -t

After that restart MySQL and Apache:

/etc/init.d/mysqld restart
/etc/init.d/httpd restart

Cheers, you just saved a lot RAM.
    Responses (0)
    • There are no replies here yet.
    Your Reply