views:

570

answers:

3

Hi,

We're currently testing out Alfresco Community on an old server (only 1GB of RAM). Because this is the Community version we need to restart it every time we change the configuration (we're trying to add some features like generating previews of DWG files etc). However, restarting takes a very long time (about 4 minutes I think). This is probably due to the limit amount of memory available. Does anybody know some features or settings that can improve this restart time?

A: 

Two of the most common reasons why Tomcat loads slowly:

  • You have a lot of web applications. Tomcat takes some time to create the web context for each of those.
  • Your webapp have a large number of files in a web application directory. Tomcat scans the web application directories at startup
leonm
There are only 2 web applications, the default alfresco applications. They do have a big number of files, but I don't believe everybody has such a slow start up time.
Frank Groeneveld
+2  A: 

As with all performance issues there is rarely a magic bullet.

Memory pressure - the app is starting up but the 512m heap is only just enough to fit the applications in and it is spending half of the start up time running GC.

Have a look at any of the following: 1. -verbose:gc 2. jstat -gcutil 2. jvisualvm - much nicer UI

You are trying to see how much time is being spent in GC, look for many full garbage collection events that don't reclaim much of the heap ie 99% -> 95%.

Solution - more heap, nothing else for it really.

You may want to try -XX:+AggressiveHeap in order to get the JVM to max out it's memory usage on the box, only trouble is with only 1gb of memory it's going to be limited. List of all JVM options

Disk IO - the box it's self is not running at close to 100% CPU during startup (assuming 100% of a single core, startup is normally single threaded) then there may be some disk IO that the application is doing that is the bottle neck.

Use the operating system tools such as Windows Performance monitor to check for disk IO. It maybe that it isn't the application causing the IO it could be swap activity (page faulting)

Solution: either fix the app (not to likely) or get faster disks/computer or more physical memory for the box

Gareth Davis
A: 

Hi Frank

also have a look at java performance tuning whitepaper, further I would recomend to you Lambda Probe www.lambdaprobe.org/d/index.htm to see if you are satisfied with your gcc settings, it has nice realtime gcc and memory tracking for tomcat.

I myself have Alfresco running with the example 4.2.6 from java performance tuning whitepaper:

4.2.6 Tuning Example 6: Tuning for low pause times and high throughput

Memory settings are also very nicely explained in that paper.

kind regards Mahatmanich

mahatmanich