You can check my blog about conducting quiz with 500 student. 12 GB will be enough RAM but you should take care of the CPU. You can check RAM and CPU graph in my blog post.
http://opensource-mesut.blogspot.com.tr/2018/04/moodle-quiz-activity-with-500.html