Slow upload speeds from apache under windows only

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Slow upload speeds from apache under windows only

Postby Moy » 30. June 2011 20:45

I've been quite the happy XAMPP user for about seven or so years now, and I recommend it to pretty much anyone who even remotely thinks about getting into web development.

And for years I've just had a standard cable connection, and I was always able to easily saturate the small 1-4mbps upspeed that I've had.

Late last year I've gotten a 35/35 fiber line and noticed that this Windows machine can barely upload at all, I tend to just shove files onto a Linux machine before sending things to people, since the other machines have nearly no limitations on it's upload. And judging from the use of torrents, or speedtest ( http://www.speedtest.net/result/1328102468.png ) it's only apache that's suffering from slow upstream.


Notice that the IPs are the same, Both are real machines not VMs, and both are using Apache

The windows machine is significantly slower than the Linux machine is, the XAMPP setup is pretty much stock when it comes to the apache setup. And a stock setup gives the same results anyways.

XAMPP is running under Win7 64bit, with a quad3.0ghz and 8GB of ram, the server is significantly faster than the other Linux machine

I've tried googling for any information regarding slow upload speeds for apache/windows, but the majority of things are for Win2003 issues, and ignorant people with slow upstreams on their connections.


I was just wondering if anyone knew of anything specific that might help resolve this issue, I've done things like tweaking various network settings and the such.
Last edited by Moy on 02. August 2011 10:56, edited 1 time in total.
Moy
 
Posts: 2
Joined: 30. June 2011 20:16

Re: Slow upload speeds from apache under windows only

Postby Sharley » 01. July 2011 03:45

Which version of XAMPP?

This section in the \xampp\apache\conf\extra\httpd-mpm.conf file may be a starting point for some research and may be the settings that could help your case - the active mpm for Apache in XAMPP is the following WinNT MPM and the other MPM sections are irrelevant and so will have no effect at all if edited.
Code: Select all
# WinNT MPM
# ThreadsPerChild: constant number of worker threads in the server process
# MaxRequestsPerChild: maximum  number of requests a server process serves
# Win32DisableAcceptEx: Use accept() rather than AcceptEx() to accept network connections
<IfModule mpm_winnt_module>
    ThreadsPerChild      150
    MaxRequestsPerChild    0
    #Win32DisableAcceptEx
</IfModule>
If you edit this file then make a backup copy first and then restart Apache after editing so Apache can read the changes.

I can't recommend any specific changes in your case but with a little research and some trial and error you may be able to spot some performance improvements (or perhaps not). :)

The httpd-default.conf file may also contain some performance enhancement settings.

There may be other settings that could effect performance especially if you are using PHP and these PHP settings can be seen and edited in the \xampp\php\php.ini file - restarting Apache applies to all configuration files including ini files as Apache only reads them once when it is started.

Reading the comments and following the documentation links for individual settings may help establish how these settings may have a bearing on specific performance issues.

Additionally these Search Results may contain some relevant content.

Good luck.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
XAMPP Version: 5.6.3
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Slow upload speeds from apache under windows only

Postby Moy » 01. July 2011 19:56

<IfModule mpm_winnt_module>
ThreadsPerChild 150
MaxRequestsPerChild 0
#Win32DisableAcceptEx
SendBufferSize 131072
</IfModule>

After reading about the mpm_winnt settings I found that you can put a buffer onto that, the 'Win32DisableAcceptEx' didn't have any noticeable effect however, 'SendBufferSize' was able to get the upstream speed to around 512KB or so if the buffer was set to 32KB+, but that seems to have caused bizarre disconnects for nearby people, even though the same things being sent from the Linux machine was at the full 35mbit without the disconnection issues.

I suppose I'll just have to shove larger files onto the Linux machine or find an Apache replacement.
Moy
 
Posts: 2
Joined: 30. June 2011 20:16

Re: Slow upload speeds from apache under windows only

Postby Homosapien » 07. February 2012 12:25

Pardon me for posting in a thread this old, but I seem to have this exact problem myself.
I signed up in the hope of finding a solution to this problem.

So, long story short, my server, like the OP's, is a standard Apache service, running in a Windows environment.
Unfortunately, I have no option of moving Apache to a Linux OS.

I have tried setting up two different software solutions for hosting HTTP servers (Apache and HFS), on three separate physical machines.
Operating systems tried are Windows XP x86, Windows XP x64 and Windows 7 Professional x64.
The latter was formatted and installed for the specific purpose of Apache hosting, so no other crap interfering in terms of installed programs.

My internet connection has 33 megabits (or 4.1 MB/s) download.
Upload speed varies a bit, but never goes below 32 megabits, so to keep things simple, my upload speed is (at worst) 32 megabits (or 4 MB/s), according to various speed test sites.
Image
I have confirmed with four different employees at my service provider, that there is no throttling of traffic going on at all, inbound or outbound.

Despite of all this, people downloading from my Apache server are getting a maximum of 1.2 megabits (or 150 KB/s).
Using the LAN IP of the server, I am able to reach download speeds from this same server extremely close to the 32 megabits (or 4 MB/s).
This tells me that the Apache software itself is capable of pumping out files at much higher speeds than the 150 KB/s people are getting over the internet.

- No antivirus software installed
- Windows Defender and Security Essentials disabled on the Win7 machine
- Tried disabling the Windows firewall completely
- Tried using numerous different ports for the HTTP traffic, and making sure to open the ports in my router
- Tried plugging the host computer directly into the first ethernet wall outlet, thus connecting it before the router
- Tried using different ethernet cables
- Tried using TCP optimizer software
- Tried hosting from a few different IP addresses assigned to me by the ISP

Funny thing is, that when the same people who get the 150 KB/s using the HTTP protocol access my FTP server, on the same physical computer, which is set up to allow only one active download "slot/thread" per connected client, they hit download speeds in excess of 24 megabits (or 3 MB/s)!


I have had assistance in troubleshooting from a friend of mine, using TeamViewer.
This guy knows what he's doing, and he copied his known good Apache configuration to my server, though this didn't have any effect on speeds.

I apologize for the wall of text, but hope someone will be able to help me locate the weak link in my setup, as this is starting to get annoying.
If we do manage to find a way to get my speeds up to what my line can handle, perhaps we can arrange a symbolic money reward wired through PayPal or something, as a thanks.
Homosapien
 
Posts: 4
Joined: 07. February 2012 11:43
XAMPP Version: 1.8.3-2
Operating System: Windows XP Pro SP2 x64

Re: Slow upload speeds from apache under windows only

Postby Altrea » 07. February 2012 19:35

Hi Homosapien,

Please try following fix:

  • open your \xampp\conf\httpd.conf file
  • search for #EnableSendfile off
  • remove the # at the beginning
  • save the file

additional to that you have to set the following:

http://community.apachefriends.org/f/viewtopic.php?p=160028#p160031 wrote:You need to open up regedit and browse to:

HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services > AFD > Parameters

You need to create TWO DWORD values "DefaultReceiveWindow" and "DefaultSendWindow"

You then set both these values using DECIMAL (not Hex) using this formula:

DefaultReceiveWindow = (Download Capacity in Kilobits * 1024) / 8
DefaultSendWindow = (Upload Capacity in Kilobits * 1024) / 8

For example, for a 10Mbit (10000Kbit) upload and download:

DefaultReceiveWindow = (10000 * 1024) / 8 = 1280000
DefaultSendWindow = (10000 * 1024) / 8 = 1280000


After that restart your computer, so that the registry settings can take effect.
After that try another speedtest.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6544
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: Slow upload speeds from apache under windows only

Postby Homosapien » 07. February 2012 22:00

Hello you!

I appreciate your help, and just tried applying the settings you suggested to my server.
Sadly, it didn't have any noticeable impact on the upload speeds from Apache service :|
Homosapien
 
Posts: 4
Joined: 07. February 2012 11:43
XAMPP Version: 1.8.3-2
Operating System: Windows XP Pro SP2 x64

Re: Slow upload speeds from apache under windows only

Postby charos » 20. February 2012 18:02

Jumped in to report exactly the same issue.
The DWORD values on the registry did the trick for me. It increases gradually and although it doesn't reach near the max. available bandwidth, it certainly passes the 150-170 kbps fixed upload speed.
Nice fix!
charos
 
Posts: 1
Joined: 20. February 2012 17:34
XAMPP Version: 1.8.3-2
Operating System: Win XP

Re: Slow upload speeds from apache under windows only

Postby Homosapien » 21. February 2012 14:44

charos wrote:The DWORD values on the registry did the trick for me. It increases gradually and although it doesn't reach near the max. available bandwidth, it certainly passes the 150-170 kbps fixed upload speed.

What is your maximum available upload bandwidth and how fast are you actually uploading using Apache?
Homosapien
 
Posts: 4
Joined: 07. February 2012 11:43
XAMPP Version: 1.8.3-2
Operating System: Windows XP Pro SP2 x64

Re: Slow upload speeds from apache under windows only

Postby Homosapien » 04. July 2012 20:53

Just an update on my problem:

I recently switched the physical computer that my home server runs from.
This also meant a new operating system. Windows XP Professional SP2 x64 EN instead of Windows XP Home SP3 x86 DA.

I decided to try the registry settings again, thinking the DWORDs only work on an English Windows, and I was positively surprised to see that my upload speed from Apache shot up to 100% of my upload bandwidth, testing from Denmark to the UK.
Brilliant!
Homosapien
 
Posts: 4
Joined: 07. February 2012 11:43
XAMPP Version: 1.8.3-2
Operating System: Windows XP Pro SP2 x64

Re: Slow upload speeds from apache under windows only

Postby Altrea » 04. July 2012 21:09

That are good news.
Thanks for your update :)
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6544
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: Slow upload speeds from apache under windows only

Postby Feyisayo » 06. November 2012 16:58

This response fixed the issue for me http://community.apachefriends.org/f/viewtopic.php?f=16&t=50625&p=194829&hilit=slow+mysql#p194983

Basically, it was Microsoft Security Essentials that caused it and an exclusion had to be made.

Feyisayo
Feyisayo
 
Posts: 2
Joined: 06. November 2012 16:52
XAMPP Version: 5.5.19
Operating System: Linux


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 44 guests