URL: https://www.opennet.ru/cgi-bin/openforum/vsluhboard.cgi
Форум: vsluhforumID8
Нить номер: 6999
[ Назад ]

Исходное сообщение
"Запуск cgi (c++)"

Отправлено Guffi , 25-Сен-10 16:20 
ab -n100  http://site.ex/cgi-bin/hello.cgi

Document Path:          /cgi-bin/hello.cgi
Document Length:        13 bytes

Concurrency Level:      1
Time taken for tests:   2.283029 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      13240 bytes
HTML transferred:       1300 bytes
Requests per second:    43.80 [#/sec] (mean)
Time per request:       22.830 [ms] (mean)
Time per request:       22.830 [ms] (mean, across all concurrent requests)
Transfer rate:          5.26 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:    20   22   1.5     22      26
Waiting:       19   22   1.5     22      26
Total:         20   22   1.5     22      26

Percentage of the requests served within a certain time (ms)
  50%     22
  66%     23
  75%     23
  80%     24
  90%     24
  95%     24
  98%     24
  99%     26
100%     26 (longest request)

и

ab -n100 http://site.ex/hello.php

Document Path:          /hello.php
Document Length:        12 bytes

Concurrency Level:      1
Time taken for tests:   0.71696 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      14700 bytes
HTML transferred:       1200 bytes
Requests per second:    1394.78 [#/sec] (mean)
Time per request:       0.717 [ms] (mean)
Time per request:       0.717 [ms] (mean, across all concurrent requests)
Transfer rate:          195.27 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     0    0   0.2      0       1
Waiting:        0    0   0.1      0       1
Total:          0    0   0.2      0       1

Percentage of the requests served within a certain time (ms)
  50%      0
  66%      0
  75%      0
  80%      0
  90%      0
  95%      0
  98%      1
  99%      1
100%      1 (longest request)


Nginx -> Apache 2 + mod_cgi
Для PHP стоит eAccelerator

Что не так? Почему скомпилированная cgi программа работат медленее?
Помогите разобраться, спасибо!


Содержание

Сообщения в этом обсуждении
"Запуск cgi (c++)"
Отправлено Pahanivo , 27-Сен-10 14:34 
>Что не так? Почему скомпилированная cgi программа работат медленее?
>Помогите разобраться, спасибо!

патамучта cgi запускается как отдельный процес - его надо "поднять" - те загрузить в память со всеми вытекающими
в отличии от чихпыха который (скорей всего) висит в виде модуля