Re: Windows performance issue

2014-07-22 Thread Leo Donahue
On Jul 21, 2014 4:03 AM, Omar Orzenini omar.orzen...@gmail.com wrote:

 Hello everyone, I apologize for my poor english but I'll try to explain.
 I have a strange performance problem only under Windows (via NFS on
 Linux everything
 works fine).
 Tested operating system (Windows Server 2008 R2 64, WIndows Server 2012
R2):

 Second step: share the webapps folder (eg. c:\webapps) and change in the
 server.xml AppBase from webapps to \\servername\webapps.

And now you have a dns query to lookup that server name each time.

Does fully qualified domain name of the server help improve performance?

Leo


RE: Windows performance issue

2014-07-22 Thread Jeffrey Janner
 -Original Message-
 From: Omar Orzenini [mailto:omar.orzen...@gmail.com]
 Sent: Monday, July 21, 2014 6:42 AM
 To: Tomcat Users List
 Subject: Re: Windows performance issue
 
 Thank you all for the answers. I performed these tests because we are
 showing serious performance problems on WIndows configurations for load
 balancing (a file server shares the webapps folder via SMB for two
 different application
 servers that map the webapps via UNC. Tried both mapping the folder via
 UNC
 and as logical drive but i did not get great results.
 
 
With that stated use case, it would be far safer to rethink your deployment 
scenario.
With multiple Tomcats sharing the webapps directory, you run the risk of 
problems occurring because each Tomcat will want to explode the war files into 
a sub-tree structure, potentially causing problems for a server that is already 
running. I am sure there are more knowledgeable folks here that can address 
that scenario.  You could, of course, turn off the explode warfiles setting and 
that would reduce that issue, but running from warfiles has its own performance 
hit.
Might I suggest pointing webapps to an empty directory and using the docbase 
parameter of the Context to point to the shared directory structure with 
pre-exploded war file sub-trees?
Of course, if the problem is really with SMB bottlenecks, that probably won't 
be that much more helpful.
Q: Why bother with the shared directory issue at all?  How about just copying 
the war file to each server and let them run from their local copies? That 
would result in the best performance.
(note: this is what I do for my customer base and don't find it all that 
burdensome to roll out an upgrade for 100+ customers.)
Jeff


Re: Windows performance issue

2014-07-21 Thread David kerber

On 7/21/2014 5:03 AM, Omar Orzenini wrote:

Hello everyone, I apologize for my poor english but I'll try to explain.
I have a strange performance problem only under Windows (via NFS on
Linux everything
works fine).
Tested operating system (Windows Server 2008 R2 64, WIndows Server 2012 R2):

First step: the webapps folder is in the standard path (eg c: \tomcat
\webapps) everything works fine and with excellent performance.

Second step: share the webapps folder (eg. c:\webapps) and change in the
server.xml AppBase from webapps to \\servername\webapps. In this case,
despite the Tomcat service and the shared folder are on the same
server, the load
performance of applications collapse.

I've done tests also sharing folders to other servers but nothing changes.
On Linux NFS works very smoothly and with excellent performance.
Do you have any suggestions?


The TCP/IP stack on windows has lousy performance reading from a local 
HD compared, to the local drive access.  We used to map a drive letter 
to a local drive, but found that using the subst command gave MUCH 
better performance. That technique is not really applicable to your 
situation, but illustrates that the TCP stack is a big performance hit.





Thanks for everything, Omar




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



Re: Windows performance issue

2014-07-21 Thread Daniel Mikusa
On Mon, Jul 21, 2014 at 5:03 AM, Omar Orzenini omar.orzen...@gmail.com
wrote:

 Hello everyone, I apologize for my poor english but I'll try to explain.
 I have a strange performance problem only under Windows (via NFS on
 Linux everything
 works fine).
 Tested operating system (Windows Server 2008 R2 64, WIndows Server 2012
 R2):

 First step: the webapps folder is in the standard path (eg c: \tomcat
 \webapps) everything works fine and with excellent performance.

 Second step: share the webapps folder (eg. c:\webapps) and change in the
 server.xml AppBase from webapps to \\servername\webapps.


Have you tried referencing it as c:\webapps?  It's on the same machine
right?  So why use the unc style path?


 In this case,
 despite the Tomcat service and the shared folder are on the same
 server, the load
 performance of applications collapse.


Maybe hook up a profiler and see what's happening?


 I've done tests also sharing folders to other servers but nothing changes.
 On Linux NFS works very smoothly and with excellent performance.
 Do you have any suggestions?


What are you trying to accomplish by sharing this folder?

Dan


Re: Windows performance issue

2014-07-21 Thread Omar Orzenini
Thank you all for the answers. I performed these tests because we are
showing serious performance problems on WIndows configurations for load
balancing (a file server shares the webapps folder via SMB for two
different application
servers that map the webapps via UNC. Tried both mapping the folder via UNC
and as logical drive but i did not get great results.


2014-07-21 13:33 GMT+02:00 Daniel Mikusa dmik...@gopivotal.com:

 On Mon, Jul 21, 2014 at 5:03 AM, Omar Orzenini omar.orzen...@gmail.com
 wrote:

  Hello everyone, I apologize for my poor english but I'll try to explain.
  I have a strange performance problem only under Windows (via NFS on
  Linux everything
  works fine).
  Tested operating system (Windows Server 2008 R2 64, WIndows Server 2012
  R2):
 
  First step: the webapps folder is in the standard path (eg c: \tomcat
  \webapps) everything works fine and with excellent performance.
 
  Second step: share the webapps folder (eg. c:\webapps) and change in the
  server.xml AppBase from webapps to \\servername\webapps.


 Have you tried referencing it as c:\webapps?  It's on the same machine
 right?  So why use the unc style path?


  In this case,
  despite the Tomcat service and the shared folder are on the same
  server, the load
  performance of applications collapse.
 

 Maybe hook up a profiler and see what's happening?


  I've done tests also sharing folders to other servers but nothing
 changes.
  On Linux NFS works very smoothly and with excellent performance.
  Do you have any suggestions?
 

 What are you trying to accomplish by sharing this folder?

 Dan



Re: Windows performance issue

2014-07-21 Thread Daniel Mikusa
On Mon, Jul 21, 2014 at 7:41 AM, Omar Orzenini omar.orzen...@gmail.com
wrote:

 Thank you all for the answers. I performed these tests because we are
 showing serious performance problems on WIndows configurations for load
 balancing (a file server shares the webapps folder via SMB for two
 different application
 servers that map the webapps via UNC. Tried both mapping the folder via UNC
 and as logical drive but i did not get great results.


I would suggest against sharing the webapps directory.  I've seen this
tried with NFS and it doesn't work great, I'd expect SMB to have similar
results.  If you want to store your WAR files on a shared file system,
that's OK just copy them to the local disk first.

Dan




 2014-07-21 13:33 GMT+02:00 Daniel Mikusa dmik...@gopivotal.com:

  On Mon, Jul 21, 2014 at 5:03 AM, Omar Orzenini omar.orzen...@gmail.com
  wrote:
 
   Hello everyone, I apologize for my poor english but I'll try to
 explain.
   I have a strange performance problem only under Windows (via NFS on
   Linux everything
   works fine).
   Tested operating system (Windows Server 2008 R2 64, WIndows Server 2012
   R2):
  
   First step: the webapps folder is in the standard path (eg c: \tomcat
   \webapps) everything works fine and with excellent performance.
  
   Second step: share the webapps folder (eg. c:\webapps) and change in
 the
   server.xml AppBase from webapps to \\servername\webapps.
 
 
  Have you tried referencing it as c:\webapps?  It's on the same machine
  right?  So why use the unc style path?
 
 
   In this case,
   despite the Tomcat service and the shared folder are on the same
   server, the load
   performance of applications collapse.
  
 
  Maybe hook up a profiler and see what's happening?
 
 
   I've done tests also sharing folders to other servers but nothing
  changes.
   On Linux NFS works very smoothly and with excellent performance.
   Do you have any suggestions?
  
 
  What are you trying to accomplish by sharing this folder?
 
  Dan
 



RE: Windows performance issue

2014-07-21 Thread Konstantin Preißer
Hi,

 -Original Message-
 From: David kerber [mailto:dcker...@verizon.net]
 Sent: Monday, July 21, 2014 1:31 PM
 To: Tomcat Users List
 Subject: Re: Windows performance issue
 
 On 7/21/2014 5:03 AM, Omar Orzenini wrote:
  Hello everyone, I apologize for my poor english but I'll try to explain.
  I have a strange performance problem only under Windows (via NFS on
  Linux everything
  works fine).
  Tested operating system (Windows Server 2008 R2 64, WIndows Server
 2012 R2):
 
  First step: the webapps folder is in the standard path (eg c: \tomcat
  \webapps) everything works fine and with excellent performance.
 
  Second step: share the webapps folder (eg. c:\webapps) and change in the
  server.xml AppBase from webapps to \\servername\webapps. In
 this case,
  despite the Tomcat service and the shared folder are on the same
  server, the load
  performance of applications collapse.
 
  I've done tests also sharing folders to other servers but nothing changes.
  On Linux NFS works very smoothly and with excellent performance.
  Do you have any suggestions?
 
 The TCP/IP stack on windows has lousy performance reading from a local
 HD compared, to the local drive access.  We used to map a drive letter
 to a local drive, but found that using the subst command gave MUCH
 better performance. That technique is not really applicable to your
 situation, but illustrates that the TCP stack is a big performance hit.

Right; I when I try the same on a Windows Server 2012 R2 machine with a fresh 
Tomcat 8.0.9 (+ one additional webapp), then when using the local path for 
appBase, Tomcat starts in 2300 ms.
When I share the webapps directory and use \\servername\webapps as appBase, 
startup time increases to 5600 ms.

My guess on the performance drop would be that an open file operation takes 
additional time, and I can imagine Tomcat opens and closes a lot of different 
files during its startup (e.g. extracting an WAR archive). On the other side, 
Microsoft supports sharing a Hyper-V virtual hard disk driver over SMB which 
seems to perform reasonably well. However, in this case, only one file (the 
.VHDX file) is accesses from the remote machine (and is held open during a long 
time).

I then created and mounted a VHDX file on a Windows Server 2012 R2 and 
formatted it with NTFS (it got the driver letter E:). Then, I dismounted it, 
and shared the folder (testfolder) which contains the VHDX file. I opened the 
path \\servername\testfolder in Explorer, right-clicked on the VHDX file and 
selected Mount to mount it over the UNC path. In Tomcat's configuration, I 
set the appBase to E:\webapps where I copied the webapps directory to.

This time, when I then started Tomcat, it took only 2300 ms like when I used 
the local path for the appBase. So this might be an option if you want to store 
the webapps directory on some SMB file server. Note however, that after a 
restart you have to re-mount the VHDX file (e.g. using a diskpart script).


Regards,
Konstantin Preißer


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