Reduce RAM usage of mysql and apache on RT install 1GB Ram vps

Hi,

We have about 20 users and I have access to a virtual server with 1GB ram.
I notice we are running out of memory.
Any suggestions on how to reduce the memory requirements would be
appreciated.

Here are the packages for apache and mysql also the mods-enabled for apache.

please let me know if you need the apache2.conf or the my.conf

We run on Debian Squeeze
dpkg -l|grep apache2
ii apache2 2.2.16-6+squeeze1
Apache HTTP Server metapackage
ii apache2-mpm-worker 2.2.16-6+squeeze1
Apache HTTP Server - high speed threaded model
ii apache2-utils 2.2.16-6+squeeze1
utility programs for webservers
ii apache2.2-bin 2.2.16-6+squeeze1
Apache HTTP Server common binary files
ii apache2.2-common 2.2.16-6+squeeze1
Apache HTTP Server common files
ii libapache2-mod-perl2 2.0.4-7
Integration of perl with the Apache2 web server
ii libapache2-reload-perl 0.10-2
Reload Perl modules when changed on disk

dpkg -l|grep mysql
ii libdbd-mysql-perl 4.016-1
Perl5 database interface to the MySQL database
ii libmysqlclient16 5.1.49-3
MySQL database client library
ii mysql-client-5.1 5.1.49-3
MySQL database client binaries
ii mysql-common 5.1.49-3
MySQL database common files, e.g. /etc/mysql/my.cnf
ii mysql-server 5.1.49-3
MySQL database server (metapackage depending on the latest version)
ii mysql-server-5.1 5.1.49-3
MySQL database server binaries and system database setup
ii mysql-server-core-5.1 5.1.49-3
MySQL database server binaries

/etc/apache2/mods-enabled# ls -l
total 0
lrwxrwxrwx 1 root root 28 May 18 18:00 alias.conf ->
…/mods-available/alias.conf
lrwxrwxrwx 1 root root 28 May 18 18:00 alias.load ->
…/mods-available/alias.load
lrwxrwxrwx 1 root root 33 May 18 18:00 auth_basic.load ->
…/mods-available/auth_basic.load
lrwxrwxrwx 1 root root 33 May 18 18:00 authn_file.load ->
…/mods-available/authn_file.load
lrwxrwxrwx 1 root root 36 May 18 18:00 authz_default.load ->
…/mods-available/authz_default.load
lrwxrwxrwx 1 root root 38 May 18 18:00 authz_groupfile.load ->
…/mods-available/authz_groupfile.load
lrwxrwxrwx 1 root root 33 May 18 18:00 authz_host.load ->
…/mods-available/authz_host.load
lrwxrwxrwx 1 root root 33 May 18 18:00 authz_user.load ->
…/mods-available/authz_user.load
lrwxrwxrwx 1 root root 32 May 18 18:00 autoindex.conf ->
…/mods-available/autoindex.conf
lrwxrwxrwx 1 root root 32 May 18 18:00 autoindex.load ->
…/mods-available/autoindex.load
lrwxrwxrwx 1 root root 27 May 18 18:00 cgid.conf ->
…/mods-available/cgid.conf
lrwxrwxrwx 1 root root 27 May 18 18:00 cgid.load ->
…/mods-available/cgid.load
lrwxrwxrwx 1 root root 30 May 18 18:00 deflate.conf ->
…/mods-available/deflate.conf
lrwxrwxrwx 1 root root 30 May 18 18:00 deflate.load ->
…/mods-available/deflate.load
lrwxrwxrwx 1 root root 26 May 18 18:00 dir.conf ->
…/mods-available/dir.conf
lrwxrwxrwx 1 root root 26 May 18 18:00 dir.load ->
…/mods-available/dir.load
lrwxrwxrwx 1 root root 26 May 18 18:00 env.load ->
…/mods-available/env.load
lrwxrwxrwx 1 root root 27 May 18 18:00 mime.conf ->
…/mods-available/mime.conf
lrwxrwxrwx 1 root root 27 May 18 18:00 mime.load ->
…/mods-available/mime.load
lrwxrwxrwx 1 root root 34 May 18 18:00 negotiation.conf ->
…/mods-available/negotiation.conf
lrwxrwxrwx 1 root root 34 May 18 18:00 negotiation.load ->
…/mods-available/negotiation.load
lrwxrwxrwx 1 root root 27 May 18 18:11 perl.load ->
…/mods-available/perl.load
lrwxrwxrwx 1 root root 33 May 18 18:00 reqtimeout.conf ->
…/mods-available/reqtimeout.conf
lrwxrwxrwx 1 root root 33 May 18 18:00 reqtimeout.load ->
…/mods-available/reqtimeout.load
lrwxrwxrwx 1 root root 31 May 18 18:00 setenvif.conf ->
…/mods-available/setenvif.conf
lrwxrwxrwx 1 root root 31 May 18 18:00 setenvif.load ->
…/mods-available/setenvif.load
lrwxrwxrwx 1 root root 29 May 18 18:00 status.conf ->
…/mods-available/status.conf
lrwxrwxrwx 1 root root 29 May 18 18:00 status.load ->
…/mods-available/status.load

