Questions about AWS EC2 server specs

66 views
Skip to first unread message

Shengchuang Feng

unread,
Jul 14, 2022, 4:27:54 AM7/14/22
to JATOS
Hi Kristian,

Our lab is considering buying an AWS EC2 virtual server to host JATOS for our future online experiments/questionnaires.
I checked the AWS website. There are instances/virtual machines with so many different specs, so I find it very hard to choose. 

20220714160515976.jpg
I read your answer to a similar question here https://forum.cogsci.nl/discussion/6368/jatos-server-for-my-university
You listed some examples, and I think this one is very relevant:

Intention: JATOS for a single research group
Virtual machine on a dedicated server, local at the university
4 GB memory, 4 (virtual) CPUs, 100 GB disk
Uses plain JATOS (no Docker)
Uses MySQL database (no Docker) on the same instance
Daily backup (whole server, no history)

We are going to use JATOS to deploy some long questionnaires and a few cognitive tasks to collect data of 400 participants. The size of data collected will be small (in text or CSV format), but we may use a lot of images and maybe some videos in the tests. And I guess there might be maximum 20 participants/workers doing the tests at the same time. So what specs do you recommend for the AWS instance? Would the "t4g.xlarge" at the bottom of the above table a good choice?

I appreciate any suggestion you can provide us!

Best regards,
Sheng

Kristian Lange

unread,
Jul 14, 2022, 4:26:10 PM7/14/22
to JATOS
Hi Sheng,

The t4g.xlarge has 16 GB memory. If you use JATOS for a single research group it is unlikely that you'll ever need that much memory. I'd recommend 4 GB for a single group, 8 GB if you have demanding experiments (but from the description of your experiments they seem to be normal demand-wise). And the nice thing about cloud instances: you can easily update them later on if you happen to need more resources.

Another point is that AWS' t4g instances are ARM-based and I'm not sure if plain JATOS runs on them (for Docker JATOS has an ARM image - but I've never tried it with plain JATOS). But you can basically use any general-purpose instance: just to name the obvious ones on AWS: t3.medium, t3a.medium, or even t2.medium.

Best,
Kristian

Shengchuang Feng

unread,
Jul 15, 2022, 12:45:54 AM7/15/22
to JATOS
Hi Kristian,

Thank you very much for your answer!

Could you give an example of a demanding experiment? Do such experiments need more vCPUs?
If we don't expect to have demanding experiment, t3.medium might be what we can consider. It runs on intel xeon processor and is relatively cheap. 

20220715121335509.jpg

Now I'm testing JATOS on a free-tier t2.micro Linux instance, it runs well for both the example experiments and some of my own questionnaires so far. I haven't tested how it runs when multiple participants are doing the tests or how a demanding task may affect it. If everything is ok, t3.medium should have no problem.

Best,
Sheng

Kristian Lange

unread,
Jul 17, 2022, 11:18:42 AM7/17/22
to JATOS
Hi Sheng,

t3 are currently AWS' bread and butter, general-purpose instances: they are fine for JATOS.

> Could you give an example of a demanding experiment? Do such experiments need more vCPUs?
Demanding experiments put a lot of load on the server and there are many ways to do this. This is just some common ways to do this:
* use the jatos.submitResultData or jatos.appendResultData a lot (like every couple seconds) - some experiment builders like OpenSesame/OSWeb often do this
* even worse: having big result data (in MB) in combination with many jatos.submitResultData or jatos.appendResultData
* have many experiments running at the same time, I mean literally having many participants (dozens or hundreds) doing studies in the same moment. E.g. if you post a study link on Twitter and have a thousand participant trying your study at the same time your server might get overloaded.
* all experiments that load or upload media files (video, audio, large images)

And two more things: You mentioned that you want to install MySQL on the same instance. No problems with that, but I'd suggest to
2) and limit the JVM's memory usage to half the total memory size, in your case half of 4GB = 2GB, to leave enough memory for MySQL (https://www.jatos.org/3.6.1/Configure-JATOS-on-a-Server.html#jvm-arguments)

Best,
Kristian

Shengchuang Feng

unread,
Jul 17, 2022, 11:51:38 AM7/17/22
to JATOS
Thank you Kristian for all your valuable suggestions! 

I have an issue after using Apache and SSL encryption, and I posted it as a discussion here https://forum.cogsci.nl/discussion/8069/show-jatos-local-after-configuration-of-apache-as-a-proxy#latest
Could you also take a look when you have time? Thanks!

Best.
Sheng
Reply all
Reply to author
Forward
0 new messages