Courses 11

config.php for moodle

php

  • error_reporting = E_ALL & ~(E_NOTICE|E_DEPRECATED|E_STRICT)
  • display_errors = Off
  • register_globals = Off
  • register_long_arrays = On (this is deprecated, but questionnaire module depends on phpESP which uses register_long_arrays.)
  • post_max_size = 100M
  • file_uploads = On
  • upload_max_filesize = 100M
  • allow_url_fopen = On
  • date.timezone = America/Chicago

php cache

We use APC. Setting is default except:
/etc/php.d/apc.ini

apc.shm_size=512M

People cannot view generated (completion) certificates and we get this error if we leave it to default 64MB. See Errors and Fixes.

Internal Zend error - Missing class information for in /disks/www/courses11/lib/fpdf/fpdf.php

Apache

During exams or sudden load surge, the server doesn't seem capable of spawning children fast enough. So it's better to keep enough servers up and running.

<IfModule prefork.c>
StartServers 80
MinSpareServers 20
MaxSpareServers 120
ServerLimit 512
MaxClients 512
MaxRequestsPerChild 4000
</IfModule>

Mysql

  • max_connections: 2000
  • open_files_limit: 2500 (where?)

query cache

Query cache was off by default.
SET GLOBAL query_cache_size = 16777216; SHOW VARIABLES LIKE 'query_cache_size';

max_connections

set global max_connections=2000; set-variable = max_connections=2000 SHOW VARIABLES LIKE 'max_connections';
http://dev.mysql.com/doc/refman/5.5/en/too-many-connections.html /* Linux or Solaris should be able to support at 500 to 1000 simultaneous connections routinely and as many as 10,000 connections if you have many gigabytes of RAM available */
The default value by mysql is 151, but it's not sufficient for cehd courses site.

temporary table on disk (todo)

http://www.mysqlperformanceblog.com/2007/08/16/how-much-overhead-is-caused-by-on-disk-temporary-tables/

  1. MEMORY temporary tables can be 10-100 times faster than disk based MyISAM tables

show variables like 'tmp_table_size';

tmp_table_size | 16777216

show variables like 'max_heap_table_size';

max_heap_table_size | 16777216

show variables like 'key_buffer_size';

key_buffer_size | 8384512

set key_buffer_size=500000000 set global tmp_table_size=1000000000; set global max_heap_table_size=1000000000;

key_buffer_size

show variables like 'key_buffer_size'; | key_buffer_size | 8384512 |

directory layout

/disks/www/courses11
/disks/www/moodledata (From next years, use courses11data, courses12data, etc.)
/etc/httpd/conf.d/ssl.conf
/etc/httpd/conf/httpd.conf
/var/log/httpd/

backup

In root's cron, we run daily backup of moodledata at 3am (rotates weekly) and weekly backup at 6pm Friday.

0 3 * * * /root/bin/backup-daily.pl > /root/logs/backup-daily.log
0 18 * * Fri /root/bin/backup-weekly-hfb.sh > /root/logs/backup-weekly-hfb.log

Servers

We run 3 servers for the semester.

courses11 (production) - constellation
moodle11 (faculty) - vm
moodledev11 (developer) - vm

Taxonomy: