Subject: The mailing list for listmasters using Sympa
List archive
RE: [sympa-users] slowness problem after upgrade from 5.2.1
- From: Steve Shipway <address@concealed>
- To: "'Cretu Adrian'" <address@concealed>, "'address@concealed'" <address@concealed>
- Subject: RE: [sympa-users] slowness problem after upgrade from 5.2.1
- Date: Wed, 11 Sep 2013 22:18:29 +0000
Check your table indexes! Make sure conf_table has a unique primary index by robot_conf and label_conf. Also, check your MySQL has enough memory.
In our case, I added a couple more new indexes (sorry, but I can’t remember which ones offhand) where they were needed to improve performance; I also tuned our MySQL to give a lot more memory to in-memory index caching, and this massively improved performance. Since the MySQL instance is dedicated to Sympa I could safely do this… I also added a couple of indexes on the list_table and installed the riseup patch as we have tens of thousands of lists on our server and the web frontend ran very slowly without this.
For comparison, this is how we have tuned MySQL – note that YMMV! This is a 12GB host with 4 CPU and a LOT of lists.
query_cache_type=1 query_cache_limit=1M query_cache_size=48M # max_connections=500 # Reduced to 200 as memory will not be enough for 500 connections. # memory=key_buffer+(sort_buffer_size+read_buffer_size)*max_connections # which is now: 64 + (1 + 1) * 200 = 464 MB # max_connections = approx. MaxClients setting in httpd.conf file # Default set to 100. max_connections=200 interactive_timeout=100 # Reduced wait_timeout to prevent idle clients holding connections. wait_timeout=30 connect_timeout=10 #table_cache=256 #table_cache=1024 # Checked opened tables and adjusted accordingly after running for a while. table_cache=768 #tmp_table_size=32M by default tmp_table_size=64M # max_heap_table_size must be the same as tmp_table_size max_heap_table_size=64M thread_cache=128 # Maybe reduce it to 32 to prevent memory hogging. Also, see notes below. #thread_cache=32 key_buffer=258M # Commented out the buffer sizes and keeping the default. # sort_buffer_size=2M by default. sort_buffer_size=2M # read_buffer_size=128K by default. read_buffer_size=2M join_buffer_size=2M # 1Mb of read_rnd_buffer_size for 1GB RAM -- see notes below. # read_rnd_buffer_size=256K by default. read_rnd_buffer_size=1M # myisam_sort_buffer_size used for ALTER, OPTIMIZE, REPAIR TABLE commands. # myisam_sort_buffer_size=8M by default. myisam_sort_buffer_size=64M # thread_concurrency = 2 * (no. of CPU) thread_concurrency=8 # log slow queries is a must. Many queries that take more than 2 seconds. # If so, then your tables need enhancement. log_slow_queries=/var/log/mysqld.slow.log long_query_time=2 # Required to avoid problems with BIG lists: ESSENTIAL for Sympa max_allowed_packet = 50000000
Steve
Steve Shipway ITS Unix Services Design Lead University of Auckland, New Zealand Floor 1, 58 Symonds Street, Auckland Phone: +64 (0)9 3737599 ext 86487 DDI: +64 (0)9 923 6487 Mobile: +64 (0)21 753 189 Email: address@concealed P Please consider the environment before printing this e-mail : 打印本邮件,将减少一棵树存活的机会
From: address@concealed [mailto:address@concealed] On Behalf Of Cretu Adrian
Hi guys I had to upgrade an old 5.2.1 sympa to the last debian stable one that is 6.1.11. The steps were: - dump the old postgress database, create a new mysql database and import the data - update the configuration files of the new sympa - move the archives to the new server - run the upgrade command After all this I could login on web on the new sympa and do all sorts of things but everything was slow, even sympa --help or sympa -v is slow. After enabling mysql logs and a strace on the pid it seems that each time I use the sympa cli or api it does a massive number of mysql selects. ex: Any hints are welcome , thanks. |
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
-
[sympa-users] slowness problem after upgrade from 5.2.1,
Cretu Adrian, 09/11/2013
-
RE: [sympa-users] slowness problem after upgrade from 5.2.1,
Steve Shipway, 09/11/2013
-
Re: [sympa-users] slowness problem after upgrade from 5.2.1,
Cretu Adrian, 09/12/2013
- RE: [sympa-users] slowness problem after upgrade from 5.2.1, Steve Shipway, 09/12/2013
-
Re: [sympa-users] slowness problem after upgrade from 5.2.1,
Cretu Adrian, 09/12/2013
-
RE: [sympa-users] slowness problem after upgrade from 5.2.1,
Steve Shipway, 09/11/2013
Archive powered by MHonArc 2.6.19+.