Re: Tomcat 6 - slow response times outside of data center

2010-03-29 Thread Ian Hubbard
Hi Chuck,

Thank you very much for chiming in!  (Your contributions over the years,
along with the other regulars, are the backbone of the list!).

Tracert/ping/pathping all give the impression of a well performing network,
with response times < 1ms being typical between the various nodes.

Looking at how things have been done in this case, the only context.xml is
in tomcat/conf -- when taking out commented out sections, context.xml is
basically empty.  Similarly in this case, I find conf/catalina/* to be an
empty hierarchy of folders.  The docBases they've specified are intended to
be home to (uploadable) static content -- a task I seem to recall being
better performed outside of tomcat, although it's been a while since I've
traveled that path.  For the tests I've mentioned, there shouldn't be

I admit I haven't had much time at all to dig into Tomcat's best practices
in order to be able to make appropriate recommendations -- although I'm a
generalist, I find that the bulk of my time is spent assessing problematic
db configurations and making recommendations.  I'll try to find extra time
to dig into Tomcat via the online docs, wiki, and the O'Reilly book I picked
up ages ago (mistakenly thinking I'd have time to read it ;).  Aside from
those, are there any key resources in particular you'd recommend, in order
to hit the ground running in the shortest time possible?

In the mean-time, I appreciate any help that's offered...(and have to ask:
do you hire yourself out as a consultant, or can you recommend anyone who
does?)



On Mon, Mar 29, 2010 at 11:11 AM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: Ian Hubbard [mailto:sum.of.pri...@gmail.com]
> > Subject: Re: Tomcat 6 - slow response times outside of data center
> >
> > To try to cut down on the number of variables, on the client machine
> > I've tested both with and without hosts file entries.
>
> Have you tried a simple tracert to and from each machine to see how the
> network responds?
>
> >  > caseSensitive="false">
> > 
> >  > docBase="\\servername\data\iimage"
> > reloadable="false" caseSensitive="false">
> > 
> >  > docBase="\\servername\data\audio"
> > reloadable="false" caseSensitive="false">
> > 
> >  > docBase="\\servername\data\custom"
> > reloadable="true" caseSensitive="false">
> > 
>
> The above is really, really bad practice.  Having  elements in
> server.xml is strongly discouraged; they should be in either each webapp's
> META-INF/context.xml file, or in conf/Catalina/[host]/[appName].xml when the
> webapp is located outside of the 's appBase directory.  Also, using a
> remote docBase may well be contributing to the sluggishness - best to keep a
> copy of the webapp on the server that's running it.  Windows networking
> produces some really behavior on occasion.
>
> >  > reloadable="false"
> > caseSensitive="false">
> > 
>
> That one got you double-deployment; again, don't put  elements in
> server.xml.
>
> >  > docBase="@datastore.path.root_train...@\iimage" reloadable="false"
> > caseSensitive="false">
> > 
> >  > docBase="@datastore.path.root_train...@\audio" reloadable="false"
> > caseSensitive="false">
> > 
> >  > docBase="@datastore.path.root_train...@\custom" reloadable="true"
> > caseSensitive="false">
> > 
>
> I have no idea what the above docBase references do...
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
>  -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


RE: Tomcat 6 - slow response times outside of data center

2010-03-29 Thread Caldarale, Charles R
> From: Ian Hubbard [mailto:sum.of.pri...@gmail.com]
> Subject: Re: Tomcat 6 - slow response times outside of data center
> 
> To try to cut down on the number of variables, on the client machine
> I've tested both with and without hosts file entries.

Have you tried a simple tracert to and from each machine to see how the network 
responds?

>  caseSensitive="false">
> 
>  docBase="\\servername\data\iimage"
> reloadable="false" caseSensitive="false">
> 
>  docBase="\\servername\data\audio"
> reloadable="false" caseSensitive="false">
> 
>  docBase="\\servername\data\custom"
> reloadable="true" caseSensitive="false">
> 

The above is really, really bad practice.  Having  elements in 
server.xml is strongly discouraged; they should be in either each webapp's 
META-INF/context.xml file, or in conf/Catalina/[host]/[appName].xml when the 
webapp is located outside of the 's appBase directory.  Also, using a 
remote docBase may well be contributing to the sluggishness - best to keep a 
copy of the webapp on the server that's running it.  Windows networking 
produces some really behavior on occasion.

>  reloadable="false"
> caseSensitive="false">
> 

That one got you double-deployment; again, don't put  elements in 
server.xml.

>  docBase="@datastore.path.root_train...@\iimage" reloadable="false"
> caseSensitive="false">
> 
>  docBase="@datastore.path.root_train...@\audio" reloadable="false"
> caseSensitive="false">
> 
>  docBase="@datastore.path.root_train...@\custom" reloadable="true"
> caseSensitive="false">
> 

I have no idea what the above docBase references do...

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 6 - slow response times outside of data center

2010-03-29 Thread Ian Hubbard
Hi Andre,

Thanks for your response.

My initial tests to localhost and then IP:port were in an attempt to
eliminate (or at least reduce the chance) of DNS lookups being a factor -- a
few years ago that beast had reared its head in relation to SSL, certificate
chains, and other fun stuff.  In this case SSL isn't entering into the
equation, but those lookups hadn't been forgotten, which is what brought me
to ask whether there's anything that could drive that sort of action in
Tomcat's default config that I might be able to disable.

To try to cut down on the number of variables, on the client machine I've
tested both with and without hosts file entries.

This morning I'm seeing slightly different behaviour, both with and without
hosts file entries:
- the same test previously mentioned with one of the servers typically
taking 17 seconds now either takes 12+/-1 second (like another of the
servers tested) or 42+/-1 second, without any middle ground...again, tomcat
and the db server don't break a sweat -- they have plenty of resources free
in the way of cpu/ram/throughput capacity

For the parts of the equation I'm aware of, if server-side lookups were a
factor wouldn't some form of significant delay be apparent when hitting
tomcat from another machine within the same vlan?  (Wouldn't it be normal
(in a typical case) for what's happening between tomcat and the db server to
remain the same, regardless of where the client tomcat's serving
resides?...That being said, Tomcat itself could be doing something related
to the client, or the client could be doing something in relation to the
server...client-side, I'd hoped that a host file entry would cover that
base...as far as Tomcat, though -- that's what I'm hoping to figure out ;)

In case something jumps out at you, here's what I find in server.xml,
slightly sanitized...please ask if there's anywhere else you'd like to look,
and thanks again for helping:



  
  
  
  
  

  
  



  
































On Mon, Mar 29, 2010 at 9:54 AM, André Warnier  wrote:


> Hi.
>
> Just a very preliminary guess : could it be that different DNS lookups are
> involved in the delays ? Obviously, "localhost" and IP addresses don't need
> them, but maybe some of the connections between Tomcat(s) and database
> server(s) are specified by name instead of IP, and/or use different DNS
> servers, or in a different order ?
>
>
> Ian Hubbard wrote:
>
>
>> Hi all,
>>
>> I've got Tomcat 6 running on a few separate internal dedicated test
>> machines in a data center, each with their own separate dedicated SQL
>> servers.
>>
>> The servers themselves don't bat an eye for the tiny load i'm subjecting
>> them to.  For testing (using IE 6 or 7) I've been performing the same
>> action, loading a simple page that uses simple queries (packet captures
>> indicate that total data transferred is in the 200KB range, start to
>> finish), with the following results:
>> - on the webservers themselves, going to localhost:8754, pages take less
>> than 1 second, all told
>> - from another server in the same subnet, to tomcat via IP address to
>> 8754,
>> 1-2 seconds...so far, what's generally seen as normal in other
>> environments
>> - from a system outside the data center (but still internal, using VPN
>> over
>> dual T1's), again by IP, pages will load in ~17 seconds consistently using
>> two of the servers in separate subnets, and 12 seconds consistently from a
>> third (each server stands alone in its respective environment, hiding in
>> its own little VLAN)
>>
>> The servers are configured similarly, as are the networks they live in.
>>  For
>> a similar setup to other data centers more geographically distant, I can
>> usually expect to see loading times of 3-5 seconds, as opposed to the
>> 12/17
>> seconds being seen in these cases.  If they were _all_ consistently 17
>> seconds, I'd be more inclined to point my finger firmly at the
>> network...that one server that's equivalent for all intents and purposes
>> completes the same task in 12, though, is a little strange.
>>
>> The network config side of things is beyond my direct control.  There are
>> likely things there that can be fine-tuned by request, if I can figure out
>> what recommendation to make, and have evidence to support the
>> recommendation.
>>
>> At this point, I'm particularly interested in whether there's anything
>> within my control to improve things.  The tomcat conf settings are fairly
>> vanilla -- are there any common things I should look at disabling or
>> changing which may improve things?  (Such as settings that could result in
>> lookups  and

Re: Tomcat 6 - slow response times outside of data center

2010-03-29 Thread André Warnier

Hi.

Just a very preliminary guess : could it be that different DNS lookups 
are involved in the delays ? Obviously, "localhost" and IP addresses 
don't need them, but maybe some of the connections between Tomcat(s) and 
database server(s) are specified by name instead of IP, and/or use 
different DNS servers, or in a different order ?



Ian Hubbard wrote:

Hi all,

I've got Tomcat 6 running on a few separate internal dedicated test
machines in a data center, each with their own separate dedicated SQL
servers.

The servers themselves don't bat an eye for the tiny load i'm subjecting
them to.  For testing (using IE 6 or 7) I've been performing the same
action, loading a simple page that uses simple queries (packet captures
indicate that total data transferred is in the 200KB range, start to
finish), with the following results:
- on the webservers themselves, going to localhost:8754, pages take less
than 1 second, all told
- from another server in the same subnet, to tomcat via IP address to 8754,
1-2 seconds...so far, what's generally seen as normal in other environments
- from a system outside the data center (but still internal, using VPN over
dual T1's), again by IP, pages will load in ~17 seconds consistently using
two of the servers in separate subnets, and 12 seconds consistently from a
third (each server stands alone in its respective environment, hiding in
its own little VLAN)

The servers are configured similarly, as are the networks they live in.  For
a similar setup to other data centers more geographically distant, I can
usually expect to see loading times of 3-5 seconds, as opposed to the 12/17
seconds being seen in these cases.  If they were _all_ consistently 17
seconds, I'd be more inclined to point my finger firmly at the
network...that one server that's equivalent for all intents and purposes
completes the same task in 12, though, is a little strange.

The network config side of things is beyond my direct control.  There are
likely things there that can be fine-tuned by request, if I can figure out
what recommendation to make, and have evidence to support the
recommendation.

At this point, I'm particularly interested in whether there's anything
within my control to improve things.  The tomcat conf settings are fairly
vanilla -- are there any common things I should look at disabling or
changing which may improve things?  (Such as settings that could result in
lookups  and so on, which could slow things down notably even if they aren't
immediately apparent, given that the servers aren't under any notable load,
and so on.)

I'll happily post settings that may be of interest...I haven't done so just
yet, since I don't want to inundate you with irrelevant info.

Thank you for taking the time to throw any ideas you may have my way!

Cheers,
Ian




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat 6 - slow response times outside of data center

2010-03-29 Thread Ian Hubbard
Hi all,

I've got Tomcat 6 running on a few separate internal dedicated test
machines in a data center, each with their own separate dedicated SQL
servers.

The servers themselves don't bat an eye for the tiny load i'm subjecting
them to.  For testing (using IE 6 or 7) I've been performing the same
action, loading a simple page that uses simple queries (packet captures
indicate that total data transferred is in the 200KB range, start to
finish), with the following results:
- on the webservers themselves, going to localhost:8754, pages take less
than 1 second, all told
- from another server in the same subnet, to tomcat via IP address to 8754,
1-2 seconds...so far, what's generally seen as normal in other environments
- from a system outside the data center (but still internal, using VPN over
dual T1's), again by IP, pages will load in ~17 seconds consistently using
two of the servers in separate subnets, and 12 seconds consistently from a
third (each server stands alone in its respective environment, hiding in
its own little VLAN)

The servers are configured similarly, as are the networks they live in.  For
a similar setup to other data centers more geographically distant, I can
usually expect to see loading times of 3-5 seconds, as opposed to the 12/17
seconds being seen in these cases.  If they were _all_ consistently 17
seconds, I'd be more inclined to point my finger firmly at the
network...that one server that's equivalent for all intents and purposes
completes the same task in 12, though, is a little strange.

The network config side of things is beyond my direct control.  There are
likely things there that can be fine-tuned by request, if I can figure out
what recommendation to make, and have evidence to support the
recommendation.

At this point, I'm particularly interested in whether there's anything
within my control to improve things.  The tomcat conf settings are fairly
vanilla -- are there any common things I should look at disabling or
changing which may improve things?  (Such as settings that could result in
lookups  and so on, which could slow things down notably even if they aren't
immediately apparent, given that the servers aren't under any notable load,
and so on.)

I'll happily post settings that may be of interest...I haven't done so just
yet, since I don't want to inundate you with irrelevant info.

Thank you for taking the time to throw any ideas you may have my way!

Cheers,
Ian