4

HHVM has a built in Server, Proxygen. You can run HHVM with the Proxygen server or run it in FastCGI mode, using another server such as nginx or apache to handle web requests.

I cannot find any benchmarks or authoritative source that provides any indication of which of the two option performs best. Obviously I could provision two systems an manually test various loads under different concurrency combinations and put together a benchmark, but I'd rather avoid the work if someone has already done such a comparison.

Does anyone know in general which is the better option from a sheer performance standpoint?

Ray
  • 40,256
  • 21
  • 101
  • 138
  • Do you know for a fact that what you want to run is going to cause so much load that it matters? If not then I suggest you just not worry about it until it becomes a problem. As for why there isn't any authoritative data out there on which one is better it's because it doesn't exist. If one was objectively better than the other in all cases there'd be no reason for the other to exist. One will do better in certain cases, the other in different use cases. You'll have to set up both and benchmark them yourself to get figures relevant to your case, another reason not to worry about it yet. – GordonM Mar 08 '17 at 09:27

1 Answers1

1

I have not done any measurement. But in theory, proxygen server would be more performant because it runs in the same process as the php worker threads, thus avoiding some overhead inter-process communication. Proxygen server is used at Facebook and some efforts are made to make it more reliable, e.g., protection mechanisms when the JIT compiler isn't fully warmed up. However, these should not matter much for other users. If you already have your favorite apache/nginx setup and do not want to spend the time to tune settings for another http server, use FastCGI.

B. Liu
  • 26
  • 3