Webserver performance testing
Date: 2024-12-15
Category: Misc
I've allways used Apache, mostly because that's what I was used to, The bottlenck in my sites (like Skyz) was mostly the PHP code itself. Now I'm rewriting Skyz and I was testing cache performance. I noticed Apache took a lot of the CPU time away from the uWSGI process. So I decided to do some testing.
I tested the setup on a 2 core VM on my homelab proxmox cluster, running apachebench from another vm to simulate a load. The results speak for themselves.
I'll be moving my configurations to Nginx over the next few days/weeks.
here are the results, in requests processed per second/
Apache tests
1 uwsgi worker, no cache | 309.11/s |
2 uwsgi workers, no cache | 401.13/s |
1 uwsgi worker, memcache | 548.37/s |
2 uwsgi workers, memcache | 600.75/s |
Nginx tests
Here I noticed adding a second worker actually slows the application down.
1 uwsgi worker, no cache | 781.39/s |
2 uwsgi workers, no cache | 600.96/s |
1 uwsgi worker, memcache | 844.07/s |
2 uwsgi workers, memcache | 617.26 |