We have about 20 users and I have access to a virtual server with 1GB ram.
I notice we are running out of memory.
Any suggestions on how to reduce the memory requirements would be
appreciated.

You could tune mysql down, and tune apache to only have 2 or 3
children, but the admin time spent doing that is worth way more than
1G of RAM these days. If you do tune it down, you’ll be trading
database performance and making RT really slow.

-kevin

Understood, I have upgraded the memory to 2GB.
Let’s see how it works.On 24/08/2011 9:35 AM, Kevin Falcone wrote:

On Wed, Aug 24, 2011 at 08:42:48AM -0400, Gilbert Rebeiro wrote:

We have about 20 users and I have access to a virtual server with 1GB ram.
I notice we are running out of memory.
Any suggestions on how to reduce the memory requirements would be
appreciated.
You could tune mysql down, and tune apache to only have 2 or 3
children, but the admin time spent doing that is worth way more than
1G of RAM these days. If you do tune it down, you’ll be trading
database performance and making RT really slow.

-kevin

Here are the packages for apache and mysql also the mods-enabled for apache.

please let me know if you need the apache2.conf or the my.conf

We run on Debian Squeeze
dpkg -l|grep apache2
ii apache2 2.2.16-6+squeeze1
Apache HTTP Server metapackage
ii apache2-mpm-worker 2.2.16-6+squeeze1
Apache HTTP Server - high speed threaded model
ii apache2-utils 2.2.16-6+squeeze1
utility programs for webservers
ii apache2.2-bin 2.2.16-6+squeeze1
Apache HTTP Server common binary files
ii apache2.2-common 2.2.16-6+squeeze1
Apache HTTP Server common files
ii libapache2-mod-perl2 2.0.4-7
Integration of perl with the Apache2 web server
ii libapache2-reload-perl 0.10-2
Reload Perl modules when changed on disk

dpkg -l|grep mysql
ii libdbd-mysql-perl 4.016-1
Perl5 database interface to the MySQL database
ii libmysqlclient16 5.1.49-3
MySQL database client library
ii mysql-client-5.1 5.1.49-3
MySQL database client binaries
ii mysql-common 5.1.49-3
MySQL database common files, e.g. /etc/mysql/my.cnf
ii mysql-server 5.1.49-3
MySQL database server (metapackage depending on the latest version)
ii mysql-server-5.1 5.1.49-3
MySQL database server binaries and system database setup
ii mysql-server-core-5.1 5.1.49-3
MySQL database server binaries

