WeBWorK Main Forum

Memory requirements for server to support 20-30 exams at same time? (>4 students KILLS my 1 Gb server!!!)

Memory requirements for server to support 20-30 exams at same time? (>4 students KILLS my 1 Gb server!!!)

by Christian Seberino -
Number of replies: 5
I have a little WebWork server with 1 Gb RAM that works great
for homeworks since not all students do them at the EXACT
same time.

However, if I end up
with MANY students hitting the server at the EXACT same time
then I'm toast.

How much memory is needed to support say 20-30 simultaneous
exam takers?  Any other tricks one can do to make Webwork scale more?

Thanks,

Chris


In reply to Christian Seberino

Re: Memory requirements for server to support 20-30 exams at same time? (>4 students KILLS my 1 Gb server!!!)

by Björn Bergstrand -
Maybe this isn't really helpful to you, but we run simultaneous exams with up to 50 students on a server with 16 GB memory. It would probably work with significantly less.
If there's anything specific you'd like to know about our set-up i'd be happy to help. We haven't tweaked the configuration much, other than running

<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 320
MaxRequestsPerChild 100
</IfModule>

in the apache config, taking the 20 MaxClients per gig ram suggestion.
In reply to Björn Bergstrand

Re: Memory requirements for server to support 20-30 exams at same time? (>4 students KILLS my 1 Gb server!!!)

by Christian Seberino -
Thanks this helps.  I have lots of OTHER stuff running on the server
which must explain why I can't get more than 4 simultaneous exams.

I'm amazed people can get 20 with 1 Gb of RAM.  That's good to know.

cs


In reply to Christian Seberino

Re: Memory requirements for server to support 20-30 exams at same time? (>4 students KILLS my 1 Gb server!!!)

by Andras Balogh -
>>I have lots of OTHER stuff running on the server
This kind of makes it impossible to answer your question, doesn't it?

Memory and computers are cheap nowadays we recently had a 4GB $500 pc
running more than 10 courses, and exams with about 30 students.

Andras
In reply to Christian Seberino

Re: Memory requirements for server to support 20-30 exams at same time? (>4 students KILLS my 1 Gb server!!!)

by Danny Glin -
I think the two biggest tweaks for Apache performance are:
  1. As Bjorn suggested, making sure MaxRequestsPerChild is set low (we've sort of settled on 100 as a good number), and that MaxClients is set appropriately for your server (20 clients per GB of RAM is a good rule of thumb for WeBWorK).  If these two are set sufficiently low, then large numbers of simultaneous hits won't crash the server.  Instead students will not be able to connect until a server process becomes available.
  2. Setting up lighttpd to handle static images, as described here.
Danny
In reply to Danny Glin

Re: Memory requirements for server to support 20-30 exams at same time? (>4 students KILLS my 1 Gb server!!!)

by Christian Seberino -
I am not an expert at Amazon Web Services and Rackspace
but it appears that may be a way to get the needed amount of RAM
only when needing it to save money no?

Since exams are very rare, instead of sporting a server with 8-16 Gb of RAM 24/7, wouldn't it make sense to have a cloud service set up to spin up the
big server for 1-2 hours only during exam times?

cs