我正在使用moodle 3.2,mysql - 5.5.49 0ubantu0.12.04.1,Apache 2
以及 48 GB RAM、1 TB HDD、基于 ubutu 14.04 LTS 命令的操作系统,
我有 500 个用户,但是当 200 个用户同时参加考试时,服务器速度非常慢,服务器需要 2 分钟或更长时间才能提出问题。
请帮助我如何一次为 500 位用户提供考试
mysql、apache2和php的详细信息 --> my.cnf 用于 mysql
My.cnf
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
myisam-recover = BACKUP
max_connections = 500
(#table_cache = 64
(#thread_concurrency = 10
query_cache_limit = 1M
query_cache_size = 16M
quick
quote-names
max_allowed_packet = 16M
key_buffer = 16M
apache2 的 apache2.conf
StartServers 5
MinSpareServers 5
MaxSpareServers 10
ServerLimit 400
MaxClients 350
MaxRequestsPerChild 5
内存详细信息是 ---: (Command Free)
内存
Total - 49748700
used - 895628
free - 48859072
shared - 0
buffers - 164848
cached - 488188
Buffers/cache
used - 242592
free - 49506108
Swap
total - 134217724
used - 0
free - 134217724
最佳答案
这是我的最佳实践,它会让你的moodle更快:
对于 apache 性能 - 使用 NGINX/PHP-fpm 代替......参见 https://docs.moodle.org/dev/Install_Moodle_On_Ubuntu_with_Nginx/PHP-fpm
对于 MySQL - 使用 mariaDB10,并使用 http://mysqlyuner.pl用于调整。
您使用哪个缓存选项?内存缓存?雷迪斯?
关于mysql - 如何提高 apache2 和 mysql 的性能以及我的服务器一次可以有多少用户进行考试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41478935/