/etc/apache2/mods-enabled# ls -l
total 0
lrwxrwxrwx 1 root root 28 May 18 18:00 alias.conf ->
…/mods-available/alias.conf
lrwxrwxrwx 1 root root 28 May 18 18:00 alias.load ->
…/mods-available/alias.load
lrwxrwxrwx 1 root root 33 May 18 18:00 auth_basic.load ->
…/mods-available/auth_basic.load
lrwxrwxrwx 1 root root 33 May 18 18:00 authn_file.load ->
…/mods-available/authn_file.load
lrwxrwxrwx 1 root root 36 May 18 18:00 authz_default.load ->
…/mods-available/authz_default.load
lrwxrwxrwx 1 root root 38 May 18 18:00 authz_groupfile.load ->
…/mods-available/authz_groupfile.load
lrwxrwxrwx 1 root root 33 May 18 18:00 authz_host.load ->
…/mods-available/authz_host.load
lrwxrwxrwx 1 root root 33 May 18 18:00 authz_user.load ->
…/mods-available/authz_user.load
lrwxrwxrwx 1 root root 32 May 18 18:00 autoindex.conf ->
…/mods-available/autoindex.conf
lrwxrwxrwx 1 root root 32 May 18 18:00 autoindex.load ->
…/mods-available/autoindex.load
lrwxrwxrwx 1 root root 27 May 18 18:00 cgid.conf ->
…/mods-available/cgid.conf
lrwxrwxrwx 1 root root 27 May 18 18:00 cgid.load ->
…/mods-available/cgid.load
lrwxrwxrwx 1 root root 30 May 18 18:00 deflate.conf ->
…/mods-available/deflate.conf
lrwxrwxrwx 1 root root 30 May 18 18:00 deflate.load ->
…/mods-available/deflate.load
lrwxrwxrwx 1 root root 26 May 18 18:00 dir.conf ->
…/mods-available/dir.conf
lrwxrwxrwx 1 root root 26 May 18 18:00 dir.load ->
…/mods-available/dir.load
lrwxrwxrwx 1 root root 26 May 18 18:00 env.load ->
…/mods-available/env.load
lrwxrwxrwx 1 root root 27 May 18 18:00 mime.conf ->
…/mods-available/mime.conf
lrwxrwxrwx 1 root root 27 May 18 18:00 mime.load ->
…/mods-available/mime.load
lrwxrwxrwx 1 root root 34 May 18 18:00 negotiation.conf ->
…/mods-available/negotiation.conf
lrwxrwxrwx 1 root root 34 May 18 18:00 negotiation.load ->
…/mods-available/negotiation.load
lrwxrwxrwx 1 root root 27 May 18 18:11 perl.load ->
…/mods-available/perl.load
lrwxrwxrwx 1 root root 33 May 18 18:00 reqtimeout.conf ->
…/mods-available/reqtimeout.conf
lrwxrwxrwx 1 root root 33 May 18 18:00 reqtimeout.load ->
…/mods-available/reqtimeout.load
lrwxrwxrwx 1 root root 31 May 18 18:00 setenvif.conf ->
…/mods-available/setenvif.conf
lrwxrwxrwx 1 root root 31 May 18 18:00 setenvif.load ->
…/mods-available/setenvif.load
lrwxrwxrwx 1 root root 29 May 18 18:00 status.conf ->
…/mods-available/status.conf
lrwxrwxrwx 1 root root 29 May 18 18:00 status.load ->
…/mods-available/status.load


RT Training Sessions (http://bestpractical.com/services/training.html)

  • Chicago, IL, USA September 26& 27, 2011
  • San Francisco, CA, USA October 18& 19, 2011
  • Washington DC, USA October 31& November 1, 2011
  • Melbourne VIC, Australia November 28& 29, 2011
  • Barcelona, Spain November 28& 29, 2011

RT Training Sessions (http://bestpractical.com/services/training.html)

  • Chicago, IL, USA — September 26& 27, 2011
  • San Francisco, CA, USA — October 18& 19, 2011
  • Washington DC, USA — October 31& November 1, 2011
  • Melbourne VIC, Australia — November 28& 29, 2011
  • Barcelona, Spain — November 28& 29, 2011

Understood, I have upgraded the memory to 2GB.
Let’s see how it works.

Which RT Version do you run?

It would be great if you could share your experiences with me.

We moved your RT 3.8.6 some weeks ago from a 32bit Debian lenny machine
to a 64bit Debian squeeze VM with 4GB RAM.
Since then the apache processes eating up all the memory.
As we don’t changed the RT Version I think it’s not RT fault.
I guess there is a memory leak in one of the Perl modules.

We use all the Perl modules from the Debian repository.

-Chris

Loading less translations of the interface saves memory. Module that parses
po files is not memory efficient and I can’t find cycles to improve it.

Using RT on Apache with mod_perl without reverse proxy in front is also
memory hungry setup. Use reverse proxy for mod_perl setups.

Simple fastcgi is a little bit better as web server acts like proxy and one
fastcgi process may serve several server processes. However, each fastcgi
process started on its own by web server and don’t share memory.

Recent RT versions have external fastcgi server that uses forks and shares
memory.

I think external forking fastcgi server with nginx/lighttpd/Apache in front
may give most memory effective setup.

Regards, Ruslan. From phone.

написал: