Application is slow when connected through LAN, fast via dial up - why?

G

Gad krosner

Hi There!

I have something weird. It's an application running under Webstart
(client), connected to a (Win2K) server running (among other things)
Apache Tomcat. When a computer is connected through the LAN, it takes
about 15 seconds after pushing an application button, until the screen
takes an action (except for the hourglass, which comes right away).
During this wait period, the server's CPU doesn't show any impact,
except for a second or two, towards the end of the wait period, when
it goes from about 15% to 40%

When the client computer is disconnected from the LAN and makes a
dial-up connection, the application takes between 2 to 5 seconds to
act upon a user's keystroke. This has been experienced with a variety
of (client) computers.

The weirdest of all is perhaps, when the application is tun for the
first time, and all the JAR files get copied over, it takes a few
seconds for the download over LAN, and about 20 minutes of dial-up,
what one would expect.

Can anyone offer any clues, or what to look into?

Thanks in advance,

G.
 
C

Chris Uppal

Gad said:
Can anyone offer any clues, or what to look into?

My first step would be to use a network sniffer/analyser such as ethereal
(free at www.ethereal.com).

Also, in the slow LAN case it's not clear if you mean that the client and
server are on the same LAN, or if the client is still talking over the net
proper but routing via the LAN. If it's the later case then maybe there's
something happening on the firewall.

If they are on the same LAN, then what's the server doing ? Is it perhaps
trying (and failing after a time-out) to get some info about the client, such
as a attempting a reverse DNS lookup ?

-- chris
 
G

Gad krosner

Thanks, Chris. We did further investigation. A sniffer showed there
were lost/sliced packets coming out of the server. We replaced the
network card on the server, to no avail. We then hooked up a laptop
straight to the server (using crossover cable), but the client on the
PC was still slow. (We concluded that the network isn't the problem.)
By the way, when using dial-up, the modem isn't on the server. It is
still using portions of the network for connecting the client with the
server, yet the application works siginifcantly faster that way.

Is it possible that some weird setting on the Apache Tomcat will
create this behavior?
 
C

Chris Uppal

Gad said:
We then hooked up a laptop
straight to the server (using crossover cable), but the client on the
PC was still slow. (We concluded that the network isn't the problem.)

Looks like you have a lot of digging to do...

Am I right that you can have *just* the server and the client directly
connected together (via your crossover cable) and that the system all works,
but is strangely slow ? And that while "nothing is happening" neither machine
is using any significant CPU ? And that you can reproduce it on different
client machines ? Oh, and just to be sure, that other software *can* talk OK
between that pair of machines ?

If so then it sounds as if it almost *must* be that either the server is
waiting for something from the client, or the client is waiting for something
from the server. If you use the sniffer on both machines (or on the LAN
connecting them) then you should be able to see which is waiting for which.

If you are lucky then it'll show up that (say) the last thing on the network
was a request sent off from the server, not necessarily to the client, for
which it never gets a reply. If so then the chances are that the server is
waiting for that request to time-out before going on to finish serving the
client. An example I mentioned before would be that it is trying to validate
the client by doing a reverse DNS lookup (or maybe it only needs it for
logging).

On the face of it, I'd expect something like the above to be what's happening;
just because there aren't that many other ways of getting a modern computer
just to sit there for seconds at a time without using any CPU. But it may be
something stranger. There is no limit really to what *could* be happening --
e.g. (as a rather silly example) a servlet that does a 10 second pause when it
sees a specific client IP connection (perhaps somebody added it as debugging
code, and forgot to remove it).
Is it possible that some weird setting on the Apache Tomcat will
create this behavior?

That's always possible, I suppose. I don't know of any such settings myself
(but then I don't know A/T well). I find it hard to imagine anything that it
was doing for so long that *didn't* show up as network activity, though.

-- chris
 
G

Gordon Beaton

When a computer is connected through the LAN, it takes about 15
seconds after pushing an application button, until the screen takes
an action (except for the hourglass, which comes right away). During
this wait period, the server's CPU doesn't show any impact, except
for a second or two, towards the end of the wait period, when it
goes from about 15% to 40%

This sounds like a DNS timeout to me. It could be that the server does
a reverse lookup to identify the client before proceeding. Check your
DNS settings for the non-dialup case.

But this is only a guess. Follow the advice you already got from Chris
and use a network sniffer to see what's really going on.

/gordon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top