Roundcube Community Forum

 

Performance Gains.. Centos 6.5/ Plesk 12/Rouncube/Innodb

Started by greycode, October 01, 2014, 11:32:01 AM

Previous topic - Next topic

greycode

Guys,

We're having an extreme slow down with our roundcube install. We're currently serving a few hundred users on Roundcube basically all day. Here's the setup:

Plesk 12
Roundcube 1.0
Dovecot
Postfix

On Plesk I am seeing no lag issues, health monitor says like 0.1% usage of everything. All components below are on same server. Here's my configuration:

my.cnf

[mysqld]
local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

innodb_buffer_pool_size=512M
innodb_additional_mem_pool_size=64M
innodb_log_buffer_size=500K
innodb_thread_concurrency=12
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
innodb_buffer_pool_size=2M
innodb_additional_mem_pool_size=500K
innodb_log_buffer_size=500K
innodb_thread_concurrency=2



As you can see I increased thread concurrency to 12, and buffer pool size to 512M from the plesk default of 2M. This helped a lot. I was getting memory exhausted in logs.

I am estimating 30GB of email so far (this grows much faster than you think everyday). We're still putting more users on that will heavily use roundcube's webmail interface all day everyday, constant refreshes and composing, etc.

I need this to be as tuned as possible. I think we have 64GB of RAM available on the hypervisor, with 15 allocated to this container. Plesk says it's using 849MB of that 15GB allocated to it.

As users jump on everyday, we watch pingdom just fly away in latency. See screenshot:

http://cl.ly/image/3Q3r2M0s2e39


Can someone help me out? I have looked on Google and other forums for the last couple days and have tried enabling and disabling things, with my customers still writing in saying everything is slow and they are constantly waiting. Even getting to the login page webmail.domain.com takes forever just to load.

My roudncube config is too long to post here so I have made a pastebin: http://pastebin.com/vySBJu7y

Thank you sincerely, I am sure many other Plesk administrators will utilize this post because I have set up close to a default installation minus the few changes I have made to the config file and innodb above.

UPDATE: I have noticed a user over here posting: http://forums.cpanel.net/f402/roundcube-very-slow-396151.html - would any of these settings apply for my issue?




SKaero

The real questions is where are the delays coming from, there are three places that could be the cause:
1. The database, IMO unlikely but could since the sessions are stored in the database.
2. The web server, also unlikely but I've seen it before.
3. The IMAP server a good bet and the most common place for slow downs and delays.

Yoni

This is like shooting in the dark...

Have you been able to identify what or which service(s) is causing the issue in the first place? Roundcube is just the webmail IMAP client and there in nothing in specific in your configuration that could tell me something is going south.

mysql
apache / php
Dovecot

Check the connection limit in MySQL. Maybe you are reaching the limit and you may want to increase it.

Check apache configuration MaxClients?

Check PHP memory limit and how it is being recycled.

Check  dovecot connections (Maximum number of connections from user+IP) and (increase the process_limit for imap).

God luck!

alec

From the config I see you're not using imap caches. So, the database shouldn't be much loaded. Are you sure it's database fault? Maybe that's not Rouncube issue? You could try using memcached for session, but first of all see what is slow. E.g. create a separate Roundcube instance where you can login alone with enabled imap_debug and check what is slow there. Because I think it might be something on dovecot side.

greycode

Guys,

Thanks for the tips. Here's my php.ini in /etc/psa-webmail/roundcube

http://pastebin.com/tkmzLfnL

And heres my apache config in /etc/httpd/httpd.conf

http://pastebin.com/A63CVfA6 (modsecurity is on)

And dovecot.conf in /etc/dovecot

http://pastebin.com/xJvkcmzB

Anything look strange? I can't seem to pin this one down myself..

Thank you for your help.



P.S If I try to watch my Apache processes, it shows 0?

http://cl.ly/image/1R2W2V2f3H3q

SKaero

You need to look at logs to be able to determine where the problem is, then you can look at the configs to find what needs to be changed.

P.S. Is httpd on CentOS/RHEL not apache2 thats on Debian