Forum: NGINX nginx-0.7.52

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.
Igor S. (Guest)
on 2009-04-20 10:46
(Received via mailing list)
Changes with nginx 0.7.52                                        20 Apr
2009

    *) Feature: the first native Windows binary release.

    *) Bugfix: in processing HEAD method while caching.

    *) Bugfix: in processing the "If-Modified-Since", "If-Range", etc.
       client request header lines while caching.

    *) Bugfix: now the "Set-Cookie" and "P3P" header lines are hidden in
       cacheable responses.

    *) Bugfix: if nginx was built with the ngx_http_perl_module and with
a
       perl which supports threads, then during a master process exit
the
       message "panic: MUTEX_LOCK" might be issued.

    *) Bugfix: nginx could not be built --without-http-cache; the bug
had
       appeared in 0.7.48.

    *) Bugfix: nginx could not be built on platforms different from
i386,
       amd64, sparc, and ppc; the bug had appeared in 0.7.42.
Kevin W. (Guest)
on 2009-04-20 11:21
(Received via mailing list)
Is there a special way to start the windows version? Double-clicking
did nothing, and running from a prompt did nothing.

--
Kevin W.




2009/4/19 Igor S. <removed_email_address@domain.invalid>:
Igor S. (Guest)
on 2009-04-20 11:36
(Received via mailing list)
On Sun, Apr 19, 2009 at 09:12:37PM -1000, Kevin W. wrote:

> Is there a special way to start the windows version? Double-clicking
> did nothing, and running from a prompt did nothing.

cd c:\
unzip nginx-0.7.52.zip
ren nginx-0.7.52 nginx
cd nginx
start nginx

Control:

nginx -s [ stop | quit | reopen | reloadf ]

For problems look in c:\nginx\logs\error.log or in EventLog.
Weibin Y. (Guest)
on 2009-04-20 14:48
(Received via mailing list)
Thanks for your hardwork.  Do you have a plan to release the source of
Windows version?

-------------------------------------------------------------
From:Igor S.
Date:2009-04-20 14:40:53
To:nginx
CC:
Subject:nginx-0.7.52

Changes with nginx 0.7.52                                        20 Apr
2009

    *) Feature: the first native Windows binary release.

    *) Bugfix: in processing HEAD method while caching.

    *) Bugfix: in processing the "If-Modified-Since", "If-Range", etc.
       client request header lines while caching.

    *) Bugfix: now the "Set-Cookie" and "P3P" header lines are hidden in
       cacheable responses.

    *) Bugfix: if nginx was built with the ngx_http_perl_module and with
a
       perl which supports threads, then during a master process exit
the
       message "panic: MUTEX_LOCK" might be issued.

    *) Bugfix: nginx could not be built --without-http-cache; the bug
had
       appeared in 0.7.48.

    *) Bugfix: nginx could not be built on platforms different from
i386,
       amd64, sparc, and ppc; the bug had appeared in 0.7.42.


--
Igor S.
http://sysoev.ru/en/
Igor S. (Guest)
on 2009-04-20 15:27
(Received via mailing list)
On Mon, Apr 20, 2009 at 06:38:52PM +0800, Weibin Y. wrote:

> Thanks for your hardwork.  Do you have a plan to release the source of Windows version?

Yes, after I will adopt ./configure for MSYS.
Currently I ./configure nginx/Windows on FreeBSD using Wine in some
places
and I do want to support this procedure.
Igor S. (Guest)
on 2009-04-20 15:41
(Received via mailing list)
On Mon, Apr 20, 2009 at 03:13:33PM +0400, Igor S. wrote:

> On Mon, Apr 20, 2009 at 06:38:52PM +0800, Weibin Y. wrote:
>
> > Thanks for your hardwork.  Do you have a plan to release the source of Windows 
version?
>
> Yes, after I will adopt ./configure for MSYS.
> Currently I ./configure nginx/Windows on FreeBSD using Wine in some places
> and I do want to support this procedure.

I do NOT want ...
郭振立 (Guest)
on 2009-04-20 17:54
(Received via mailing list)
> Changes with nginx 0.7.52 20 Apr 2009
>
> *) Feature: the first native Windows binary release.
>


A really good news for me. I'm  waiting for it for a long time.



I think many people will try to use native Windows binary, although they
did not say something about this like me.



Robert Kwok
Joaquin Cuenca Abela (Guest)
on 2009-04-20 18:51
(Received via mailing list)
2009/4/20 郭振立 <removed_email_address@domain.invalid>:
>> Changes with nginx 0.7.52 20 Apr 2009
>>
>> *) Feature: the first native Windows binary release.
>>
>
> A really good news for me. I'm  waiting for it for a long time.
>
> I think many people will try to use native Windows binary, although they did
> not say something about this like me.

Indeed, does it make use of IOCP? is it supposed to be reasonably high
performance?
Igor S. (Guest)
on 2009-04-20 21:19
(Received via mailing list)
On Mon, Apr 20, 2009 at 04:42:12PM +0200, Joaquin Cuenca Abela wrote:

>
> Indeed, does it make use of IOCP? is it supposed to be reasonably high
> performance?

No, currently it uses select(), therefore it would be slow and
noscaleable. "We call it BETA as it's better than nothing".
The next step will be IOCP with single thread, then with several
threads:
currently nginx is designed as single thread application, so
it's required to set mutexes and locks in various places.

BTW, could someone run the simple small static file benchmark for
nginx/Windows, nginx/Cygwin, Apache2 and IIS (from another host):

ab -n 1000 -c 1 ...
ab -n 1000 -c 10 ...
ab -n 1000 -c 1 -k ...

