473,396 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

an intriguing wifi http server mystery...please help

Hi,
I hope this post is ok for this group.

Here's my deal:

I have two computers on my LAN at home.
One desktop. One laptop.
Both computers are wireless enabled (and wired enabled too).

I have running a fairly simple HTTP server (written in python) that i
can run on either computer.
When the computers are wired, everything is cool, no matter which
computer is the server.
But when the computers are wireless, it does matter which computer is
the server.
If the laptop is the server, the server is super slow at serving pages.
If the desktop is the server, then everything's fine (i.e. fast).

Here are the conditions i tested the server under.

1)
Laptop wired, client
Desktop wired, server
GREAT!
webpage served in 2 seconds

2)
Laptop wired, server
Deskop wired, client
GREAT!
webpage served in 2 seconds

3)
Laptop wireless, client
Desktop wireless, server
GREAT!
webpage served in 2 seconds

4)
Laptop wireless, server
Desktop wireless, client
CRAP!
webpage served in 90 seconds
What the heck is happening?
What could be causing the slowdown in only one direction?
Specifically, why is the server so slow when the laptop is wireless,
but not when the desktop is wireless?
And computer speed cannot matter here, right, since, in the wired
conditions, both computers performed equally.
The server is almost entirely based on the server found at:
http://aspn.activestate.com/ASPN/Coo.../Recipe/259148

If anyone has a clue, please tell.
Thanks,
jojoba

Nov 30 '05 #1
14 2745
jo****@gmail.com wrote:
1)
Laptop wired, client
Desktop wired, server
GREAT!
webpage served in 2 seconds

2)
Laptop wired, server
Deskop wired, client
GREAT!
webpage served in 2 seconds

3)
Laptop wireless, client
Desktop wireless, server
GREAT!
webpage served in 2 seconds

4)
Laptop wireless, server
Desktop wireless, client
CRAP!
webpage served in 90 seconds
What the heck is happening?


Please post your routing tables and, if you are referencing your server machine
by name, your name server addresses (/etc/resolv.conf on Linux).
--
Paul McNett
http://paulmcnett.com
http://dabodev.com

Nov 30 '05 #2
Paul McNett wrote:
jo****@gmail.com wrote:

1)
Laptop wired, client
Desktop wired, server
GREAT!
webpage served in 2 seconds

2)
Laptop wired, server
Deskop wired, client
GREAT!
webpage served in 2 seconds

3)
Laptop wireless, client
Desktop wireless, server
GREAT!
webpage served in 2 seconds

4)
Laptop wireless, server
Desktop wireless, client
CRAP!
webpage served in 90 seconds
What the heck is happening?


Please post your routing tables and, if you are referencing your server machine
by name, your name server addresses (/etc/resolv.conf on Linux).

i'm inclined to agree, your client and server might be taking totally
different routes to get to each other and hence the 90ms
Nov 30 '05 #3
Hi again,

Please excuse any ignorance here.
I would love to show you what you are asking for, but I am not sure
what you are asking for (newbie here).

All these connections (i.e. client-server connections) are within my
local area network.

I have a simple linksys 802.11b router.
My server is set to say, "192.168.1.100", port 9999,
and my client is set to say, "192.168.1.101"

I load up the server, then go to the client computer webbrowser and
enter "http://192.168.1.100:9999"

You guys probably already know this, so let me know if i need to be
more specific.
Thanks again for the rapid response!
jojoba

Nov 30 '05 #4
jo****@gmail.com wrote:
Please excuse any ignorance here.
I would love to show you what you are asking for, but I am not sure
what you are asking for (newbie here).

All these connections (i.e. client-server connections) are within my
local area network.

I have a simple linksys 802.11b router.
My server is set to say, "192.168.1.100", port 9999,
and my client is set to say, "192.168.1.101"

I load up the server, then go to the client computer webbrowser and
enter "http://192.168.1.100:9999"


If you are on Windows, please open a command window (Start|Run and then type
'cmd') and type:

route print

On Linux or Mac, the command would simply be:

route
Do this on both computers, and post the output here. If you are using ip
addresses only in your URL's the problem isn't with DNS or name lookup so let's
eliminate a routing problem next.

--
Paul McNett
http://paulmcnett.com
http://dabodev.com

Nov 30 '05 #5
Hello again!
Heres the CLIENT info you requested:

