I tried to check whether I shall stick with PHP or migrate all to C for the site I manage. [ habibur.com ]
When it's peak hit time, like before sun-set in Ramadan, or starting of Rabiul Awwal or Muharram -- the site gets overloaded with requests.
That means benchmark.
Load test reports :
C in cgi mode is still twice as fast as php fcgi : 300 req/sec vs 130.
But
PHP with fcgi+opcache beats my C fcgi : 3000 req/sec vs 1500 req/sec.
That's because of GC. C code uses mark & sweep, while PHP uses ref-counter.
Therefore going PHP for now. But number crunching in astronomical calculations will still remain in C. PHP can't crunch those in any meaningful way.
- Comments:
- Now up again. Deactivated because I was cleaning and backing up the server.