Our department operates a new webwork server (12 cores, 128 GB ram, debian 8, webwork 2.11) that is getting loaded now with more courses and there is one more on order (20 cores, 256 GB ram) to serve a large
course in fall (800+ students) So I was looking at the resource requirements for apache. Please see below from a test setup -
apache with ssl no webwork enabled on config -
17835 www-data 20 0 277716 15616 8912 S 0.0 0.8 0:00.66 /usr/sbin/apach
apache with ssl with webwork apache config enabled -
22130 www-data 20 0 489012 112412 1944 S 0.0 5.5 0:00.00 /usr/sbin/apach
As you could see, enabling webwork bumps up the resident size to over 100 MB per process. On the production webwork server, I see that it grows continuously to a gigabyte and beyond. I have somewhat worked around it by dialing down MaxSpareServers,KeepAliveTimeout and MaxConnectionsPerChild, adjusting MaxRequestWorkers and ServerLimit
by assuming 200 MB per apache process (instead of the 50 MB mentioned in one of the install guides) and with Apache2::SizeLimit using 600 MB virtual size as the limit for graceful termination of apache process (turns
out to be 200 - 250 MB resident size) But if the apache process could use less than 50 MB resident size, it might be possible for me to squeeze in more courses on the server.
Please see the pmap output below. I could see a large anon allocation below apache that might be the reason for this ballooned up resident size -
0000558760782000 0 0 0 rw--- apache2
0000558760786000 12 8 8 rw--- [ anon ]
0000558760786000 0 0 0 rw--- [ anon ]
0000558761d48000 105160 105096 105096 rw--- [ anon ]
I did some testing starting with a blank apache webwork config file and adding all lines up to
eval "use lib '$pg_dir/lib'"; die $@ if $@; Here is the process -
21945 www-data 20 0 324636 19200 1976 S 0.0 0.9 0:00.00 /usr/sbin/apach
Then adding require Apache::WeBWorK; and restart apache. Please see below. This adds about
85 MB -
22136 www-data 20 0 480216 105604 1880 S 0.0 5.2 0:00.00 /usr/sbin/apach
Then adding the rest of the lines back adds another few megabytes to the resident size -
22396 www-data 20 0 489004 112432 1972 S 0.0 5.5 0:00.00 /usr/sbin/apach
Is there something in the webwork config I could modify to get the resident sizes to reasonable values and stop the ballooning effect when students access the courses? Thanks very much.
Balagopal