ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fastcgi + perl


  • To: nginx-ru@xxxxxxxxx
  • Subject: fastcgi + perl
  • From: "tem" <nginx-forum@xxxxxxxx>
  • Date: Sat, 05 Jun 2010 10:05:02 -0400
  • Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mickey.jlkhosting.com; s=x; h=Sender:From:Message-ID:Content-Transfer-Encoding:Content-Type:Subject:To:Date; bh=Tkj3C8pwcSuLKo22OQIqoFtkPzrtAfA5OFaKMHdDKiw=; b=nHIqDqwk1LOxSpnwdXGDjO9+lh2Hl9OCEfIBKdeRVMnZI0AweRweCud4STZQ98eW/K+fylEVsj9k49lslbZHrAZ5iiA+mO0FMC+ZireLJueYB+VbRiGXJ5pkfwr+bgOT;

os: freebsd7.0, amd64

nginx-0.7.65
perl5.10.1 + CGI::Fast FCGI FCGI::ProcManager

процессы перловые висят в состоянии sbwait:

замеряя где зависания по поводу открытия сайтов нашел, что висит в месте print.
то есть до него и после замеряю Time::HiRes::time(); и вывод.. плохой.

[code]
while(my $q = CGI::Fast->new()) {
        pm_pre_dispatch();
        my $buf = &build_buffer($q);
        my  $time0 = &Time::HiRes::time();        
        print $buf;
        my  $time1 = &Time::HiRes::time();
        pm_post_dispatch();
        print LOG "$$: outtime = ".($time1 - $time0)."\n";
}
[/code]


$buf размером от 120к до 240к

играясь с 
[code]
  fastcgi_buffer_size 128k;
  fastcgi_buffers 8 32k;
  fastcgi_busy_buffers_size 128k;
[/code]

особой разницы в статистике вывода не заметил.

73913: outtime = 0.308612108230591
73911: outtime = 0.00299382209777832
73916: outtime = 0.0844810009002686
73917: outtime = 0.0007781982421875
73912: outtime = 1.12812805175781
73920: outtime = 3.80738806724548
73914: outtime = 0.000755071640014648
73921: outtime = 0.914252996444702
73912: outtime = 0.000842094421386719
73913: outtime = 0.000874996185302734
73921: outtime = 0.743362903594971
73915: outtime = 8.43231797218323
73911: outtime = 1.7337760925293
73918: outtime = 1.54881596565247
73913: outtime = 0.0688939094543457
73911: outtime = 0.000916004180908203
73915: outtime = 0.0217149257659912
73921: outtime = 0.263633966445923
73914: outtime = 1.3987250328064
73915: outtime = 0.861130952835083
73913: outtime = 0.809145212173462
73914: outtime = 0.6996169090271
73915: outtime = 0.00143599510192871
73911: outtime = 2.36675810813904
73912: outtime = 4.19361805915833
73914: outtime = 0.554790019989014
73913: outtime = 0.397350072860718
73918: outtime = 3.01585388183594
73913: outtime = 0.000673055648803711
73917: outtime = 5.71349596977234
73916: outtime = 5.78998613357544
73918: outtime = 0.000687122344970703
73919: outtime = 8.42355990409851
73915: outtime = 2.4722728729248
73917: outtime = 0.000938892364501953
73918: outtime = 0.274698972702026
73920: outtime = 4.85899114608765
73921: outtime = 4.83969306945801
73916: outtime = 0.627575874328613
73911: outtime = 3.14309501647949
73919: outtime = 0.00302004814147949
73914: outtime = 4.50036120414734
73913: outtime = 0.0409009456634521
73917: outtime = 0.00104522705078125
73918: outtime = 0.000961065292358398
73912: outtime = 5.23920106887817
73920: outtime = 0.000769853591918945
73921: outtime = 0.658344030380249

откуды эти 5-15 секундные зависания?
и как их победить?

Posted at Nginx Forum: http://forum.nginx.org/read.php?21,94820,94820#msg-94820


_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.