메뉴 닫기

PHP7 속도향상 벤치마크 결과

CE91QtsWEAAKrlK

PHP 7.0 RC1 버전이 최근에 발표되었습니다.   스케쥴에 따라 올해 11월경 정식 런칭을 앞두고 있는데요.

엄청난 성능향상에 대해 많은 기대를 하고 있는 터라 과연 속도향상이 얼마나 이뤄졌을까

이전글에도 밝혔듯이 기존 PHP 버전들을 대상으로 벤치마크를 해봤습니다.

이전글 (http://idchowto.com/index.php/php-7-0-0-rc1-%EB%A6%B4%EB%A6%AC%EC%A6%88/) 참조

PHP7_001

imageC

1. 테스트 서버 및 버전 

 – PHP 5.2  (CentOS 5.11 64bit / Apache 2.2.7, PHP 5.2.17 / Intel Xeon E5620 2.4Ghz)
 – PHP 5.5  (CentOS 6.7 64bit, Apache 2.4.12, PHP 5.5.23 / Intel Xeon X3440 2.53Ghz)
 – PHP 5.6  (CentOS 5.11 64bit, Apache 2.4.12, PHP 5.6.12 / AMD Phenom II X4 925 2.8Ghz)
 – PHP 7.0  (CentOS 6.7 64bit / Apache 2.4.12, PHP 7.0-RC1 / Intel Xeon E3-1230 v3 3.30Ghz)

2. 테스트 환경

각 서버 마다 워드프레스를 설치하고 텍스트와 이미지가 포함된 페이지를 새로고침하면서 Waiting TTFB (TIme To First Byte) 값 측정.

– TTFB : 사이트 접속 시도 이후 최초 응답을 받기 까지의 시간을 의미.

– 테스트 도구 : 1. 크롬 개발도구의 Timing 항목 및 Web Performance API Timing 설치하여 사용.
                         2. PHP benchmark Script 를 이용해서 함수 위주의 벤치마킹 실시.   http://www.php-benchmark-script.com/

3. 테스트 결과 1 – 크롬 브라우저에서 TTFB 값 각 2회 측정 (Web Performance API Timing 의 Latency 값은 동일한 값이 나와 생략하였습니다.)

–  PHP 5.2 측정

PHP7_521

PHP7_003

–  PHP 5.5 측정

 

 


PHP7_004

PHP7_552

– PHP 5.6 측정

PHP7_561

PHP7_562

– PHP 7.0 측정

PHP7_701

PHP7_702

4. 테스트 결과 1 – PHP benchmark Script 에서 Total time 값 각 2회 측정 

 

– PHP 5.2 서버에서 실행

————————————–
| PHP BENCHMARK SCRIPT |
————————————–
Start : 2015-08-31 16:23:15
Server : @
PHP version : 5.2.17
Platform : Linux
————————————–
test_math : 5.823 sec.
test_stringmanipulation : 6.307 sec.
test_loops : 5.707 sec.
test_ifelse : 4.862 sec.
————————————–
Total time: : 22.699 sec.

————————————–
| PHP BENCHMARK SCRIPT |
————————————–
Start : 2015-08-31 16:25:11
Server : @
PHP version : 5.2.17
Platform : Linux
————————————–
test_math : 6.608 sec.
test_stringmanipulation : 6.338 sec.
test_loops : 5.526 sec.
test_ifelse : 4.493 sec.
————————————–
Total time: : 22.965 sec.

– PHP 5.5 서버에서 실행

————————————–
| PHP BENCHMARK SCRIPT |
————————————–
Start : 2015-08-31 16:24:18
Server : @
PHP version : 5.5.23
Platform : Linux
————————————–
test_math : 2.220 sec.
test_stringmanipulation : 2.140 sec.
test_loops : 2.165 sec.
test_ifelse : 1.128 sec.
————————————–
Total time: : 7.653 sec.

————————————–
| PHP BENCHMARK SCRIPT |
————————————–
Start : 2015-08-31 16:25:24
Server : @
PHP version : 5.5.23
Platform : Linux
————————————–
test_math : 2.191 sec.
test_stringmanipulation : 2.153 sec.
test_loops : 2.138 sec.
test_ifelse : 1.107 sec.
————————————–
Total time: : 7.589 sec.

– PHP 5.6 서버에서 실행

————————————–
| PHP BENCHMARK SCRIPT |
————————————–
Start : 2015-08-31 07:24:22
Server : @
PHP version : 5.6.12
Platform : Linux
————————————–
test_math : 1.542 sec.
test_stringmanipulation : 1.659 sec.
test_loops : 1.389 sec.
test_ifelse : 0.950 sec.
————————————–
Total time: : 5.54 sec.

————————————–
| PHP BENCHMARK SCRIPT |
————————————–
Start : 2015-08-31 07:25:24
Server : @
PHP version : 5.6.12
Platform : Linux
————————————–
test_math : 1.556 sec.
test_stringmanipulation : 1.661 sec.
test_loops : 1.315 sec.
test_ifelse : 0.927 sec.
————————————–
Total time: : 5.459 sec.

– PHP 7.0 서버에서 실행

————————————–
| PHP BENCHMARK SCRIPT |
————————————–
Start : 2015-08-31 07:21:34
Server : @
PHP version : 7.0.0RC1
Platform : Linux
————————————–
test_math : 0.263 sec.
test_stringmanipulation : 0.360 sec.
test_loops : 0.271 sec.
test_ifelse : 0.205 sec.
————————————–
Total time: : 1.099 sec.

————————————–
| PHP BENCHMARK SCRIPT |
————————————–
Start : 2015-08-31 07:24:23
Server : @
PHP version : 7.0.0RC1
Platform : Linux
————————————–
test_math : 0.268 sec.
test_stringmanipulation : 0.356 sec.
test_loops : 0.262 sec.
test_ifelse : 0.212 sec.
————————————–
Total time: : 1.098 sec.



위 결과에서는

PHP7 가 PHP5.6 보다 5배 빠름.
PHP7 가 PHP5.5 보다 7배 빠름.
PHP7 가 PHP5.2 보다 22배 빠름으로 각각 측정되었습니다.

5. 기타 

크롬 개발자 도구에서 로딩 속도 테스트를 해보실 수 있도록 URL 을 열어놓았습니다.  
단, 서버 환경상 글을 읽는 시점에서 링크가 지원되지 않을 수 있으니 양해바랍니다.

PHP 5.2 – http://php52.ooz.kr/
PHP 5.5 – http://php55.ooz.kr/
PHP 5.6 – http://php56.ooz.kr/
PHP 7.0 – http://php7.ooz.kr/

 

Subscribe
Notify of
guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
윤진영
윤진영
8 years ago

벤치마크 잘 보았습니다. 감사합니다.
아래는 제 PC에서 돌려본 것입니다.
Celeron G1840, Windows 7 입니다.
————————————–
| PHP BENCHMARK SCRIPT |
————————————–
Start : 2015-10-01 15:59:09
Server : localhost@::1
PHP version : 5.6.12
Platform : WINNT
————————————–
test_math : 1.377 sec.
test_stringmanipulation : 2.864 sec.
test_loops : 0.881 sec.
test_ifelse : 0.642 sec.
————————————–
Total time: : 5.764 sec.

1
0
Would love your thoughts, please comment.x
()
x