Posted by & filed under Moodle.

moodleiconOver the summer I took a Moodle unit testing plugin and updated it so that it’ll use JUnit 4 and improved on the interface a bit. Since the school year started I’ve been using it with my students, and up until a couple of days ago it worked without a hitch.

What caught us is that we were giving a test to about 55 students at the same time, and they were all submitting Java code to my little $10 a month DigitalOcean VPS droplet. About 30 minutes in everything slowed down to a crawl. Server load was about 60x over max and there were around 250 instances of javac running.

Fortunately, it was a pretty easy fix. I had my students sit back, take a deep breath, and not submit anything for a couple of minutes. That took care of 27 of the 55 testers, and it was enough to get the server load down below 10. Still high, but you couldn’t tell by the speed of the server. It was reacting just like it should.

Most impressive is that the server never actually crashed. The droplet only has 1gb RAM along with a 2gb swap, but while I was watching it never had to touch the swap.

Guess the lesson is that we probably shouldn’t test 55 students at the same time if they’re all going to be writing and submitting code.

Leave a Reply

Your email address will not be published. Required fields are marked *