Forum: NGINX CentOS 5 - NGiNX - AIO

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
357909eaac1def31b0994111a9fe9ffd?d=identicon&s=25 InterNetX - Juergen Gotteswinter (Guest)
on 2009-11-11 12:54
(Received via mailing list)
Hello Folks,

is it possible to use NGINX AIO on CentOS5, or is the CentOS5 Kernel too
old for this?

Greetings

Juergen
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-11-11 13:28
(Received via mailing list)
On Wed, Nov 11, 2009 at 12:50:03PM +0100, InterNetX - Juergen
Gotteswinter wrote:

> is it possible to use NGINX AIO on CentOS5, or is the CentOS5 Kernel too
> old for this?

What does "uname -r" show ?
357909eaac1def31b0994111a9fe9ffd?d=identicon&s=25 Juergen Gotteswinter (Guest)
on 2009-11-11 13:49
(Received via mailing list)
2.6.18-164.el5 but redhat does a lot of backporting. i tried to compile
it on a centos 5 machine with ./configure --with-file-aio and get this

checking for Linux AIO support ... not found

./configure: no supported file AIO was found
Currently file AIO is supported on FreeBSD 4.3+ and Linux 2.6.22+ only


seems like centos 5 & redhat enterprise 5 are too old

but i have the following packages installed, regarding to aio

libaio-devel-0.3.106-3.2
libaio-0.3.106-3.2
libaio-0.3.106-3.2
libaio-devel-0.3.106-3.2

greetings

Juergen
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-11-11 16:23
(Received via mailing list)
On Wed, Nov 11, 2009 at 01:44:32PM +0100, Juergen Gotteswinter wrote:

>
> but i have the following packages installed, regarding to aio
>
> libaio-devel-0.3.106-3.2
> libaio-0.3.106-3.2
> libaio-0.3.106-3.2
> libaio-devel-0.3.106-3.2

nginx does not use libaio. nginx requires eventfd() AIO support.
I tested AIO on CentOS 5.2.
357909eaac1def31b0994111a9fe9ffd?d=identicon&s=25 Juergen Gotteswinter (Guest)
on 2009-11-12 09:23
(Received via mailing list)
Strange, i tried to compile it with ./configure --with-file-aio but the
error message is the same. did you use the original centos kernel or a
self baked one?

if its the original kernel in you case, are you sure that aio was
active?


Greetings

Juergen
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-11-12 09:39
(Received via mailing list)
On Thu, Nov 12, 2009 at 09:14:36AM +0100, Juergen Gotteswinter wrote:

> Strange, i tried to compile it with ./configure --with-file-aio but the
> error message is the same. did you use the original centos kernel or a
> self baked one?
>
> if its the original kernel in you case, are you sure that aio was active?

Sorry, I was wrong. I had two VirtualBox installations: Debian and
CentOS 5.2,
both have 2.6.18 kernel. Specially for AIO I had installed openSUSE 11.1
with more modern kernel.
2974d09ac2541e892966b762aad84943?d=identicon&s=25 gus (Guest)
on 2011-10-13 08:50
(Received via mailing list)
Игорь, у меня CentOS 5.6 ядро 2.6.18-274.3.1.el5PAE
конфигурирую с --with-file-aio
выходит
checking for Linux AIO support ... found

а вы писали что поддержка AIO идет только
2,6,22 и выше!?

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,22085,216629#msg-216629
0f7a1240e82f744c6c607fa7081b99f7?d=identicon&s=25 Igor Sysoev (Guest)
on 2011-10-13 08:52
(Received via mailing list)
On Thu, Oct 13, 2011 at 02:49:48AM -0400, gus wrote:
> ,   CentOS 5.6  2.6.18-274.3.1.el5PAE
>   --with-file-aio
>
> checking for Linux AIO support ... found
>
>      AIO
> 2,6,22  !?

   . RedHat,   ,  backport.
  .


--

http://sysoev.ru
2974d09ac2541e892966b762aad84943?d=identicon&s=25 gus (Guest)
on 2011-10-13 09:05
(Received via mailing list)
и еще 1 вопрос.
у меня 16Гб оперативки конфиг такой:
user  nginx;
worker_processes  8;
worker_rlimit_nofile 819200;
timer_resolution 100ms;
worker_priority -5;

