Author |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
Posted: Mon 16 Jun '14 13:52 Post subject: |
|
|
Thanks because its windows i read that mmap should be set like the following not as a file path ?
"for win32, xcache.mmap_path=anonymous map name, not file path" |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7309 Location: Germany, Next to Hamburg
|
Posted: Mon 16 Jun '14 13:58 Post subject: |
|
|
I know you all love this topic, but it is no longer the X VS Y topic, but how to configure nginx. Please feel free to open a new topic in the Other Software section. Thanks! |
|
Back to top |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
|
Back to top |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
Posted: Tue 17 Jun '14 17:30 Post subject: |
|
|
@ng4win i found a bug with what i recon is fastcgi in your version.
Here is how i know it can only be fastcgi.
PHP outputs a page load speed. (Page load speeds on all pages are always less than 1 second)
Mysql i have enabled slow query logging that logs queries that take more than 2 seconds. (There are no queries that take more than 2 seconds)
Now very often pages take 30 seconds or more to load but yet if i am to access a page through nginx that is not php. (Html) it loads instantly all the time.
Only pages that get delieverd by fastcgi are taking sometimes up to a miniute to load but yet my php execution "Time to create page: 0.125 seconds" Something is very wrong.
I use the following firefox extension https://addons.mozilla.org/en-US/firefox/addon/extended-statusbar/?src=userprofile
"Time to create page: 0.27 seconds" and firefox output was "33 seconds", It can only be fastcgi since all other requests that do not hit fastcgi mp4, html, static requests all work fine and fast. |
|
Back to top |
|
ng4win
Joined: 25 May 2014 Posts: 78
|
Posted: Tue 17 Jun '14 18:48 Post subject: |
|
|
I doubt its a bug since control is passed to php-cgi and then its a waiting game for when php returns the results, could be anything within php/mysql, anyway I need a working config to reproduce this. |
|
Back to top |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
|
Back to top |
|
ng4win
Joined: 25 May 2014 Posts: 78
|
Posted: Tue 17 Jun '14 20:17 Post subject: |
|
|
We only use teamviewer and such support is considered commercial support. Post a new topic like the mods noted yesterday, or on the nginx forums with the basic fastcgi/php.ini config and a good description what is happening and what you think should happen. Also remove wincache for the time being. |
|
Back to top |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
|
Back to top |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
Posted: Thu 19 Jun '14 20:57 Post subject: |
|
|
In the battle of Nginx vs "The World" who has written or has a good script / command line (.cmd/.bat) file for me to do some testing and benchmarking with |
|
Back to top |
|
jimski
Joined: 18 Jan 2014 Posts: 196 Location: USSA
|
Posted: Wed 13 May '15 16:21 Post subject: |
|
|
Hi ng4win, I have to say that the documentation on your website needs a lot of work to be user friendly.
For example there is no explanation what the following files do:
ntrights.exe
srvany.exe
wget.exe
sleep.exe
The one line "Used by service creation and installation scripts" is insufficient. As a sysadmin I'm always cautious of executables with no explanation.
Also installation steps are convoluted and using vb scripts to unzip a file seems to be overkill.
Of course an experienced sysadmin can get it to work (after some hair pulling) but this won't get your work a wide acceptance which you most likely deserve. |
|
Back to top |
|
ng4win
Joined: 25 May 2014 Posts: 78
|
Posted: Wed 13 May '15 21:16 Post subject: |
|
|
jimski wrote: | Hi ng4win, I have to say that the documentation on your website needs a lot of work to be user friendly. |
I am aware of this but it's not easy to make it easier and run on anything at the same time
Quote: | For example there is no explanation what the following files do:
ntrights.exe
srvany.exe
wget.exe
sleep.exe |
If you read and understand the scripts the reader will know what these are, if you don't understand it then it makes no sense to explain what they do either.
Quote: | Also installation steps are convoluted and using vb scripts to unzip a file seems to be overkill. |
The aim was to make something that works without having to download/install lots of different tools to get it unpacked and installed, and also on just about any OS.
Quote: | Of course an experienced sysadmin can get it to work (after some hair pulling) but this won't get your work a wide acceptance which you most likely deserve. |
It's a battle between,
a) do we make something next-next-finish and have every TD&H ask questions about basic 101 issues you should know before running a webserver
b) do we make something more technical forcing you to have or get enough knowledge before hand
We do catalog and analyse all the support questions we get and the most common one is:
"I clicked on the .exe and it flashes, it doesn't work!"
It's like exchange, next-next-next-finish, yes it works mate! duh, open-relay active, anon mail accepted, batched-smtp allowed (accepting 99% spam), dropping of mail directly to smtp servers and hereby blacklisting exchange.... anyone can do it, but 99% shouldn't.
I do agree with your arguments, hopefully you can see the dilemma. |
|
Back to top |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
Posted: Wed 13 May '15 22:12 Post subject: |
|
|
Quote: |
Quote: | Also installation steps are convoluted and using vb scripts to unzip a file seems to be overkill. |
The aim was to make something that works without having to download/install lots of different tools to get it unpacked and installed, and also on just about any OS. |
I actually did something for a game server project and it is a batch .bat/.cmd script / file that you can use to launch windows powershell in order to unzip .zip files using powershell aswell as download external files with powershell. that you may find usefull.
http://stackoverflow.com/questions/4619088/windows-batch-file-file-download-from-a-url/30093723#30093723
So feel free to take my code and suit it to your own needs
Code: | @echo off
set downloadurl=http://media.steampowered.com/installer/steamcmd.zip
set downloadpath=C:\steamcmd\steamcmd.zip
set directory=C:\steamcmd\
%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "& {Import-Module BitsTransfer;Start-BitsTransfer '%downloadurl%' '%downloadpath%';$shell = new-object -com shell.application;$zip = $shell.NameSpace('%downloadpath%');foreach($item in $zip.items()){$shell.Namespace('%directory%').copyhere($item);};remove-item '%downloadpath%';}"
echo download complete and extracted to the directory.
pause |
If you want to prevent it deleting the downloaded and extracted zip file just remove this.
Code: | remove-item '%downloadpath%'; |
|
|
Back to top |
|
ng4win
Joined: 25 May 2014 Posts: 78
|
Posted: Thu 14 May '15 9:28 Post subject: |
|
|
Tnx but powershell is not present by default, you need to install it which is what we try to avoid, nothing is needed to get going. This vb stuff runs on anything. |
|
Back to top |
|
jimski
Joined: 18 Jan 2014 Posts: 196 Location: USSA
|
Posted: Thu 14 May '15 14:07 Post subject: |
|
|
C0nw0nk wrote: | @ng4win i found a bug with what i recon is fastcgi in your version.... |
I also have weird random delays when serving php pages on nginx on Wind7. And on the same machine Apache just runs without a problem.
ng4win wrote: |
Yes it is, but that tweet is about syslog being able to handle c100k without loosing any logging, our build should be able to handle c1000k+ |
1 million connection sounds great but when it comes to serving actual php pages in my tests Apache on windows with mod_php still runs faster and servers more pages per second than nginx for windows.
What are your results guys?
I'm running php 5.3.29 and serving a php page with content being fetched from database. Either my nginx is misconfigured or Apache indeed runs faster when serving php.
No matter how many workers I run and how many concurrent php-cgi processes, Apache still wins. |
|
Back to top |
|
ng4win
Joined: 25 May 2014 Posts: 78
|
Posted: Thu 14 May '15 16:57 Post subject: |
|
|
If mod_php is an internal process compared to nginx/php which uses a tcp port then yes mod_php will be faster inherent to design. OTOH nginx/Lua will blow apache/Lua out of the water. |
|
Back to top |
|
jimski
Joined: 18 Jan 2014 Posts: 196 Location: USSA
|
Posted: Sat 16 May '15 6:50 Post subject: |
|
|
ng4win, have you tested nginx for windows serving the phpinfo() page on windows with apache bench or any other performance software? BTW only php 5.3.x will serve phpinfo() without errors when using apache bench.
How many requests per second can you serve when using phpinfo() as a test page. Also let us know on what hardware.
In the past we have used this testing methodology for testing Apache with FastCGI:
TESTING METHODOLOGY:
1. Disable any Caching in php and on webserver.
2. Use this php file. Copy the line below and save it as phpinfo.php. It is just one line but gives apache and php good beating.
<?php phpinfo(); ?>
3. Set FcgidMaxProcesses 1
FcgidMaxProcessesPerClass 1
FcgidProcessLifeTime 0
FcgidMaxRequestsPerProcess 0
4. Run Apache Bench with these parameters and save results
ab -n 10000 -c 1 http://127.0.0.1:80/phpinfo.php
5. Then set FcgidMaxProcesses 10
FcgidMaxProcessesPerClass 10
FcgidMinProcessesPerClass 10
6. Restart Apache
7. Run Apache Bench with these parameters just to spawn the processes but ignore the results
ab -n 10000 -c 100 http://127.0.0.1:80/phpinfo.php
8. Run Apache Bench again with these parameters and save your results
ab -n 10000 -c 100 http://127.0.0.1:80/phpinfo.php
9. Post your results using these 4 lines only:
Time taken for tests: xxx
Complete requests: xxx
Failed requests: xxx
Requests per second: xxx |
|
Back to top |
|
ng4win
Joined: 25 May 2014 Posts: 78
|
Posted: Sat 16 May '15 13:24 Post subject: |
|
|
It's a nice idea but this will turn out to be a 'my d*ck is bigger then yours' contest...
You can't compare such results, for example everything here is virtual running on 1 to 16 clusters depending where your request comes in.
Using real hardware doesn't mean much either unless they are absolutely the same including the network hardware and wire-ring.
And what about sustained throughput testing? the same issues and also the difference in design, actual available bandwidth (iperf -w 256k anyone?), etc.
What about blocking vs. non-blocking configurations? I could easily embed php inside nginx for some simple php stuff but fully non-blocking and hand you a "Requests per second: 10000.00 [#/sec]" result which is meaningless due to the design differences.
2 weeks ago I saw 48 workers on 8 cores, they were complaining it slowed down too much.... duh.... I offered them their subscription money back, I wasn't even going to bother explaining why.
Yet on our OTA cluster we test with 32 workers also on 8 cores which are hyper-threaded with 2 pipes from the main board to each cpu (only then hyper-threading makes any point in using) which effectively makes 2 workers/core, with a low prio/worker and ramdrives for the content.
To do a close enough compare even with Lua would give results you can't really compare. |
|
Back to top |
|
jimski
Joined: 18 Jan 2014 Posts: 196 Location: USSA
|
Posted: Sat 16 May '15 15:06 Post subject: |
|
|
ng4win wrote: | It's a nice idea but this will turn out to be a 'my d*ck is bigger then yours' contest...
Using real hardware doesn't mean much either unless they are absolutely the same including the network hardware and wire-ring.
|
It has nothing to do with a di*k, everybody already knows that my di^k is bigger than yours.
We are all looking for the best performing web sever even if its creator has a small di*k.
In the past tests we were bypassing the network by running the apache bench and nginx on the same machine. This way you are eliminating all the network and NIC variables. And yes I know that it is still not perfect but at least gives us some idea about performance of the web server.
In my tests nginx running on Linux is 150% to 180% faster than any configuration of Apache on windows.
We had high hopes for your compilation because it supposed to support multiple requests per php process.
Since you are the only true expert on your compilations and configurations nobody can configure better your version of nginx, In the same time apache with mod_php is trivial to install and configure so if you could install apache on one of your nginx machines and give us some comparison it would be greatly appreciated.
I would consider paying you for configuration of one of my machines if your nginx can outperform apache with mod_php by 20% or more when serving phpinfo(). Maybe other people would too if they saw some real life numbers. |
|
Back to top |
|