Optimizing my Portal development VM

I’ve applied a sub-set of the Portal tuning guide to my development VM, with a marked improvement in performance.


First, I moved to DB2 from Derby. If you’re doing any work at all with WCM then this is well worth doing. I also set the following:

After database transfer, and after installing CTC, I ran the reorg scripts as indicated in the tuning guide:

db2 -x -r "runstats.db2" "select rtrim(concat('runstats on table ',concat(rtrim(tabSchema),concat('.',concat(rtrim(tabname),' on all columns with distribution on all columns and sampled detailed indexes all allow write access'))))) from syscat.tables where type='T'" 
db2 -v -f "runstats.db2" 

DB2 log file size properties

  • LOGFILESIZ – 16000


On WebSphere I made a number of minor tweaks that seem to have had a positive effect. I made changes in two places in the ISC:

Application servers > WebSphere_Portal > Process definition > Java Virtual Machine
First, I changed some settings on the JVM here:

  • Maximum heap size – 1500MB
  • Minimum Initial heap size – 1500MB

Added this to the Generic JVM Arguments field – be careful cutting and pasting from the tuning guide as the dash in the PDF is not a hyphen and the JVM will fail to start.

-Xmn512m -Xscmx150m -Xjit:iprofilerMemoryConsumptionLimit=67108864

These settings are all described in the tuning guide, linked to above. After setting these values, you need to stop the portal server and run the following:

<AppServer root>/java/bin/java -Xshareclasses:name=webspherev80_root,groupAccess,destroy 

Application servers > WebSphere_Portal > Transaction service
I also set transaction timeouts to facilitate handling of large libraries:

  • Total transaction lifetime timeout: 420s
  • Maximum transaction timeout: 420s


I also installed IBM HTTP Server so as to be able to set cache headers etc. I added the following lines to the httpd.conf:

This block tells IHS to cache static content in memory:

LoadModule cachemodule modules/modcache.so
 <IfModule modcache.c>
 LoadModule memcachemodule modules/modmemcache.so
     <IfModule modmem_cache.c>
         CacheEnable mem /
         CacheIgnoreHeaders Set-Cookie
         MCacheSize 102400
         MCacheMaxObjectCount 10000
         MCacheMinObjectSize 1
         MCacheMaxStreamingBuffer 6291456
         MCacheMaxObjectSize 6291456

This block tells IHS to set cache-control expiry headers on static resource type.s.

LoadModule expiresmodule modules/modexpires.so
 LoadModule headersmodule modules/modheaders.so
# from http://www.contentwithstyle.co.uk/blog/147 avoid gzip bug in IE 6
 BrowserMatch ^Mozilla/4.[0678] no-gzip
 BrowserMatch \bMSIE\s7 !no-gzip !gzip-only-text/html
 AllowEncodedSlashes On
 ExpiresActive On
 ExpiresByType text/plain "access plus 1 week"
 ExpiresByType image/gif "access plus 1 week"
 ExpiresByType image/jpg "access plus 1 week"
 ExpiresByType image/jpeg "access plus 1 week"
 ExpiresByType image/png "access plus 1 week"
 ExpiresByType application/x-javascript "access plus 1 week"
 ExpiresByType text/javascript "access plus 1 week"
 ExpiresByType text/css "access plus 1 week"
 ExpiresByType application/xml "access plus 1 week"
 ExpiresByType application/vnd.mozilla.xul+xml "access plus 1 week"
 ExpiresByType application/x-www-form-urlencoded "access plus 1 week"
 ExpiresByType text/html "access plus 1 week"
 ExpiresByType text/xml "access plus 1 week"
 ExpiresByType application/atom+xml "access plus 1 week"
# note that the following max-age=86400 is just an example.
 # A lower value might be more appropriate for your site
 # Also, note that with the next setting, all html will have the Cache-Control
 # header added. Your site might need to be more selective.
<LocationMatch ".(gif|jpeg|jpg|png|ico|jsp|css|js|swf|json|htm|html)$">
     header set Cache-Control "public,max-age=86400"
 <LocationMatch "/mccenabler/js/com/ibm/mm/livetext/..cfg">
     header set Cache-Control "public,max-age=86400"
 <LocationMatch "/mccbuilder/widget-catalog/..xml">
     header set Cache-Control "public,max-age=86400"
 # added so apache server status won't be cached
 <LocationMatch "/server-status">
     Header set Cache-Control "no-cache,max-age=0"

Of course these HTTP Server caching settings should be used carefully. If you’re doing theme development, for example, you may wish to turn them off so that content caching does not get in the way.


2 thoughts on “Optimizing my Portal development VM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s