http {
 #aio
    aio on;
    expires max;
    #directio 1m;
    sendfile        off;
    tcp_nopush      on;
    tcp_nodelay     on;
    server_tokens   off;
    gzip            off;
    gzip_static     on;
    gzip_comp_level 5;
    gzip_min_length 1024;
    keepalive_timeout  65;
    output_buffers 2 512k;

раздаю с сервера видео ролики и мелкие
тумбочки. Ролики размером от 5 до 200
мегабайт.

какой параметр directio  и output_buffers  мне
указать лутше?
Спасибо.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,22085,216631#msg-216631
0f7a1240e82f744c6c607fa7081b99f7?d=identicon&s=25 Igor Sysoev (Guest)
on 2011-10-13 13:14
(Received via mailing list)
On Thu, Oct 13, 2011 at 03:04:44AM -0400, gus wrote:
>     aio on;
>     keepalive_timeout  65;
>     output_buffers 2 512k;
>
>
> .    5  200
> .
>
>   directio   output_buffers
>  ?

   aio   directio.
aio .

     aio on;
     sendfile        off;
     directio        1m;
     output_buffers  2 1m;

 16G   -  6000 .


--

http://sysoev.ru
2974d09ac2541e892966b762aad84943?d=identicon&s=25 gus (Guest)
on 2011-10-13 14:08
(Received via mailing list)
Спасибо за ответ.
с конфигом что вы дали, видео ролики
вообще не грузятся, плеер сбрасывает. В
ошибках вижу это:

2011/10/13 16:55:12 [crit] 23226#0: *145115 aio read
"/var/www/html/pub2/video/102011/8/85/634/885634152246.mp4" failed (22:
Invalid argument) while sending mp4 to client, client: 217.25.22.82,
server: server.com, request: "GET
/pub2/video/102011/8/85/634/885634152246.mp4 HTTP/1.1", host:
"server.com"


Мне приходится выключать  directio, и после
ролики подгружаются, но без directio в AIO
толку нет.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,22085,216642#msg-216642
0f7a1240e82f744c6c607fa7081b99f7?d=identicon&s=25 Igor Sysoev (Guest)
on 2011-10-13 14:10
(Received via mailing list)
On Thu, Oct 13, 2011 at 08:07:50AM -0400, gus wrote:
> "server.com"
>
>
>     directio,
>  ,   directio  AIO
>  .

  ?


--

http://sysoev.ru
2974d09ac2541e892966b762aad84943?d=identicon&s=25 gus (Guest)
on 2011-10-13 14:17
(Received via mailing list)
[root@server]# nginx -V
nginx: nginx version: nginx/1.1.5
nginx: built by gcc 4.1.2 20080704 (Red Hat 4.1.2-51)
nginx: TLS SNI support disabled
nginx: configure arguments: --user=nginx --group=nginx
--prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx
--conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log
--http-log-path=/var/log/nginx/access.log
--http-client-body-temp-path=/var/lib/nginx/tmp/client_body
--http-proxy-temp-path=/var/lib/nginx/tmp/proxy
--http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi
--pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx
--with-http_secure_link_module --with-http_random_index_module
--with-http_ssl_module --with-http_realip_module
--with-http_addition_module --with-http_sub_module
--with-http_dav_module --with-http_gzip_static_module
--with-http_stub_status_module --with-http_perl_module --with-file-aio
--add-module=/gus/nginx_mod_h264_streaming-2.2.7

Спасибо

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,22085,216644#msg-216644
0f7a1240e82f744c6c607fa7081b99f7?d=identicon&s=25 Igor Sysoev (Guest)
on 2011-10-13 14:28
(Received via mailing list)
On Thu, Oct 13, 2011 at 08:17:04AM -0400, gus wrote:
> --http-proxy-temp-path=/var/lib/nginx/tmp/proxy
> --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi
> --pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx
> --with-http_secure_link_module --with-http_random_index_module
> --with-http_ssl_module --with-http_realip_module
> --with-http_addition_module --with-http_sub_module
> --with-http_dav_module --with-http_gzip_static_module
> --with-http_stub_status_module --with-http_perl_module --with-file-aio
> --add-module=/gus/nginx_mod_h264_streaming-2.2.7

- --add-module=/gus/nginx_mod_h264_streaming-2.2.7
+ --with-http_mp4_module


--

http://sysoev.ru
2974d09ac2541e892966b762aad84943?d=identicon&s=25 gus (Guest)
on 2011-10-13 14:38
(Received via mailing list)
Игорь мы это уже обсуждали в другой
теме. у меня ffmpeg конвертирует с h264.
без nginx_mod_h264_streaming-2.2.7 и с mp4_module Я не могу
мотать ролики. :(

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,22085,216647#msg-216647
2974d09ac2541e892966b762aad84943?d=identicon&s=25 gus (Guest)
on 2011-10-14 13:15
(Received via mailing list)
Спасибо за патч, после этого AIO
заработало, но файлы с h264 не
показываются на swf плеере пока не
подкачиваются до конца. Пришлось
вернуться на --add-module=/gus/nginx_mod_h264_streaming-2.2.7
и за комментировать #directio=1m;

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,22085,216698#msg-216698
0f7a1240e82f744c6c607fa7081b99f7?d=identicon&s=25 Igor Sysoev (Guest)
on 2011-10-14 15:41
(Received via mailing list)
On Fri, Oct 14, 2011 at 07:14:24AM -0400, gus wrote:
>   ,   AIO
> ,    h264
>   swf
>   .
>   --add-module=/gus/nginx_mod_h264_streaming-2.2.7
>    #directio=1m;

nginx_mod_h264_streaming  ,   .

ngx_http_mp4_module ,     start=XXX,
  XXX  0.    ,
 . JW Player     start=0.

 ,   ,    .

:
http://nginx.org/ru/docs/http/ngx_http_mp4_module.html


--

http://sysoev.ru
2974d09ac2541e892966b762aad84943?d=identicon&s=25 gus (Guest)
on 2011-10-19 20:40
(Received via mailing list)
У меня указано это в локейшине:

        location / {
            root   /var/www/html;
            index  index.html index.htm index.php;
                location ~ \.mp4$  {
                    mp4;

при компиляции с --with-http_mp4_module видео не
проигрывается пока не подкачается до
конца, а если передвигаю ползунок
плеера, например на 30 сек после старта,
подкачиват видео, но без звука.

приходится снова ставить с
--add-module=/gus/nginx_mod_h264_streaming-2.2.7.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,22085,216931#msg-216931
2a7b5dacfab87bce952d2d85d42d0152?d=identicon&s=25 Andrii Balytskyi (eurohoster)
on 2016-07-17 11:19
На самом деле проблема с AIO воспроизводится и сегодня, но только при
использовании некоторых плееров. К большому сожалению при использовании
плеера Uppod.
This topic is locked and can not be replied to.