Hi, I found with our installation that 100 concurrent connections isn't unusual, especially during peak usage times. We've set our max connections right up to compensate.
I would recommend getting the innotop program, as you can see realtime what queries are taking a long time to execute. I've attached the my.cnf we're using in a hope that my config tweaks can help others. For comparison my hardware is 3Gb RAM, Celeron 3GHz on linux 2.6.18 and MySQL 5.0.32 - and currently I have 135 connections and it's still half an hour before everyone starts work. Here we have 4,400 accounts on the server. Another recommendation I have is to have a second server purely for backup, have it as a read-only slave and take it offline every day to perform the daily backup dump, then bring it back online and let it sync up to the main server. Then the time, disk and cpu it takes to backup doesn't affect the speed of the main server. Disclaimer: I'm not a database expert, my tweaks aren't perfect but they work for me from the information I've gleaned from many mailing lists. # The MySQL database server configuration file. [client] port = 3306 socket = /var/run/mysqld/mysqld.sock [mysqld_safe] socket = /var/run/mysqld/mysqld.sock nice = 0 [mysqld] # # * Basic Settings # user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp language = /usr/share/mysql/english skip-external-locking skip-name-resolve bind-address = 0.0.0.0 # # * Fine Tuning # key_buffer = 1024M key_buffer_size = 16M max_allowed_packet = 128M table_cache = 2048 sort_buffer_size = 32M read_buffer_size = 8M read_rnd_buffer_size = 62M myisam_sort_buffer_size = 64M thread_concurrency = 4 thread_stack = 128K thread_cache_size = 8 max_connections = 1800 query_cache_limit = 5M query_cache_size = 512M log_bin = /storage/binlog/mysql-bin.log expire_logs_days = 5 max_binlog_size = 100M skip-bdb innodb_buffer_pool_size=100M innodb_log_buffer_size=8M innodb_file_per_table [mysqldump] quick quote-names max_allowed_packet = 128M [mysql] #no-auto-rehash # faster start of mysql but no tab completition [isamchk] key_buffer = 16M _______________________________________________ DBmail mailing list [email protected] https://mailman.fastxs.nl/mailman/listinfo/dbmail