================================================== =========================
Interface List
0x1 ........................... MS TCP Loopback interface
0x20002 ...00 09 5b 41 0c b7 ...... NETGEAR MA311 PCI Adapter - Packet
Scheduler
Miniport
================================================== =========================
================================================== =========================
Active Routes:
Network Destination Netmask Gateway Interface
Metric
0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.107
30
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1
1
192.168.0.0 255.255.255.0 192.168.0.107 192.168.0.107
30
192.168.0.107 255.255.255.255 127.0.0.1 127.0.0.1
30
192.168.0.255 255.255.255.255 192.168.0.107 192.168.0.107
30
224.0.0.0 240.0.0.0 192.168.0.107 192.168.0.107
30
255.255.255.255 255.255.255.255 192.168.0.107 192.168.0.107
1
Default Gateway: 192.168.0.1
================================================== =========================
Persistent Routes:
None

Here's the SERVER info you requested:

================================================== =========================
Interface List
0x1 ........................... MS TCP Loopback interface
0x40003 ...00 d0 59 49 2e 2c ...... LAN-Express IEEE 802.11 PCI Adapter
================================================== =========================
================================================== =========================
Active Routes:
Network Destination Netmask Gateway Interface
Metric
0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.105
30
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1
1
192.168.0.0 255.255.255.0 192.168.0.105 192.168.0.105
30
192.168.0.105 255.255.255.255 127.0.0.1 127.0.0.1
30
192.168.0.255 255.255.255.255 192.168.0.105 192.168.0.105
30
224.0.0.0 240.0.0.0 192.168.0.105 192.168.0.105
30
255.255.255.255 255.255.255.255 192.168.0.105 192.168.0.105
1
Default Gateway: 192.168.0.1
================================================== =========================
Persistent Routes:
None

(hope the text-formatting doesn't make it too unreadable!)
Note: this is for the condition that is SLOW.
Hope this helps
Thanks again,
jojoba

Nov 30 '05 #6
> The server is almost entirely based on the server found at:
http://aspn.activestate.com/ASPN/Coo.../Recipe/259148


Try using a different python based webserver. This recipe might have
some problems that cause the weird behavior.

(The Karigell webframework uses a server based on this recipe. In their
changlog for the latest release they say: "It fixes 2 bugs, one in the
asynchronous HTTP server which would use 100% of the CPU")

Istvan.

Nov 30 '05 #7

Thanks Istvan,

But if it's a problem with the software, why does the server work
great when wired (i.e. not wireless)...that's the weird part.

Thanks again,
jojoba

Nov 30 '05 #8
> But if it's a problem with the software, why does the server work
great when wired (i.e. not wireless)...that's the weird part.


Don't be so quick to eliminate software error ... when it comes to
bugs there are few rules. You are using a recipe that is *known* to
produce weird behavior. Make sure to eliminate that source before
moving to more esoteric reasons such as bad routing table. For example
run some other simple webservers that were written in some other
language and see if you get the same behavior (tinyhttpd or its ilk) .

Istvan.

Dec 1 '05 #9
Hi again Istvan,

Good suggestion.
I have tried another server and it works flawlessly, regardless of the
computers being wireless or wired. Excellent.
However, i am still intrigued as to why the server is fast when both
computers are wireless and the desktop is the server (while the laptop
is the client), but slow when both computers are wireless and the
desktop is the client (while the laptop is the server).
I guess i am just curious as to what possible thing (most likely in
software, as we have discovered) could cause this assymetry.

Thanks for any ideas,
jojoba

Dec 1 '05 #10
jo****@gmail.com wrote:
Hi again Istvan,

Good suggestion.
I have tried another server and it works flawlessly, regardless of the
computers being wireless or wired. Excellent.
However, i am still intrigued as to why the server is fast when both
computers are wireless and the desktop is the server (while the laptop
is the client), but slow when both computers are wireless and the
desktop is the client (while the laptop is the server).
I guess i am just curious as to what possible thing (most likely in
software, as we have discovered) could cause this assymetry.

Thanks for any ideas,
jojoba

Just a guess: could it be that your server is doing reverse-dns lookups?
(i.e. it does socket.gethostbyaddr to get names by ip addresses,
perhaps for logging or whatnot)
This call is expensive. Sometimes this call takes ages to complete,
if you have a broken DNS config.
--Irmen
Dec 1 '05 #11

Just a guess: could it be that your server is doing reverse-dns lookups?
(i.e. it does socket.gethostbyaddr to get names by ip addresses,
perhaps for logging or whatnot)
This call is expensive. Sometimes this call takes ages to complete,
if you have a broken DNS config.

Interesting...
But how do we explain that the server is fast on one computer and slow
on another (when both are wireless)? This is my main mystery.
But perhaps i don't completely understand your point.
Could the above server-speed assymetry that i spoke of above be caused
by this reverse dns lookup?

Thanks for all the suggestions,
jojoba

Dec 1 '05 #12
joj...@gmail.com wrote:
Could the above server-speed assymetry that i spoke of above be caused
by this reverse dns lookup?


I think so. You stated that you use "a fairly simple HTTP server",
although that's not exactly specific enough to diagnose the problem,
but if that were the standard library's BaseHTTPServer then reverse DNS
lookups could well be an issue: that particular server attempts to log
addresses, and in the address_string method there's a call to
socket.getfqdn which could invoke such reverse lookups.

Paul

Dec 2 '05 #13
Hello again everyone,

First, I want to thank all those who have contributed to the
unravelling of this server-slow-down mystery.
But unfortunately, either:

1) i have not made my point clear about what my question is
2) i do not understand the responses given

