Hello, my name is Pranata, a student who is currently testing performance of a cluster designed for hosting e-learning website (intranet). I use 1 server as load balancer, 3 webservers (where I put Moodle on) & 1 MySQL server. All 3 Moodle servers mount the same data directory using NFS & connect to 1 MySQL database server. I build the cluster based on Linux Virtual Server (LVS) & deploy an LVS-NAT topology with round robin scheduling algorithm.
Load balancer : CentOS Intel Xeon Quad Core 2.66 GHz, 2GB RAM, 40GB
Web Server : Intel Core2 Duo 2.8GHz, 1GB RAM, 20GB, CentOS, httpd web server, Moodle 1.9+
MySQL Server : Intel Core2 Duo 2.93 GHz, 2GB RAM, 40GB, CentOS, MySQL 5+
I have tested the time response performance by opening many pages simultaneously (in 1 web browser) & measured how long it took to load all pages. Everything seems right until 300 pages time response test. Exceeding 300 pages, the cluster begins to down (with some pages failed to load). In 500 pages time response test, server failed to load within 100 seconds.
What I wonder is, in case of testing a single server without clustering (database & webserver in 1 CPU), server successfully processed 500 pages without failure although it took very long time (much longer than in cluster) to finish loading all 500 pages.
Single Server : Intel Core2 Duo 2.8 GHz, CentOS, httpd web server, MySQL 5+, Moodle
I conclude the problem is caused by MySQL bottleneck. I've tried to test it again & again using different my.cnf configurations, one of the latest conf I made is listed below & it still failed to load 500 pages simultaneously.
[root@datacenter ~]# nano /etc/my.cnf
[mysqld]
back_log = 75
skip-innodb
max_connections = 100000
key_buffer = 128M
myisam_sort_buffer_size = 16M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 4M
table_cache = 8192
thread_cache_size = 384
wait_timeout = 7200
connect_timeout = 10
tmp_table_size = 64M
max_heap_table_size = 64M
max_allowed_packet = 16M
max_connect_errors = 1000
read_rnd_buffer_size = 524288
bulk_insert_buffer_size = 8M
query_cache_limit = 4M
query_cache_size = 64M
query_cache_type = 1
query_prealloc_size = 65536
query_alloc_block_size = 131072
default-storage-engine = MyISAM
skip-name-resolve
thread_concurrency = 4
[mysqld_safe]
nice = -5
open_files_limit = 8192
[mysqldump]
quick
max_allowed_packet = 16M
[myisamchk]
key_buffer = 64M
sort_buffer = 64M
I don't believe that Moodle has a limitation in how many pages can be loaded simultaneously. Based on anyone's experiences, I would like to know what to change in that configuration so that more than 500 Moodle pages can be loaded simultaneously. Any recommendations will be appreciated. Thank you very much. I'm sorry for my bad English too.
Best regards,
Pranata