Should I use PHP HHVM+Apache2 or PHP7+Apache2 or HHVM+NginX or PHP7+Nginx for the best performance?

 
steffenslocum asked 49 years ago

Should I use PHP HHVM+Apache2 or PHP7+Apache2 or HHVM+NginX or PHP7+Nginx for the best performance?

Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?

  •  
    1
    Share
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?
Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?
Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?
Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?

Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?

3 Answers
Tamunofiniarisa Staff answered 4 months ago

Answer For Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?

The 4 product options are of 2 types:
Type : Web Server

Answer For Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?

  1. Apache2
  2. Nginx

Type : RunTime

Answer For Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?

  1. HHVM
  2. PHP 7

The WebServer competition is already won by Nginx as the latter uses asynchronous process better than Apache. Here is a better run down – Apache vs Nginx: Practical Considerations
Between PHP 7 and HHVM runtime executables, at this time HHVM is a little better than PHP 7. Here is the detailed report – The Definitive PHP 7 (Final Version) & HHVM Benchmark
Hence, for the best performance, Nginx + HHVM could be used.

Answer For Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?

  •  
    1
    Share
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Answer For Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?
Answer For Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?
Answer For Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?
Answer For Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?

yolandaesh answered 4 months ago

Answer For Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?

I don’t know much about hhvm..but i can help you with apache,nginx and php7.
I have used php7 + nginx combination and achieved around 1Million request per second in our stress and mixed load testing.
I have also tested same thing with apache2, Apache faces what is called the C10K problem – strictly speaking, difficulty supporting more than 10,000 connections at a time. (Apache falls well short of this goal.) Apache allocates memory to every additional connection, so it tends to start swapping to disk as concurrent connections increase. This sends site performance into a downward spiral and can lead the entire server to crash or freeze.
In opposite to that,NGINX runs an ongoing event loop that handles requests as they occur, without allocating resources to the requestors.
Nginx also has strong caching mechanism. It can be used for caching static as well as dynamic files. CloudFlare, a widely used CDN, uses NGINX as its operating system.
PHP 7 is said to be twice as fast as previous versions of PHP, and to use considerably less memory. It’s uses Abstract Syntax Tree mechanism for compilation which boost performance. It also has internal opcode caching feature.You can also use generator(yield) feature to perform co-operative parallel processing.
In order to get best performance.you have to fine tune your database,code and logic.keeping database connection persistent always help to increase throughout.
Memcache or redis Always plays important role in caching your results ,which will boost your performance.
At last most important key factor is infrastructure.You will need high end cpu in order to achieve best performance.
PHP 7 Performance with NGINX: Web Serving & Caching

Answer For Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?

 

Answer For Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?

  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Answer For Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?
Answer For Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?
Answer For Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?
Answer For Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?
Answer For Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?

elishabeck0 answered 4 months ago

Answer For Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?

Not really sure about all the alternatives listed in your question.
Comparing HHVM with PHP7, you can see the article here: HHVM vs PHP 7 – The Competition Gets Closer – Kinsta. There is not much to choose between the two, and in case you have a drupal website, the choice becomes easier with PHP7.
Coming to the Apache vs Nginx part, you can see another article here: NGINX vs. Apache: Our View of a Decade-Old Question. This article clearly puts it in favour of Nginx. Quoting the line from this article:
“Apache is like Microsoft Word. It has a million options but you only need six. NGINX does those six things, and it does five of them 50 times faster than Apache.”
On a personal note, I have used both Apache+PHP and Nginx +PHP (PHP-FPM) and as per my experience, I have found that PHP-FPM and Nginx provide the best performance.
Hope this helps you make an informed decision !!

Answer For Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?

 

Answer For Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?

  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Answer For Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?
Answer For Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?
Answer For Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?
Answer For Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?
Answer For Should I Use PHP HHVM+Apache2 Or PHP7+Apache2 Or HHVM+NginX Or PHP7+Nginx For The Best Performance?

Written by