You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by rhodebump <sp...@rhoderunner.com> on 2007/06/07 17:11:27 UTC

30 Mb of common jars in each of 5 war files, should i consolidate?

I have 5 war files, each containing the springframework, hibernate jars,
tapestry jars, lots of jars so that each war file is 30 megs.

I wonder, from a performance/memory perspective would it be better to move
these common library jars into the /tomcat/common/lib directory, or should I
keep them in their individual war file structures?

I understand how moving the stuff into /common/lib means everything uses the
save version, but what is best for performance?

Thanks!

-- 
View this message in context: http://www.nabble.com/30-Mb-of-common-jars-in-each-of-5-war-files%2C-should-i-consolidate--tf3884425.html#a11009847
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: 30 Mb of common jars in each of 5 war files, should i consolidate?

Posted by Rashmi Rubdi <ra...@gmail.com>.
On 6/7/07, rhodebump <sp...@rhoderunner.com> wrote:
>
> I have 5 war files, each containing the springframework, hibernate jars,
> tapestry jars, lots of jars so that each war file is 30 megs.
>
> I wonder, from a performance/memory perspective would it be better to move
> these common library jars into the /tomcat/common/lib directory,

Are the 5 projects tightly related? If they are then it would be a
good idea to keep all JAR files in a common location.

The JAR files don't have to be /tomcat/common/lib , they can be
anywhere else -- as long as your ant build script has the path of the
dependency JAR files.

I would keep all dependency JAR files in any common folder outside Tomcat.

> or should I
> keep them in their individual war file structures?

If the projects are not closely related and each of them evolve in
their own direction then keeping the JAR files in individual WARs
would be beneficial in terms of ease of maintainence.

> I understand how moving the stuff into /common/lib means everything uses the
> save version, but what is best for performance?
>
> Thanks!
>

I don't think the performance (speed of applications) would change,
depending on which option you choose. I haven't tested this though, so
can't tell for sure.

The 2nd option requires more disk space of course.

-Rashmi

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: 30 Mb of common jars in each of 5 war files, should i consolidate?

Posted by Peter Crowther <Pe...@melandra.com>.
> From: Mark H. Wood
> On Thu, Jun 07, 2007 at 11:19:06AM -0600, Larry Meadors wrote:
> [Consolidating 69 different copies of libraries from '.war's into
> ${CATALINA_HOME}/common/lib]
> >                                 It's one of those ideas that looks
> > good on paper, but sucks in practice.
> 
> Okay, I'll ask:  why?

Two reasons:

- RAM is now much cheaper than brainpower, unless you are distributing
to many machines.  Speccing slightly larger machines to get round
problems of this kind makes economic sense, although in companies where
staff time is not accounted correctly this fact may be heavily
disguised.

- Updates and dependencies.  What happens when one of the webapps gets a
new library version?  Now, you just update the webapp.  With a
consolidated approach, you *either* start to break the consolidation -
which you're trying to avoid in the first place - or you have to do
extensive testing to make sure you aren't going to break other webapps
by replacing the central version.  More expensive staff time used.

If the software was going to be run on a million machines, the balance
is different - as Vista shows all too well.  But for corporate servers,
silicon is almost always cheaper than staff time.

		- Peter

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: 30 Mb of common jars in each of 5 war files, should i consolidate?

Posted by "Mark H. Wood" <mw...@IUPUI.Edu>.
On Thu, Jun 07, 2007 at 11:19:06AM -0600, Larry Meadors wrote:
[Consolidating 69 different copies of libraries from '.war's into
${CATALINA_HOME}/common/lib]
>                                 It's one of those ideas that looks
> good on paper, but sucks in practice.

Okay, I'll ask:  why?

-- 
Mark H. Wood, Lead System Programmer   mwood@IUPUI.Edu
Typically when a software vendor says that a product is "intuitive" he
means the exact opposite.


Re: 30 Mb of common jars in each of 5 war files, should i consolidate?

Posted by Larry Meadors <lm...@apache.org>.
I think you'd be better off spending your time (== money) on CPU, RAM,
and disk space than doing this. It's one of those ideas that looks
good on paper, but sucks in practice.

Larry


On 6/7/07, rhodebump <sp...@rhoderunner.com> wrote:
>
> I have 5 war files, each containing the springframework, hibernate jars,
> tapestry jars, lots of jars so that each war file is 30 megs.
>
> I wonder, from a performance/memory perspective would it be better to move
> these common library jars into the /tomcat/common/lib directory, or should I
> keep them in their individual war file structures?
>
> I understand how moving the stuff into /common/lib means everything uses the
> save version, but what is best for performance?
>
> Thanks!
>
> --
> View this message in context: http://www.nabble.com/30-Mb-of-common-jars-in-each-of-5-war-files%2C-should-i-consolidate--tf3884425.html#a11009847
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: 30 Mb of common jars in each of 5 war files, should i consolidate?

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rhodebump,

rhodebump wrote:
> I have 5 war files, each containing the springframework, hibernate jars,
> tapestry jars, lots of jars so that each war file is 30 megs.

How much space do you save if you move that stuff out of your WAR file?

Just because a JAR library is big doesn't mean that it will be loaded
entirely by the server. Most people probably use only 50% or any given
library (a wild-ass guess, so no one need bother asking about it).

If you have 5 webapps each loading, say, struts, you're only talking
about a small amount of memory being used by the class files themselves.
The sharing class files will be overwhelmingly eclipsed by the amount of
memory taken by instances of those classes.

I agree with Peter: bundle your webapps as self-contained entities. Your
deployment team will thank you.

> I understand how moving the stuff into /common/lib means everything uses the
> save version, but what is best for performance?

If you are concerned with memory use, then use more machines. Instead of
deploying 5 webapps on a single server, distribute them among more
servers. Any difference in CPU use is probably immeasurable because once
the classes are loaded, there should be no difference.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGaWlB9CaO5/Lv0PARAm3TAJ0a6B+w+wnOUMGN2PjWMzN/AxM5iACgjvML
pgIl+4RadJBOazEREHrdyE0=
=EoC2
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org