@Aristona
Tavsiyen için teşekkürler. O kitaba da bir bakayım..
Yaptığım test sonuçları şunlar:
php5.5.9+OPCache + Apache+Mysql
Server Software: Apache/2.4.7
Server Port: 80
Document Path: /product/category
Document Length: 34856 bytes
Concurrency Level: 125
Time taken for tests: 169.287 seconds
Complete requests: 5000
Failed requests: 0
Total transferred: 177660338 bytes
HTML transferred: 174280000 bytes
[b]Requests per second: 29.54 [#/sec] (mean)[/b]
Time per request: 4232.167 [ms] (mean)
Time per request: 33.857 [ms] (mean, across all concurrent requests)
Transfer rate: 1024.87 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 1.8 0 13
Processing: 97 4034 8006.3 2888 76013
Waiting: 95 4017 8006.7 2869 75999
Total: 110 4035 8006.2 2889 76013
Percentage of the requests served within a certain time (ms)
50% 2889
66% 3184
75% 3384
80% 3509
90% 3999
95% 4424
98% 29205
99% 60136
100% 76013 (longest request)
PHP5.5.9+FPM+OPCache+Nginx1.4.6+MySql
Server Software: nginx/1.4.6
Server Port: 8080
Document Path: /product/category
Document Length: 35156 bytes
Concurrency Level: 125
Time taken for tests: 130.979 seconds
Complete requests: 5000
Failed requests: 0
Total transferred: 179040364 bytes
HTML transferred: 175780000 bytes
[b]Requests per second: 38.17 [#/sec] (mean)[/b]
Time per request: 3274.478 [ms] (mean)
Time per request: 26.196 [ms] (mean, across all concurrent requests)
Transfer rate: 1334.90 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.4 0 4
Processing: 231 3216 389.4 3201 5081
Waiting: 231 3216 389.4 3201 5081
Total: 234 3216 389.2 3201 5081
Percentage of the requests served within a certain time (ms)
50% 3201
66% 3353
75% 3431
80% 3469
90% 3603
95% 3864
98% 4076
99% 4175
100% 5081 (longest request)
HHVM3.2+Nginx1.4.6+MySql
Server Software: nginx/1.4.6
Server Port: 8080
Document Path: /product/category
Document Length: 35231 bytes
Concurrency Level: 125
Time taken for tests: 51.288 seconds
Complete requests: 5000
Failed requests: 0
Total transferred: 179365306 bytes
HTML transferred: 176155000 bytes
[b]Requests per second: 97.49 [#/sec] (mean)[/b]
Time per request: 1282.205 [ms] (mean)
Time per request: 10.258 [ms] (mean, across all concurrent requests)
Transfer rate: 3415.24 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.4 0 4
Processing: 227 1269 185.6 1235 2258
Waiting: 227 1269 185.5 1235 2258
Total: 231 1269 185.6 1235 2260
Percentage of the requests served within a certain time (ms)
50% 1235
66% 1304
75% 1348
80% 1378
90% 1469
95% 1557
98% 1845
99% 1999
100% 2260 (longest request)
Dün yaptığım testlerde hata varmış. PHP-FPM an başına istek sayısı aşımı yüzünden testlerde hata sayfası basıyormuş. Bu nedenle dün PHP+FPM+Nginx'de çok yüksek sıkorlar almıştım. Tüm gün nginx ve hhvm ile boğuşunca dikkatimden kaçmış.
Şuan paylaştıklarımda hata olmaması lazım. Testlere göre hata yok. Bir kaç kez apache çöktü. An başına istek sayısını 125 düşürmek zorunda kaldım.
Özekle HHVM yaklaşık %50 daha hızlı. Ama en önemli kusuru HHVM sanal sunucusu çalıştıkça (mesala sayısız test peş beşe) kullandığı ram miktarı 750MB(çalıştıkça da artmaya devam ediyor) kadar çıktı. Bu durumda anlık performansı iyi olsada bir hafta boyunca hiç yeniden başlatılmayan sunucular'da muhtemelen çok büyük problemlere neden olacaktır.
Apache ve Fpm'de koşturulan PHP'de OPCache aktifti..
FPM'nin kullandığı php'de Opcache kapattım. Arada ciddi bir fark var:
Server Software: nginx/1.4.6
Server Port: 8080
Document Path: /product/category
Document Length: 35156 bytes
Concurrency Level: 125
Time taken for tests: 217.329 seconds
Complete requests: 5000
Failed requests: 0
Total transferred: 179040374 bytes
HTML transferred: 175780000 bytes
[b]Requests per second: 23.01 [#/sec] (mean)[/b]
Time per request: 5433.214 [ms] (mean)
Time per request: 43.466 [ms] (mean, across all concurrent requests)
Transfer rate: 804.52 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.4 0 4
Processing: 145 5346 642.6 5336 7791
Waiting: 145 5346 642.6 5336 7791
Total: 149 5346 642.3 5336 7792
Percentage of the requests served within a certain time (ms)
50% 5336
66% 5486
75% 5672
80% 5794
90% 6113
95% 6263
98% 6550
99% 6650
100% 7792 (longest request)
Özetle 512mb/1024mb gibi ram miktarınız var ise En mantıklı seçim PHP+OPCache+FPM+Nginx.. Ama ram sorununuz yok ise elbette HHVM seçilebilir. Şuan için laravel'de hiç sorun çıkarmadı.