?
Kevin W. (Guest)
on 2009-04-20 21:41
(Received via mailing list)
Thanks for the response. I am eager to try this out later.

--
Kevin W.
Chris Cortese (Guest)
on 2009-04-21 02:32
(Received via mailing list)
Thanks for this release!  I've been trying to get nginx going on Windows
for a while now.

With this latest build though, all I can get is "No input file
specified".  I thought maybe I was specifying paths in a way it didn't
like but I've tried every variation on the Windows paths I can think
of.  This is my current conf for one of my sites.  Can anyone tell me
what's wrong here?   TIA.



server {
#  listen   127.0.0.1:80;
  listen   80;
  server_name  jobsite.xpdesktop;

  access_log
"c:/cygwin/home/Chris/www/live/jobsite/logs/jobsite.access.log";
  error_log
"c:/cygwin/home/Chris/www/live/jobsite/logs/jobsite.error.log" debug;

  root "c:/cygwin/home/Chris/www/live/jobsite/trunk/html/public";
  index index.php index.html;

  location / {
    fastcgi_pass  127.0.0.1:9000;
    fastcgi_param SCRIPT_FILENAME
"c:/cygwin/home/Chris/www/live/jobsite/trunk/html/public/index.php";
    fastcgi_param QUERY_STRING      q=$request_uri;
    include "c:/nginx/conf/fastcgi_params";
  }

  location ~ \.php$ {
    fastcgi_pass  127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME
"c:/cygwin/home/Chris/www/live/jobsite/trunk/html/public/$fastcgi_script_name";
    fastcgi_param QUERY_STRING      q=$request_uri;
    include "c:/nginx/conf/fastcgi_params";
  }
}
AMP Admin (Guest)
on 2009-04-21 03:36
(Received via mailing list)
Anyone know why the following wouldn't prompt for an id and password?
It
just goes directly to my 401 (requires authorization) page.

[CODE]
location ~ /(directory1/|directory2/|directory3/).* {
  fastcgi_pass    127.0.0.1:9000;
  fastcgi_index   index.php;
  include         fastcgi_params;
  auth_basic            "Restricted";
  auth_basic_user_file  /etc/nginx/htpasswd;
} [/CODE]
Weibin Y. (Guest)
on 2009-04-21 12:03
(Received via mailing list)
>BTW, could someone run the simple small static file benchmark for
>nginx/Windows, nginx/Cygwin, Apache2 and IIS (from another host):

>ab -n 1000 -c 1 ...
>ab -n 1000 -c 10 ...
>ab -n 1000 -c 1 -k ... "

This is my rough test results. It seems that the
Windows version of Nginx is really great, even
with the simple 'select' method.

But it's just a test with a small single static file.
We need more real test cases between these web
servers in Windows.

------------------------------------------------
Test case1:
Apache2.2.11 with all default configration

httpd.exe -l
Compiled in modules:
  core.c
  mod_win32.c
  mpm_winnt.c
  http_core.c
  mod_so.c

