Author |
|
pdh0710
Joined: 01 Mar 2012 Posts: 9 Location: South Korea, Seoul
|
Posted: Thu 01 Mar '12 3:41 Post subject: Upgraded 2.2.22 -> 2.4.1, transfer rate reduced |
|
|
Hi...
(Please excuse my English)
I'm running an Apache server on a winXP-sp3 machine for my office intranet(not for Internet).
Recently, I upgraded Apache server 2.2.22 to 2.4.1. (all Apache Lounge-win32-VC9 versions)
However, the new Apache 2.4.1 server slowed down.
File transfer rate reduced 50~100Mbps(2.2.22) -> 10~16Mbps(2.4.1) approximately.
But I can't find the reason.
When I recovered the server 2.4.1 -> 2.2.22, file transfer rate recovered, too.
I'm using modules minimally, and httpd.conf changed very little on upgrading 2.4.1.
What would make this problem? |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Thu 01 Mar '12 11:38 Post subject: |
|
|
Little changes can have great impact ?
Any in the error.log ?
How do you measure the tranfer rate and does it happen all the time or random ?
Always good try in httpd.conf:
AcceptFilter http none
EnableSendfile Off
EnableMMAP off
Btw. this Accepfilter has for SSL issue for some users, with http it is ok.
Steffen |
|
Back to top |
|
pdh0710
Joined: 01 Mar 2012 Posts: 9 Location: South Korea, Seoul
|
Posted: Thu 01 Mar '12 22:40 Post subject: |
|
|
Nothing particular in the error.log.
Code: | AcceptFilter http none
EnableSendfile Off
EnableMMAP off
|
I used above configurations since apache 2.2.
Below is the main part of my httpd.conf.
Code: | ServerRoot "c:/Apache2"
AddDefaultCharset Off
TraceEnable off
MaxConnectionsPerChild 0
#ThreadsPerChild 96
AcceptFilter http none
EnableSendfile off
EnableMMAP off
LoadModule alias_module modules/mod_alias.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule fcgid_module modules/mod_fcgid.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule lua_module modules/mod_lua.so
LoadModule mime_module modules/mod_mime.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
|
Thanks Steffen. |
|
Back to top |
|
pdh0710
Joined: 01 Mar 2012 Posts: 9 Location: South Korea, Seoul
|
Posted: Thu 01 Mar '12 23:29 Post subject: |
|
|
I tested something more.
Using : wget.exe (windows porting of unix 'wget')
Test downloading 2 files : t.mp4(45MBytes), e.rar(38MB)
Repeat : each 3 times
On three versions of apache 2.4.1 : apache-lounge-win32-vc9, apache-lounge-win32-vc10, apache-haus-x86
Total : 3 * 3 = 9 times.
* Results
- couldn't find significant difference between three versions of apaceh 2.4.1
- download rates varied widely, 1.2MBytes/s ~ 4.5MB/s (caution : unit is not bits/s)
- download rate even varied widely during downloading single file.
- most time (not every time), download rates of e.rar were higher than t.mp4. (approximately 0.5MB/s on average)
* For comparison : do same test on apache 2.2.22 (apache-lounge-win32-vc9)
- average download rate is 10.5MB/s
- download rates varied small, stable.
I can't find reason |
|
Back to top |
|
admin Site Admin
Joined: 15 Oct 2005 Posts: 692
|
Posted: Fri 02 Mar '12 11:28 Post subject: |
|
|
Thanks for testing it.
No other reports seen. When someone else has also this experience, please let us know.
Looks hard to isolate your problem, can be you configuration or indeed 2.4.1.
What you can try:
AcceptFilter http data
and
AcceptFilter http connect
Also try:
ThreadsPerChild 250
MaxConnectionsPerChild 0
That are area's where are changes.
Steffen |
|
Back to top |
|
pdh0710
Joined: 01 Mar 2012 Posts: 9 Location: South Korea, Seoul
|
Posted: Sat 03 Mar '12 0:05 Post subject: |
|
|
Good News : I found the reason
Bad News : Still not solved
My office intra-net is connected Internet through a router.
(apache server is for intra-net mainly, but sometimes for Internet access)
The router is small and normal home NAT router.
The serverPC, myPC and other PCs share a Internet line through the router.
-----Internet-----router(domain name : test.com)-----serverPC, myPC and other PCs
My office has a domain name(for example "test.com").
The port-forward technique is applied to the router,
so the router can pass http requests(for example : http://test.com/t.mp4) to the serverPC.
The serverPC's IP address is 192.168.0.2.
If I make http request http://test.com/t.mp4 at myPC (this means connection between myPC and serverPC made via the router), above problem occurred.
But when I make http request http://192.168.0.2/t.mp4 (direct connect), high transfer rate.
So something is wrong the home NAT router and apache 2.4.1. A kind of compatibility problem?
Is there any suggestion to improve compatibility with home NAT router?
* There's still other problems. When I make the request http://192.168.0.2/t.mp4 (direct connect) :
- the transfer rate of apache 2.2.22 is 31MBytes/s on average. (connect via the router = 10MB/s, as I wrote in the above posting)
- apache 2.4.1 : 10~20MB/s. still lesser than apache 2.2.22 and vary widely.
- "AcceptFilter http data" and "AcceptFilter http connect" have some effects on apache 2.4.1, make transfer rate 2~3 times.
But, not regularly, sometimes effects, sometimes not, and even no effect on apache 2.2.22.
"AcceptFilter http connect" have the effects on apache 2.4.1 VC9 version.
"AcceptFilter http data" have the effects on VC10 version. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Sat 03 Mar '12 12:57 Post subject: |
|
|
pdh0710 wrote: |
The serverPC's IP address is 192.168.0.2.
If I make http request http://test.com/t.mp4 at myPC (this means connection between myPC and serverPC made via the router), above problem occurred.
But when I make http request http://192.168.0.2/t.mp4 (direct connect), high transfer rate.
So something is wrong the home NAT router and apache 2.4.1. A kind of compatibility problem?
Is there any suggestion to improve compatibility with home NAT router?
|
One reason can be DNS resolution. Some times there is the phenomenon with domain names that the client / browser on the PC asks the default gateway in your case the router I guess where to find that domain. And the traffic runs over / through the router. routers often have 100 MBit LAN or less. With the IP you connect the Server directly that is why it is faster. I also had the phenomenon that the traffic with a domain name "left" the router and came back into the internal network which slowed it very much down. I figured that out cause I saw my external IP in the server logs.
So solve this you could say to your DNS server if you have one, that the test.com is in your network or modify the hosts file on each PC or you can modify the entry in the DNS server in your router.
I don't know if that helps you, but for me it was a solution that days. |
|
Back to top |
|
pdh0710
Joined: 01 Mar 2012 Posts: 9 Location: South Korea, Seoul
|
Posted: Sat 03 Mar '12 18:49 Post subject: |
|
|
Sorry, I missed about DNS test in above posting.
I also thought the reason may be DNS resolution.
So I tested http://166.77.88.99/t.mp4, if test.com's real IP address is 166.77.88.99 for example.
The results and problems are same as http://test.com/t.mp4.
So I concluded like above.
Thanks James Blond. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Sat 03 Mar '12 19:52 Post subject: |
|
|
That is not what I meant. The idea is that test.com should resolve in your internal network to 192.168.0.2 |
|
Back to top |
|
pdh0710
Joined: 01 Mar 2012 Posts: 9 Location: South Korea, Seoul
|
Posted: Sat 03 Mar '12 20:43 Post subject: |
|
|
Hmm...
Anyway, 'http://166.77.88.99/t.mp4' and 'http://test.com/t.mp4' made same result and same problem.
(The IP address of 'test.com' is 166.77.88.99, for example)
Thus, it's not DNS resolution problem.
Thanks James Blond. |
|
Back to top |
|
pdh0710
Joined: 01 Mar 2012 Posts: 9 Location: South Korea, Seoul
|
Posted: Sun 04 Mar '12 2:12 Post subject: |
|
|
There is a test linux machine at my office.
The linux machine's OS is Debian Wheezy.
On the linux machine, I compiled and installed Apache 2.4.1, and did the above test.
No problem occurred at all. Hmm...
So the compatibility of Apache 2.4.1 and the home router may not be the reason for above problem. |
|
Back to top |
|