So, let me briefly reiterate what the mystery is.
(i am assuming that readers have read most of my first post above).
I have two computers and a server program (written in python).
Both computers are on my home lan (using a linksys wifi router).
HERE IS THE MYSTERY:
The server runs fast when one computer is the server, but slow when the
other computer is the server.
How can this be, given that this asymmetry does not exist when both
computers are wired.

Please let me know if you need any more information,
Thanks again to all who have been helping with this,
jojoba

Dec 2 '05 #14
joj...@gmail.com wrote:
The server runs fast when one computer is the server, but slow when the
other computer is the server.
How can this be, given that this asymmetry does not exist when both
computers are wired.


Probably because the way your wireless interfaces are configured may be
different from the way your wired interfaces are configured. Network
problems are hard enough to solve "on site" with full access to all the
necessary information - doing so with substantially less information in
a newsgroup thread is substantially more difficult.

With regard to my point about the "fairly simple HTTP server" that you
are using, if you choose to run whichever server such that you can see
it writing its log - for BaseHTTPServer this is easy since it just
writes its log to the terminal/console - then you might be able to see
where the delay occurs by putting logging statements in your program at
the start and end of its work. If your program seems to write its
finishing logging message and yet a long delay occurs before the server
writes something about where the request came from (and the browser
gets to see the output of your program), then you may well have a
problem with the way the server prepares its logging messages as I
described in my last message.

Paul

Dec 2 '05 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Shahzad | last post by:
Hello I m geting The Following Error Message please I m able to execute the HTML PAGES but not able to run ASP pages... I have win2k server , ADS , IIS5.0 , framework 1.1 on my PC. Help...
0
by: Wayfarer | last post by:
I loaded my Visual Studio, which includes SQL Server version 7.0. I did not encounter any error messages in the installation. It created two DSN entries: LocalServer & MQIS Unfortunately...
3
by: Andy Grayson | last post by:
Hi, I am not sure this is the right group to ask as I think the problem is Linux related but I have had no joy from Linux groups I am new to both Linux and Programming, I am learning as I go but...
1
by: kvrdev1 | last post by:
I have a view that is joining multiple tables. How do I modify this view so that it also returns when the value is "NULL" for some of the join table fields??? Any help would be greatly...
5
by: W.Sh | last post by:
Hello Everyone! I'm having some issues with javascript that I can't seem to resolve... Basically, I have a very simple code that's supposed to change the innerHTML of a span element whenever I...
1
by: momo | last post by:
Hello Guys, I am getting this error " Control 'oGrid__ctl14__ctl1' of type 'DataGridLinkButton' must be placed inside a form tag with runat=server." Here is my code and I don't know where...
2
by: archana | last post by:
Hi all, I want to send webrquest throguh anonymous proxy. Can anyone tell me how to validate ip address and port number of anonynmous proxy server. Is it using TctpClient class ? And...
7
by: chickendavis | last post by:
Hi folks, I have what seems like a fairly straight forward question which im sure has a simple answer as well..but i can't seem to find it. I'm using the Microsoft .NET WSE2 library in order to...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.