logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache loads slow on just few connections
Author
sawo



Joined: 15 May 2008
Posts: 36

PostPosted: Thu 15 May '08 19:08    Post subject: Apache loads slow on just few connections Reply with quote

Hi all, my name is Alex and im new here so excuse me if i missed something in the rules Smile

Ok first here is my setup:

Software:
Win XP Pro SP3 + TCP/IP Patch enabled (150 half-open connections max)
Apache 2.2.8
#No Antivirus software, just the windows firewall enabled.

Hardware:
C2 Quad 3,2GHz
2GB 1GHz DDR2 @ CL4
100Mb link

I have the following problem:
For example i have two files in my server:
3mb.jpg
100mb.bin
Note: I have direct access to the server and i tried to do all the stuff using http://localhost/ to eliminate all possible problems related to the ISP

When i open 3mb.jpg via web browser the file loads in ~0,5s
When i start downloading at the same time 100mb.bin with lets say 8 connections, the image 3mb.jpg loads very, very slow via the web browser.

Here is what i tried:
Installed M$ Virtual PC, installed clean xp sp2 on it, apache 2.2.8 from httpd.apache.org, applied the tcp/ip patch, increased the values of the settings in mpm_prefork_module, turned off keepalive, disabled all but the core modules, enabled Win32DisableAcceptEx in httpd.conf but i still cant fix the problem.
Notes: When i installed Win2003 SP2 standart in the Virtual PC there was no problem at all.
If i use for example http://smallsrv.com/ there is no problems too.
Also, i dont have this problem with Apache 1.3, only with 2.0+


Last edited by sawo on Sun 18 May '08 17:39; edited 1 time in total
Back to top
sawo



Joined: 15 May 2008
Posts: 36

PostPosted: Sun 18 May '08 17:37    Post subject: Reply with quote

No response in 3 days in the most popular apache forum?
Is really apache that bad on XP ?
I tried other http servers and all of them work well on xp except for apache(version >1.3)
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Sun 18 May '08 19:06    Post subject: Reply with quote

No response means generally that nobody has an answer (yet) on your issue.

Nope, tons of users are using Apache 2.2 on windows XP. First time I see this kind of issue.

Just wondering that you have a TCP/IP Patch enabled, try not to use it. Also wondering that you mention the mpm_prefork_module, just use the default WinNT MPM.

Steffen
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Sun 18 May '08 19:06    Post subject: Reply with quote

re: "Is really apache that bad on XP ? "

Apparently not for others, but there is little experience yet with XP-SP3.
Do you see the same problem with XP-SP2?

On windows, Apache 2.2 uses the mpm_winnt_module, not the mpm_prefork_module.

You can examine your half-open connections in a command window with:
Code:
netstat -an
Look for connections with CLOSE_WAIT or TIME_WAIT status.

Other directives you could try are: EnableSendfile Off and EnableMMAP Off - but, like Win32DisableAcceptEx, these directives are only needed to work around driver/firewall/av problems. If you need any of these directives it indicates that something is not working correctly in your Windows environment.

-tom-
Back to top
sawo



Joined: 15 May 2008
Posts: 36

PostPosted: Sun 18 May '08 21:46    Post subject: Reply with quote

I usually use AppServ which uses mpm:
Code:
<IfModule mpm_prefork_module>
    StartServers          20
    MinSpareServers       20
    MaxSpareServers      40
    MaxClients          500
    MaxRequestsPerChild   100
</IfModule>

(just random values)

Looks like EnableSendfile Off fixes the problem, but i still dont know what causes it.
I used CLEAN XP-SP2 and XP-SP3 all from M$ unmodified versions installed on my virtual pc and all of them have exactly the same problem with and without the TCP/IP Patch (all tests were done inside the virtual pc itself, not just via the network).
The half-open connections are always below 5.
Also, i tried the same steps using the official latest version of apache and there was no change whatsoever.
The problem is not in the virtual pc itself, because i have the same problem with my server box, before and after the installation of SP3.
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Mon 19 May '08 1:04    Post subject: Reply with quote

Your question prompted me to take another look at the Microsoft version of the SendFile function. This function is named TransmitFile on Windows.

This quote from the latest TransmitFile docs may explain why you see good performance until you have multiple concurrent downloads:
Quote:
Workstation and client versions of Windows optimize the TransmitFile function for minimum memory and resource utilization by limiting the number of concurrent TransmitFile operations allowed on the system to a maximum of two.

Server versions of Windows optimize the TransmitFile function for high performance. On server versions, there are no default limits placed on the number of concurrent TransmitFile operations allowed on the system. Expect better performance results when using TransmitFile on server versions of Windows.

Anyone who measured Apache performance with one or two concurrent requests may see better performance with EnableSendfile On, but with three or more concurrent requests it looks like EnableSendfile Off is the better choice for non-server versions of Windows.

Also, btw your <IfModule mpm_prefork_module> section is not doing anything. <IfModule mpm_prefork_module> means that these directives should only be processed when the mpm is prefork. With Apache 2.2 on Windows the mpm is always winnt, not prefork - so everything inside this block is ignored.

-tom-
Back to top
sawo



Joined: 15 May 2008
Posts: 36

PostPosted: Mon 19 May '08 1:26    Post subject: Reply with quote

Thats strange.After your post i checked across the net and there are multiple suggestions directed to apache to disable sendfile for XP and there is no change since 2.0, but i am not sure if the sendfile works on some configurations, or apache assumes that their server will serve no more than 2 concurrent connections when installed on client-based OS.
I dont see any performance loss, so im going to use these settings because looks like nothing is wrong with my OS or the server itself.
About the mpm, you are right - i saw the nt module config in the extra folder.
Back to top


Reply to topic   Topic: Apache loads slow on just few connections View previous topic :: View next topic
Post new topic   Forum Index -> Apache