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

Reply via email to