ab.exe -n 10000 -c 1 http://127.0.0.1/
Requests per second:    497.57 [#/sec] (mean)
CPU load: about 68%

ab.exe -n 10000 -c 10 http://127.0.0.1/
Requests per second:    703.30 [#/sec] (mean)
CPU load: about 100%

ab.exe -k -n 10000 -c 1 http://127.0.0.1/
Requests per second:    910.38 [#/sec] (mean)
CPU load: about 59%

ab.exe -k -n 10000 -c 10 http://127.0.0.1/
Requests per second:    1198.50 [#/sec] (mean)
CPU load: about 100%
------------------------------------------------
Test case2:
IIS/5.1 with all default configration.

ab.exe -n 10000 -c 1 http://127.0.0.1/
Requests per second:    534.22 [#/sec] (mean)
CPU load: about 65%

ab.exe -n 10000 -c 10 http://127.0.0.1/
Requests per second:    829.02 [#/sec] (mean)
CPU load: about 100%, Failed requests: 49

ab.exe -k -n 10000 -c 1 http://127.0.0.1/
Requests per second:    1207.55 [#/sec] (mean)
CPU load: about 60%

ab.exe -k -n 10000 -c 10 http://127.0.0.1/
Requests per second:    1600.00 [#/sec] (mean)
CPU load: about 100%
-----------------------------------------------
Test case3:
nginx/0.7.52 with all default configration.

ab.exe -n 10000 -c 1 http://127.0.0.1/
Requests per second:    903.95 [#/sec] (mean)
CPU load: about 65%

ab.exe -n 10000 -c 10 http://127.0.0.1/
Requests per second:    1012.66 [#/sec] (mean)
CPU load: about 90%

ab.exe -k -n 10000 -c 1 http://127.0.0.1/
Requests per second:    2424.24 [#/sec] (mean)
CPU load: about 68%

ab.exe -k -n 10000 -c 10 http://127.0.0.1/
Requests per second:    2529.64 [#/sec] (mean)
CPU load: about 67%
------------------------------------------------
My test platform:

1. All tested index page is:
<html>
<head>
<title>Welcome to nginx!</title>
</head>
<body bgcolor="white" text="black">
<center><h1>Welcome to nginx!</h1></center>
</body>
</html>
2. OS: Windows XP sp3, professional
3. CPU: Inlel pentium(R)4 3.0G 3.0G, memory: 1G. This is my PC, Dell
170L.
Igor S. (Guest)
on 2009-04-21 12:19
(Received via mailing list)
On Tue, Apr 21, 2009 at 03:51:57PM +0800, Weibin Y. wrote:

>
>   core.c
> Requests per second:    703.30 [#/sec] (mean)
> Test case2:
> ab.exe -k -n 10000 -c 1 http://127.0.0.1/
> ab.exe -n 10000 -c 1 http://127.0.0.1/
>
> </head>
> <body bgcolor="white" text="black">
> <center><h1>Welcome to nginx!</h1></center>
> </body>
> </html>
> 2. OS: Windows XP sp3, professional
> 3. CPU: Inlel pentium(R)4 3.0G 3.0G, memory: 1G. This is my PC, Dell 170L.

Thank you, this is really surprise for me, I did not expect this.
I needed this this simple benchmark to estimate Winsocket overhead.
Could you also try the Cygwin 0.7.50 build:
http://www.kevinworthington.com/nginx-for-windows/
?

Could anyone test nginx against IIS/6 and /7 ?
Igor S. (Guest)
on 2009-04-21 12:31
(Received via mailing list)
On Tue, Apr 21, 2009 at 03:51:57PM +0800, Weibin Y. wrote:

>
> But it's just a test with a small single static file.
> We need more real test cases between these web
> servers in Windows.

Just note for everyone: "-c 10" (concurrency 10) is far from real world
usage. The select() method used by nginx is poor scaleable for
concurrency
more than 100-200.
Weibin Y. (Guest)
on 2009-04-21 13:06
(Received via mailing list)
> Thank you, this is really surprise for me, I did not expect this.
> I needed this this simple benchmark to estimate Winsocket overhead.
> Could you also try the Cygwin 0.7.50 build:
> http://www.kevinworthington.com/nginx-for-windows/
> ?
> Could anyone test nginx against IIS/6 and /7 ?
 Test case4:
nginx/0.7.50-win32-cygwin with all default configration.

ab.exe -n 10000 -c 1 http://127.0.0.1/
Requests per second:    563.38 [#/sec] (mean)
CPU load: about 65%

ab.exe -n 10000 -c 10 http://127.0.0.1/
Requests per second:    628.07 [#/sec] (mean)
CPU load: about 75%

ab.exe -k -n 10000 -c 1 http://127.0.0.1/
Requests per second:    1081.08 [#/sec] (mean)
CPU load: about 62%

ab.exe -k -n 10000 -c 10 http://127.0.0.1/
Requests per second:    1250.00 [#/sec] (mean)
CPU load: about 65%
-----------------------------------------------
The CPU load is not a exact value, but a estimate
 value from the Windows Task Manager.

> Just note for everyone: "-c 10" (concurrency 10) is far from real world
> usage. The select() method used by nginx is poor scaleable for concurrency
> more than 100-200.

Yes, you are right. But it's the select() problem, not Nginx. The IOCP
method may be
much better.

------------------
Weibin Y.
2009-04-21
Weibin Y. (Guest)
on 2009-04-21 13:51
(Received via mailing list)
> Just note for everyone: "-c 10" (concurrency 10) is far from real world
> usage. The select() method used by nginx is poor scaleable for concurrency
> more than 100-200.
  It seems that the most suitable concurrency for my PC is 1-200.

More tests in test case3 for Native Nginx in Windows:

ab.exe -k -n 10000 -c 1 http://127.0.0.1/
Requests per second:    2424.24 [#/sec] (mean)
CPU load: about 68%

ab.exe -k -n 10000 -c 10 http://127.0.0.1/
Requests per second:    2529.64 [#/sec] (mean)
CPU load: about 67%

ab.exe -k -n 10000 -c 30 http://127.0.0.1/
Requests per second:    2433.46 [#/sec] (mean)
CPU load: about 72%

ab.exe -k -n 10000 -c 50 http://127.0.0.1/
Requests per second:    2397.00 [#/sec] (mean)
CPU load: about 75%

ab.exe -k -n 10000 -c 75 http://127.0.0.1/
Requests per second:    2293.91 [#/sec] (mean)
CPU load: about 77%

ab.exe -k -n 10000 -c 100 http://127.0.0.1/
Requests per second:    2214.53 [#/sec] (mean)
CPU load: about 82%

ab.exe -k -n 10000 -c 200 http://127.0.0.1/
Requests per second:    2184.30 [#/sec] (mean)
CPU load: about 95%

ab.exe -k -n 10000 -c 300 http://127.0.0.1/
Requests per second:    1987.58 [#/sec] (mean)
CPU load: about 99%

ab.exe -k -n 10000 -c 500 http://127.0.0.1/
Requests per second:    1549.64 [#/sec] (mean)
CPU load: about 100%

------------------
Weibin Y.
2009-04-21
István (Guest)
on 2009-04-21 14:02
(Received via mailing list)
Hi!

Please note that ab itself a huge bottleneck and it gives you zero
information about nginx performance. As you can see you hit the 100% CPU
-what comes from ab load-.
I realized that during performance testing, all what I can tell you: use
the
httperf instead if you have a chance.
(do not forget to modify the FD_SETSIZE to higher value)

Regards,
Istvan

2009/4/21 Weibin Y. <removed_email_address@domain.invalid>
Anton Y. (Guest)
on 2009-04-21 14:20
(Received via mailing list)
István wrote:
> Please note that ab itself a huge bottleneck and it gives you zero
> information about nginx performance. As you can see you hit the 100% CPU
> -what comes from ab load-.
> I realized that during performance testing, all what I can tell you: use
> the httperf instead if you have a chance.
> (do not forget to modify the FD_SETSIZE to higher value)

Another replacement for ab is http_load:
http://www.acme.com/software/http_load/
Igor S. (Guest)
on 2009-04-21 14:29
(Received via mailing list)
On Tue, Apr 21, 2009 at 05:43:48PM +0800, Weibin Y. wrote:

> > Just note for everyone: "-c 10" (concurrency 10) is far from real world
> > usage. The select() method used by nginx is poor scaleable for concurrency
> > more than 100-200.
>   It seems that the most suitable concurrency for my PC is 1-200.
>
> More tests in test case3 for Native Nginx in Windows:
>
> ab.exe -k -n 10000 -c 1 http://127.0.0.1/
> Requests per second:    2424.24 [#/sec] (mean)
> CPU load: about 68%

Could you add

open_file_cache          max=1000  inactive=20s;
open_file_cache_valid    30s;
open_file_cache_min_uses 2;
open_file_cache_errors   on;

and run just

ab.exe -k -n 10000 -c 1

to see if CreateFile() adds noticeable overhead ?
Igor S. (Guest)
on 2009-04-21 14:35
(Received via mailing list)
On Tue, Apr 21, 2009 at 10:52:53AM +0100, Istv?n wrote:

> Hi!
>
> Please note that ab itself a huge bottleneck and it gives you zero
> information about nginx performance. As you can see you hit the 100% CPU
> -what comes from ab load-.

Yes, running ab on the same host is benchmark both ab and nginx.

> I realized that during performance testing, all what I can tell you: use the
> httperf instead if you have a chance.
> (do not forget to modify the FD_SETSIZE to higher value)

BTW, nginx/Windows is currently build with FD_SETSIZE.
Roger P. (Guest)
on 2009-04-21 18:52
>> I realized that during performance testing, all what I can tell you: use the
>> httperf instead if you have a chance.
>> (do not forget to modify the FD_SETSIZE to higher value)
>
> BTW, nginx/Windows is currently build with FD_SETSIZE.

did you mean "without defining FD_SETSIZE" or "with defining it?"

Note that ruby recently went through some acrobatics to "dynamically"
resize their fd_sets if you try to include > FD_SETSIZE file descriptors
in them :)
http://redmine.ruby-lang.org/repositories/revision...
http://redmine.ruby-lang.org/issues/show/755

Cheers!
-=r
Igor S. (Guest)
on 2009-04-21 19:28
(Received via mailing list)
On Tue, Apr 21, 2009 at 04:52:09PM +0200, Roger P. wrote:

> >> I realized that during performance testing, all what I can tell you: use the
> >> httperf instead if you have a chance.
> >> (do not forget to modify the FD_SETSIZE to higher value)
> >
> > BTW, nginx/Windows is currently build with FD_SETSIZE.
>
> did you mean "without defining FD_SETSIZE" or "with defining it?"

I meant that nginx is built with FD_SETSIZE=1024
Roger P. (Guest)
on 2009-04-21 19:36
> I meant that nginx is built with FD_SETSIZE=1024

What does nginx do when it receives more connections than 1024?  Does it
try to override the fdset instance and possibly tromp on other memory
(I'm not sure if that's a concern or not, even)?

does it reject incoming connections when it gets too many?
Thanks.
-=r
István (Guest)
on 2009-04-21 19:37
(Received via mailing list)
2009/4/21 Igor S. <removed_email_address@domain.invalid>

>
> I meant that nginx is built with FD_SETSIZE=1024
>


is it enough? haven't you seen performance issues with this
configuration?
Igor S. (Guest)
on 2009-04-22 00:06
(Received via mailing list)
On Tue, Apr 21, 2009 at 05:36:01PM +0200, Roger P. wrote:

>
> > I meant that nginx is built with FD_SETSIZE=1024
>
> What does nginx do when it receives more connections than 1024?  Does it
> try to override the fdset instance and possibly tromp on other memory
> (I'm not sure if that's a concern or not, even)?
>
> does it reject incoming connections when it gets too many?

nginx will close connection with this message in error_log:
[error] ... maximum number of descriptors supported by select() is
1024".
Igor S. (Guest)
on 2009-04-22 00:12
(Received via mailing list)
On Tue, Apr 21, 2009 at 04:27:24PM +0100, Istv?n wrote:

> > >
> > > did you mean "without defining FD_SETSIZE" or "with defining it?"
> >
> > I meant that nginx is built with FD_SETSIZE=1024
>
> is it enough? haven't you seen performance issues with this configuration?

1024 is certainly not enough im modern web. However, select() is
unscalable
method: on 1000 sockets the select() itself will be bottleneck: this is
the reason why kqueue, epoll, etc. had been implemented. With nginx you
may try to overcome this select/poll limit using several worker
processes.
Igor S. (Guest)
on 2009-04-22 00:29
(Received via mailing list)
On Mon, Apr 20, 2009 at 03:20:59PM -0700, Chris Cortese wrote:

> Thanks for this release!  I've been trying to get nginx going on Windows
> for a while now.
>
> With this latest build though, all I can get is "No input file
> specified".  I thought maybe I was specifying paths in a way it didn't
> like but I've tried every variation on the Windows paths I can think
> of.  This is my current conf for one of my sites.  Can anyone tell me
> what's wrong here?   TIA.

The message "No input file specified" meanse that PHP can not find file
on passed path, say:
"c:/cygwin/home/Chris/www/live/jobsite/trunk/html/public/index.php"
I do not know how Cygwin translated pathnames, but it may be just
"/home/Chris/www/live/jobsite/trunk/html/public/index.php"
therefore you may try

-    fastcgi_param SCRIPT_FILENAME   c:/cygwin/home/Chris....
+    fastcgi_param SCRIPT_FILENAME   /home/Chris....
Roger P. (Guest)
on 2009-04-22 01:35
> The message "No input file specified" meanse that PHP can not find file
> on passed path, say:
> "c:/cygwin/home/Chris/www/live/jobsite/trunk/html/public/index.php"
> I do not know how Cygwin translated pathnames, but it may be just
> "/home/Chris/www/live/jobsite/trunk/html/public/index.php"
> therefore you may try
>
> -    fastcgi_param SCRIPT_FILENAME   c:/cygwin/home/Chris....
> +    fastcgi_param SCRIPT_FILENAME   /home/Chris....

if it's cygwin it might be something like /cygdrive/c/...
Chris Cortese (Guest)
on 2009-04-22 03:42
(Received via mailing list)
Just to clarify:

I'm really wanting to try Igor's latest 0.7.52 native Windows build.
Ignore the part about "cygwin" being part of the pathname.
But there is history for why "cygwin" is in my path at all:

1.  I first was trying the cygwin build from the link out there on the
net.
http://www.softwareprojects.com/resources/programm...
Using that link and a couple other things I had to find / figure out, I
was able to get nginx and php-fpm working on Windows, but I could not
get the crypt() function to understand / do md5.  This meant I couldn't
log in to my local website and so this was kind of useless.

2.  I next tried 0.7.50 from kevinworthington.com.  I think it could
have worked but it insisted on looking for nginx.conf down under the
/cygwin place where I had built nginx from source (see #1, above).  I
could not figure out how to tell it just to use nginx.conf from
c:\nginx\conf\nginx.conf.  I tried uninstalling and reinstalling cygwin
and nginx (but cygwin is not so easy to uninstall).  That was apparently
all that I needed to get that working! (Well, I never got to the point
of testing crypt() on that attempt).

3.  Then Igor releases 0.7.52 native Windows build which I hoped would
avoid both the above problems, and it probably still will, but I am
unclear as to what kind of paths are expected.  Somewhere I read that
for the SCRIPT_FILENAME, I should include the drive letter, but for the
"root" directive, I should not...???  And I did not know if double
quotes should be used, etc.... I can find no documentation on proper
paths for the new 0.7.52 native Windows build nginx.conf.

I'll keep trying.  Hope that history explains how I got there and why
"cygwin" still is in my nginx.conf.  I'm no longer trying to use the
cygwin build.   I just happen to have my web codebase still in that
location (I've also tried other locations, like
c:\nginx\html\www\...etc)


Thanks!
Chris
Weibin Y. (Guest)
on 2009-04-22 07:24
(Received via mailing list)
> Could you add

> open_file_cache          max=1000  inactive=20s;
> open_file_cache_valid    30s;
> open_file_cache_min_uses 2;
> open_file_cache_errors   on;

> and run just

> ab.exe -k -n 10000 -c 1

> to see if CreateFile() adds noticeable overhead ?

I have tested it with above configration, and there is nothing in the
error.log.

C:\Program Files\Apache Software Foundation\Apache2.2\bin>ab.exe -k -n
10000 -
1 http://127.0.0.1/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Completed 10000 requests
Finished 10000 requests


Server Software:        nginx/0.7.52
Server Hostname:        127.0.0.1
Server Port:            80

Document Path:          /
Document Length:        151 bytes

Concurrency Level:      1
Time taken for tests:   1.750 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    10000
Total transferred:      3670000 bytes
HTML transferred:       1510000 bytes
Requests per second:    5714.29 [#/sec] (mean)
Time per request:       0.175 [ms] (mean)
Time per request:       0.175 [ms] (mean, across all concurrent
requests)
Transfer rate:          2047.99 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.2      0      16
Processing:     0    0   1.6      0      16
Waiting:        0    0   1.3      0      16
Total:          0    0   1.6      0      16

Percentage of the requests served within a certain time (ms)
  50%      0
  66%      0
  75%      0
  80%      0
  90%      0
  95%      0
  98%      0
  99%     16
 100%     16 (longest request)
Chris W. (Guest)
on 2009-04-22 07:37
Igor S. wrote:
> Changes with nginx 0.7.52                                        20 Apr
> 2009
>
>     *) Feature: the first native Windows binary release.
>
>     *) Bugfix: in processing HEAD method while caching.
>
>     *) Bugfix: in processing the "If-Modified-Since", "If-Range", etc.
>        client request header lines while caching.
>
>     *) Bugfix: now the "Set-Cookie" and "P3P" header lines are hidden in
>        cacheable responses.
>
>     *) Bugfix: if nginx was built with the ngx_http_perl_module and with
> a
>        perl which supports threads, then during a master process exit
> the
>        message "panic: MUTEX_LOCK" might be issued.
>
>     *) Bugfix: nginx could not be built --without-http-cache; the bug
> had
>        appeared in 0.7.48.
>
>     *) Bugfix: nginx could not be built on platforms different from
> i386,
>        amd64, sparc, and ppc; the bug had appeared in 0.7.42.

Hi, I try to run windows nginx , but I find a bug when I change
nginx.conf "worker_processes  4;"
error_log have much message like " "[alert] 4168#5612: select() failed
(10022: 提供了一个无效的参数。) "
and the error_log file change very big, and half hour after, the file
become 10G!

PS:sorry, I am chinese,I'm bad at English.
Weibin Y. (Guest)
on 2009-04-22 08:07
(Received via mailing list)
> Could you add

> open_file_cache          max=1000  inactive=20s;
> open_file_cache_valid    30s;
> open_file_cache_min_uses 2;
> open_file_cache_errors   on;

> and run just

> ab.exe -k -n 10000 -c 1

> to see if CreateFile() adds noticeable overhead ?

Then I increased the concurrency:

ab.exe -k -n 10000 -c 500
nothing error

 ab.exe -k -n 10000 -c 1000
Error.log: many lines of "2009/04/22 11:14:15 [alert] 2744#448: *951
WSARecv() failed (10053: Your software in this host abandons this
connection.) while keepalive, client: 127.0.0.1, server: 0.0.0.0:80"

(note: The error.log contains some Chinese characters after error number
10053 because of my OS's location. I translated these into English,
maybe not accurate.)

My testing index.html is 151 bytes. Maybe it's too small. Then I used a
test.html with size of 1K bytes. The result changed:

ab.exe -k -n 10000 -c 50
nothing error

ab.exe -k -n 10000 -c 100
nothing error

ab.exe -k -n 10000 -c 200
Error.log: many lines of "2009/04/22 11:34:22 [alert] 2744#448: *4806
WSARecv() failed (10053:Your software in this host abandons this
connection.) while keepalive, client: 127.0.0.1, server: 0.0.0.0:80"

Then I tested a 100k file:

ab.exe -k -n 10000 -c 5
nothing error

ab.exe -k -n 10000 -c 10
nothing error

ab.exe -k -n 10000 -c 20
nothing error

ab.exe -k -n 10000 -c 30
Error.log:
  there are two kinds of errors:
    1. 2009/04/22 11:45:50 [alert] 2744#448: *4996 WSASend() failed
(10053:Your software in this host abandons this connection.) while
sending response to client, client: 127.0.0.1, server: localhost,
request: "GET /test1.html HTTP/1.0", host: "127.0.0.1"
    2.  2009/04/22 11:45:50 [alert] 2744#448: *4992 WSARecv() failed
(10053:Your software in this host abandons this connection.) while
keepalive, client: 127.0.0.1, server: 0.0.0.0:80
Igor S. (Guest)
on 2009-04-22 10:33
(Received via mailing list)
On Wed, Apr 22, 2009 at 11:12:39AM +0800, Weibin Y. wrote:

>
> > to see if CreateFile() adds noticeable overhead ?
>
> I have tested it with above configration, and there is nothing in the error.log.
>
> C:\Program Files\Apache Software Foundation\Apache2.2\bin>ab.exe -k -n 10000 -
> 1 http://127.0.0.1/

> Requests per second:    5714.29 [#/sec] (mean)

Without open_file_cache:

ab.exe -k -n 10000 -c 1 http://127.0.0.1/
Requests per second:    2424.24 [#/sec] (mean)
CPU load: about 68%

It seems that CreateFile() is really heavy syscall: using
open_file_cache
increases twice the number of requests. In this case nginx saves 4
syscalls:

*) CreateFile() while index files testing,
*) and CreateFile()/GetFileAttributesEx/CloseHandle().
Igor S. (Guest)
on 2009-04-22 11:51
(Received via mailing list)
On Wed, Apr 22, 2009 at 12:01:04PM +0800, Weibin Y. wrote:

>
> (note: The error.log contains some Chinese characters after error number 10053 because 
of my OS's location. I translated these into English, maybe not accurate.)
I wanted to log this in English only. Currently I use
         MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT)
for FormatMessage(), probably, I should use
         MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT)

>
>
> ab.exe -k -n 10000 -c 30
> Error.log:
>   there are two kinds of errors:
>     1. 2009/04/22 11:45:50 [alert] 2744#448: *4996 WSASend() failed (10053:Your software 
in this host abandons this connection.) while sending response to client, client: 
127.0.0.1, server: localhost, request: "GET /test1.html HTTP/1.0", host: "127.0.0.1"
>     2.  2009/04/22 11:45:50 [alert] 2744#448: *4992 WSARecv() failed (10053:Your 
software in this host abandons this connection.) while keepalive, client: 127.0.0.1, 
server: 0.0.0.0:80

Probably, this is ab-specific errors: it opens several connections, and
when number of requests are reached, just closes superfluous
connections.
Unix does not returns error in this case or may return EPIPE.
It seems that Windows returns WSAECONNABORTED in this case.
I will lower its level to [info].
Igor S. (Guest)
on 2009-04-22 16:11
(Received via mailing list)
On Tue, Apr 21, 2009 at 04:34:49PM -0700, Chris Cortese wrote:

> was able to get nginx and php-fpm working on Windows, but I could not
> of testing crypt() on that attempt).
> "cygwin" still is in my nginx.conf.  I'm no longer trying to use the
> cygwin build.   I just happen to have my web codebase still in that
> location (I've also tried other locations, like c:\nginx\html\www\...etc)

The path in SCRIPT_FILENAME is FastCGI server property. You may run
nginx
on Unix host and FastCGI on Windows. And in this case SCRIPT_FILENAME
should have Windows-style path.

If PHP is Cygwin application, then you should use Cygwin-compatible
path.
If PHP is native Win32 application, then you should use x:\.. style
path.
Igor S. (Guest)
on 2009-04-22 16:54
(Received via mailing list)
On Wed, Apr 22, 2009 at 05:37:41AM +0200, Chris Wan wrote:

> Hi, I try to run windows nginx , but I find a bug when I change
> nginx.conf "worker_processes  4;"
> error_log have much message like " "[alert] 4168#5612: select() failed
> (10022: ?????????????????????????????????) "
> and the error_log file change very big, and half hour after, the file
> become 10G!

Could you enable debug logging:

error_log  logs/error.log  debug;

reproduce the above error and send the log to me ?
Chris Cortese (Guest)
on 2009-04-22 23:34
(Received via mailing list)
Thanks Igor!
Understanding the difference in who is handling which path was my last
hurdle.  I now have all native nginx, mysql, php running successfully on
XP.

Very minor detail/request from Windows people:  I'm not very
knowledgeable with MS-DOS Batch files.  Can someone tell me how to run
"start nginx" from within a .bat?  I'm just running it separately from a
cmd prompt now, which works, just one extra step.

On another note to the folks maintaining the nginx site and docs, I'm
sure it would be very helpful to M$ people if you took the information
from the following link, updated it so that it relates to the current
Windows native binary (and strip the Wordpress-specific stuff), and took
this information to the nginx site.

http://blogbuildingu.com/wordpress/install-wordpress-wemp

It would also be great if someone wanted to take the time to also add
the information from the following link, update some info in terms of
version numbers, etc., and ideally if you can explain how to get crypt()
to work in cygwin (I never figured this out), this would be very helpful
to people who want to run nginx on Windows but have everything be in the
Cygwin environment, build php-fpm and everything from source.

http://www.softwareprojects.com/resources/programm...


---


The following is my vhost conf for a very basic site built on Code
Igniter:

# note that the "WEMP" stack is not using any cygwin components.  I just
have my web PHP code in that directory
# structure still, which is convenient for when I want to use *nix-like
environment on my Windows codebase.

server {
  listen   *:80;
  server_name  jobsite.xpdesktop;

  access_log  html/jobsite/logs/jobsite.access.log;
  error_log html/jobsite/logs/jobsite.error.log;

  root /cygwin/home/Chris/www/live/jobsite/trunk/html/public;
  index index.php index.html;

  location / {
    fastcgi_pass  127.0.0.1:9000;
    fastcgi_param SCRIPT_FILENAME
c:/cygwin/home/Chris/www/live/jobsite/trunk/html/public/index.php;
    fastcgi_param QUERY_STRING      q=$request_uri;
    include fastcgi_params;
  }

  location ~ /.php$ {
    fastcgi_pass  127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME
c:/cygwin/home/Chris/www/live/public$fastcgi_script_name;
    fastcgi_param QUERY_STRING      q=$request_uri;
    include fastcgi_params;
  }
}
diogin (Guest)
on 2009-04-23 03:56
(Received via mailing list)
Hello folks,

Is windows binary unable to customize installation path? The only path
is C:/nginx ?
Thanks.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,1199,1323#msg-1323
Igor S. (Guest)
on 2009-04-23 04:17
(Received via mailing list)
On Wed, Apr 22, 2009 at 02:47:01AM -0400, diogin wrote:

> Is windows binary unable to customize installation path? The only path is C:/nginx ?

Currently - yes. Probabaly, in next versions I will remove prefix at all
and nginx will get nginx.conf from the current directory.

Right now you may set full path in nginx.conf and run nginx as

nginx -c d:/nginx1/nginx.conf

To control you need to set path to conf file, too:

nginx -s reload -c d:/nginx1/nginx.conf
Chris W. (Guest)
on 2009-04-23 07:14
Igor S. wrote:
> On Wed, Apr 22, 2009 at 05:37:41AM +0200, Chris Wan wrote:
>
>> Hi, I try to run windows nginx , but I find a bug when I change
>> nginx.conf "worker_processes  4;"
>> error_log have much message like " "[alert] 4168#5612: select() failed
>> (10022: ?????????????????????????????????) "
>> and the error_log file change very big, and half hour after, the file
>> become 10G!
>
> Could you enable debug logging:
>
> error_log  logs/error.log  debug;
>
> reproduce the above error and send the log to me ?

2009/04/23 09:52:15 [debug] 616#11980: *5736 write new buf t:1 f:0
00A48940, pos 00A48940, size: 211 file: 0, size: 0
2009/04/23 09:52:15 [debug] 616#11980: *5736 http write filter: l:0 f:0
s:211
2009/04/23 09:52:15 [debug] 616#11980: *5736 http output filter
"/index.html?"
2009/04/23 09:52:15 [debug] 616#11980: *5736 copy filter: "/index.html?"
2009/04/23 09:52:15 [debug] 616#11980: *5736 http postpone filter
"/index.html?" 00A48B44
2009/04/23 09:52:15 [debug] 616#11980: *5736 write old buf t:1 f:0
00A48940, pos 00A48940, size: 211 file: 0, size: 0
2009/04/23 09:52:15 [debug] 616#11980: *5736 write new buf t:1 f:0
00A48AAC, pos 00A48AAC, size: 151 file: 0, size: 0
2009/04/23 09:52:15 [debug] 616#11980: *5736 http write filter: l:1 f:0
s:362
2009/04/23 09:52:15 [debug] 616#11980: *5736 http write filter limit 0
2009/04/23 09:52:15 [debug] 616#11980: *5736 WSASend: fd:220, s:362
2009/04/23 09:52:15 [debug] 616#11980: *5736 http write filter 00000000
2009/04/23 09:52:15 [debug] 616#11980: *5736 copy filter: 0
"/index.html?"
2009/04/23 09:52:15 [debug] 616#11980: *5736 http finalize request: 0,
"/index.html?" 1
2009/04/23 09:52:15 [debug] 616#11980: *5736 http close request
2009/04/23 09:52:15 [debug] 616#11980: *5736 http log handler
2009/04/23 09:52:15 [debug] 616#11980: *5736 run cleanup: 00A48860
2009/04/23 09:52:15 [debug] 616#11980: *5736 file cleanup: fd:208
2009/04/23 09:52:15 [debug] 616#11980: *5736 free: 00A48338, unused:
1893
2009/04/23 09:52:15 [debug] 616#11980: *5736 close http connection: 220
2009/04/23 09:52:15 [debug] 616#11980: *5736 select del event fd:220
ev:0
2009/04/23 09:52:15 [debug] 616#11980: *5736 free: 00A3C4C0
2009/04/23 09:52:15 [debug] 616#11980: *5736 free: 00A51350
2009/04/23 09:52:15 [debug] 616#11980: *5736 free: 00A51628, unused: 56
2009/04/23 09:52:15 [debug] 616#11980: posted event 00000000
2009/04/23 09:52:15 [debug] 616#11980: worker cycle
2009/04/23 09:52:15 [debug] 616#11980: accept mutex lock failed: 0
2009/04/23 09:52:15 [debug] 616#11980: select timer: 500
2009/04/23 09:52:15 [debug] 616#11980: select read fd_set: 00000000
2009/04/23 09:52:15 [debug] 616#11980: select ready -1
2009/04/23 09:52:15 [alert] 616#11980: select() failed (10022:
提供了一个无效的参数。)
2009/04/23 09:52:15 [debug] 616#11980: timer delta: 0
2009/04/23 09:52:15 [debug] 616#11980: posted events 00000000
2009/04/23 09:52:15 [debug] 616#11980: worker cycle
2009/04/23 09:52:15 [debug] 616#11980: accept mutex lock failed: 0
2009/04/23 09:52:15 [debug] 616#11980: select timer: 500
2009/04/23 09:52:15 [debug] 616#11980: select read fd_set: 00000000
2009/04/23 09:52:15 [debug] 616#11980: select ready -1
2009/04/23 09:52:15 [alert] 616#11980: select() failed (10022:
提供了一个无效的参数。)
2009/04/23 09:52:15 [debug] 616#11980: timer delta: 0
2009/04/23 09:52:15 [debug] 616#11980: posted events 00000000
2009/04/23 09:52:15 [debug] 616#11980: worker cycle
2009/04/23 09:52:15 [debug] 616#11980: accept mutex lock failed: 0
2009/04/23 09:52:15 [debug] 616#11980: select timer: 500
2009/04/23 09:52:15 [debug] 616#11980: select read fd_set: 00000000
2009/04/23 09:52:15 [debug] 616#11980: select ready -1
2009/04/23 09:52:15 [alert] 616#11980: select() failed (10022:
提供了一个无效的参数。
......
diogin (Guest)
on 2009-04-23 09:19
(Received via mailing list)
Igor S. Wrote:
-------------------------------------------------------
>
> nginx -c d:/nginx1/nginx.conf
>
> To control you need to set path to conf file,
> too:
>
> nginx -s reload -c d:/nginx1/nginx.conf

Hello Igor,

I just unzip the nginx-0.7.52.zip as D:/nginx1, and then change dir to
D:/nginx1:

D:\nginx1>dir

2009-04-22  19:53              .
2009-04-22  19:53              ..
2009-04-20  10:28              conf
2009-04-20  10:28              contrib
2009-04-20  10:28              docs
2009-04-20  10:28              html
2009-04-20  10:28              logs
2009-04-20  10:24         1,249,280 nginx.exe
2009-04-20  10:28              temp

D:\nginx1>nginx -c D:/nginx1/conf/nginx.conf

D:\nginx1>

Nothing happens, nginx exits without any warning. I checked my system
event log and found an error:

"D:\nginx1\nginx.exe: Could not open error log file: CreateFile()
"c:/nginx/logs/error.log" failed"

So nginx uses the default path "c:/nginx" before it reads the paths from
nginx.conf? Is there any chance that I can specify all the paths (i.e.
temp, logs, etc) in the configuration file?
Thanks very much :-)

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,1199,1336#msg-1336
Igor S. (Guest)
on 2009-04-23 09:28
(Received via mailing list)
On Wed, Apr 22, 2009 at 08:09:30AM -0400, diogin wrote:

> > Right now you may set full path in nginx.conf and
>
> 2009-04-20  10:28              logs
> 2009-04-20  10:24         1,249,280 nginx.exe
> 2009-04-20  10:28              temp
>
> D:\nginx1>nginx -c D:/nginx1/conf/nginx.conf
>
> D:\nginx1>
>
> Nothing happens, nginx exits without any warning. I checked my system event log and 
found an error:
>
> "D:\nginx1\nginx.exe: Could not open error log file: CreateFile() 
"c:/nginx/logs/error.log" failed"

I will change this behavior in near future: nginx will try to write to
stderr
before fallback to event log.

> So nginx uses the default path "c:/nginx" before it reads the paths from nginx.conf? Is 
there any chance that I can specify all the paths (i.e. temp, logs, etc) in the 
configuration file?

Yes:

error_log  d:/nginx1/logs/error.log  notice;

etc.
Roger P. (Guest)
on 2009-04-23 17:38
> Very minor detail/request from Windows people:  I'm not very
> knowledgeable with MS-DOS Batch files.  Can someone tell me how to run
> "start nginx" from within a .bat?  I'm just running it separately from a
> cmd prompt now, which works, just one extra step.

It should be the same way as from a command prompt. [?]

> On another note to the folks maintaining the nginx site and docs, I'm
> sure it would be very helpful to M$ people if you took the information
> from the following link, updated it so that it relates to the current
> Windows native binary (and strip the Wordpress-specific stuff), and took
> this information to the nginx site.

There is a wiki you may be able to add a page there :)
Thanks for the info!
http://wiki.nginx.org/Main

-=r
This topic is locked and can not be replied to.