Sunteți pe pagina 1din 18

Liferay Performance Management

CONFIDENTIAL AND PROPRIETARY - DO NOT DISTRIBUTE


Lofty Goals

 Real world benchmarks


 Content intensive scenarios
 Social network and collaboration scenarios
 Integration portal scenarios

 Benchmarked reference architecture


 Small, medium, and large deployments
 HA deployments

CONFIDENTIAL AND PROPRIETARY - DO NOT DISTRIBUTE


Lofty Goals

 Automated performance regression


 Performance tests fully integrated with automated
build process
 Rapidly detect performance variances for Community
and Enterprise Editions

CONFIDENTIAL AND PROPRIETARY - DO NOT DISTRIBUTE


Production-like Environment

 Hardware
 1 - Hardware load balancer (Cisco CSS 11000)
 2 - Web Server
 1 Intel Xeon Quad-core 2.4Ghz, 2GB
 2 - Application Server
 2 Intel Xeon Quad-core 2.4Ghz, 8GB
 2 - Database Server
 2 Intel Xeon Quad-core 2.4Ghz, 4GB, 15k RPM 250GB HD

 Tomcat 6.0.18, JDK 1.6.0_07, and MySQL 5.0.67

 Tools: JMeter, VisualVM, vmstat, iostat

CONFIDENTIAL AND PROPRIETARY - DO NOT DISTRIBUTE


Realistic Scenarios

 Content management scenarios


 70% anonymous access, 30% authenticated access
 Liferay Journal
 85% browsing, 15% content creation/update
 10,000 articles
 Liferay Document Library
 80% download, 20% upload/update
 100,000 documents
 Liferay Image Gallery
 80% view, 20% upload/update
 500,000 images

CONFIDENTIAL AND PROPRIETARY - DO NOT DISTRIBUTE


Realistic Scenarios

 Collaboration scenarios
 40% anonymous access, 60% authenticated access
 Liferay Blogs
 75% views, 15% comments, 10% creation
 100,000 blog entries
 Liferay Wiki
 75% views, 15% comments, 10% creation
 100,000 wiki entries
 Liferay Message Boards
 70% views, 30% reply/new posts
 500,000 posts across 100 categories

CONFIDENTIAL AND PROPRIETARY - DO NOT DISTRIBUTE


Realistic Scenarios

 Social network scenarios


 100% authenticated access
 Include scenarios from collaboration to drive
activity tracking
 Activity tracking: 100% read
 Wall: 85% read, 15% new posts
 10MM user database.

CONFIDENTIAL AND PROPRIETARY - DO NOT DISTRIBUTE


Initial Results

CONFIDENTIAL AND PROPRIETARY - DO NOT DISTRIBUTE


1.000.000 Unique Users

 Liferay 5.1.2 – Authenticated Access


 Scenario:
 User arrives on Liferay.com homepage.
 User authenticates with portal.
 Portal forwards authenticated user to homepage.
 1MM unique users in database
 Throughput: 38.4 login/sec; 138.240 logins in 1 hour
 Average time: 938ms/execution
 Average CPU load: 64%

CONFIDENTIAL AND PROPRIETARY - DO NOT DISTRIBUTE


Elastic Computing

 Liferay 5.1.0 – Authenticated Access


 Scenario:
 User arrives on Liferay.com homepage.
 User authenticates with portal.
 Portal forwards authenticated user to homepage.
 User navigates to personal home page and updates 2
portlets
 4 EC2 compute units
 Equivalent to 4 single-core, 1Ghz Xeon
 300 concurrent users; average 418ms / request

CONFIDENTIAL AND PROPRIETARY - DO NOT DISTRIBUTE


Community Participation

 The community is also reporting their findings


 Jesper Weisglass (kanal5.se – LR 4.4)
 2 Apache HTTP, 4 Liferay, 1 MySQL – 2 dual-core 3Ghz
Xeon CPUs in all machines
 330 pages / sec or roughly 23.100 HTTP requests / sec
 Avg response time: 1.5 – 2 sec
 Alf Høgemark (LR 5.1.2)
 Testing anonymous browsing of content
 1 CPU Intel Core2 Quad 2.67Ghz
 Throughput: 2150 requests / second
 Avg response time: 219ms / request

CONFIDENTIAL AND PROPRIETARY - DO NOT DISTRIBUTE


Critical Parameters

CONFIDENTIAL AND PROPRIETARY - DO NOT DISTRIBUTE


Not just Max and Min

 Java VM – beyond -Xms and -Xmx


 Garbage collector algorithm choice critical
 generational
 Perform detailed heap tuning: young generation,
survivor spaces, etc
 Number of threads dedicated to GC execution
 Do not rely upon “automatic GC tuning.”
 Improve lock contention within JVM
 Oracle Jrockit – enableFatSpin
 Sun JVM - +UseBiasedLocking

CONFIDENTIAL AND PROPRIETARY - DO NOT DISTRIBUTE


Visual VM

CONFIDENTIAL AND PROPRIETARY - DO NOT DISTRIBUTE


Portal Tuning

 Application Tuning
 Application server resources (worker threads and db
connections)
 Tune cache
 Max size, tenuring thresholds
 Monitor Liferay’s internal cache
 CMS – JournalContentUtil, LayoutCacheUtil
 Security – PermissionCacheUtil
 General – FinderCache

 Liferay 5.1’s new Role Based Permissions


 Simplified authorization mechanism

CONFIDENTIAL AND PROPRIETARY - DO NOT DISTRIBUTE


Application Resources and Cache

CONFIDENTIAL AND PROPRIETARY - DO NOT DISTRIBUTE


Critical Parameters

 Database - MySQL
 Buffer sizing to match size and load
 Key buffer
 Sort buffer
 Read buffer
 Caches
 Query caches
 Thread caches

CONFIDENTIAL AND PROPRIETARY - DO NOT DISTRIBUTE


Summary

 We have heard the community!


 Liferay moving to properly address performance and
reference architecture questions.
 Liferay and Sun collaborating to
 Benchmarks may not be indicative of your
customized portal’s performance
 Customizations will impact overall performance
 Define realistic performance budget
 Test, tune, and test again
 Questions?

CONFIDENTIAL AND PROPRIETARY - DO NOT DISTRIBUTE