francoisjacquet / rosariosis

RosarioSIS Student Information System for school management.
https://www.rosariosis.org
GNU General Public License v2.0
526 stars 349 forks source link

What are the minimum hardware requirements? #285

Open curiosport opened 1 year ago

curiosport commented 1 year ago

I have read the requirements at the software level but I was hoping for some recommendations at the hardware level, this server for example how many users could it handle?

2 vCPU
2 GB RAM
40 GB SSD
20 TB TRAFFIC

I wanted to ask this question on the forum but I have not been able to register because I do not receive the confirmation email.

francoisjacquet commented 1 year ago

Hello @curiosport

RosarioSIS is a lightweight PHP application.

One thing is tuning your VPS for maximum performance (see Apache, PHP and PostgreSQL/MySQL configuration files) which is a topic on its own...

Here is a test: generate a Report Card PDF for 250 students. (values are peaks) PHP consumed 20 MB RAM. To this, you have to add RAM used by wkhtmltopdf: 500 MB. And RAM used by PostgreSQL: 12 MB.

So a PDF will consume a lot more RAM (about 2 MB per page). But for other requests not involving PDF generation (wkhtmltopdf), 30 MB RAM is enough.

Based on that, you can calculate how many concurrent requests you can handle with 2 GB RAM: Let's say your VPS consumes 500 MB RAM when idle. You still have 1500 MB to handle requests. This is 1500 / 30 = 50 concurrent requests (no PDF). For PDF requests, this depends on the number of pages of the PDF (2 MB per page on average).

The maximum number of items in a list in RosarioSIS is 1000. Let's say you have 1000 students or more, you will be able to, at most, print Report Cards for 1000 students at once, which should generate a PDF of 1000 pages. wkhtmltopdf will consume about 2000 MB RAM PHP 40 MB and PostgreSQL 20 MB plus 500 MB for the system

So, to handle schools of 1000 students or more, I would recommend at least a VPS with 3 GB RAM.

2 GB RAM is enough for up to 750 students (per school).

curiosport commented 1 year ago

Thank you very much for the information.

francoisjacquet commented 11 months ago

FYI, I did a test, to print Report Cards for 1000 students at once, on PC with 8GB RAM, and wkhtmltopdf failed with an error.