Upload
gauravkbarot
View
225
Download
2
Embed Size (px)
DESCRIPTION
KNOWARTH Delivered a webinar - Boost Your Liferay Portal Performance - covering different tips and tricks to improve Liferay portal performance. The slides cover various areas like: Liferay Portal Architecture Best Practices Liferay Portal Configuration Best Practices Application Server Configuration Best Practices Caching Best Practices Java Configuration Best Practices Load Testing & Bench-marking Best Practices Feel free to reach us at [email protected] in case of any queries.
Citation preview
Boost Your Liferay Portal Performance
Samir Bhatt
Performance matters a lot to Business
2© 2014 KNOWARTH Technologies
ProductivityDown
Cost Up
Customer Dropouts
Sales Down
Employee(Internal User)
Customer(External User)
=
=
Profit Down
Revenue Down
CRM Portal
E-CommercePortal
Actual 15 sec Page load time
vs. 2 sec expected
Actual 15 sec page load time
vs. 2 sec expected
500 employees200 Page Access Per User Per DayLoss of 360 Hours of Productivity
Additional cost of 360 Hours per Day
Profit Down by AdditionalCost
Total Customer Visits 20000 per DayAverage Customer Dropout because
of site not responsive 5000
Average 10% User Visits Convert to Sales
Loss of 500 Orders per day
Loss of revenue because of Missed 500 orders per day
LIFERAY Portal Performance Strategy
3© 2014 KNOWARTH Technologies
Architecture Best Practices
High Availability
Scalability
Performance
Caching
Configuration Best Practices
Application Server Configuration Best Practices
Liferay Portal Configuration Best Practices
Web Server Configuration Best Practices
Database Server Configuration Best Practices
Portal Runtime Tuning
JVM Tuning
Cache Configuration Tuning
Database Configuration Tuning
Application and Web Server Configuration Tuning
ARCHITECTURE BEST PRACTICES
4© 2014 KNOWARTH Technologies
5
Reference Architecture
Hardware Load Balancer
Web Servers
Application Servers
Database
Media Gallery Storage
Search Engine Index Storage
Architecting Portal for High Availability &
Scalability
5© 2014 KNOWARTH Technologies
Hardware Load Balancer
LIFERAY Portal Server 1
LIFERAY Portal Server N
Web Server 1 Web Server N
Database Server Cluster
Media Gallery San Storage
Replicated Search Index
Storage
High availability & Scalability of LIFERAY Portal depends
on following key components
Web Server
LIFERAY Portal Application Server
Database
Media Gallery Storage
Search Engine
6© 2014 KNOWARTH Technologies
Architecting Portal for High Availability &
Scalability
Web Server
Multiple Web Servers make web server
tier highly available
Hardware load balancer distributes
load among web servers
Additional capacity can be added by
adding additional web server nodes
Initial web server count can be decided
based on LIFERAY Portal Performance
white paper
7© 2014 KNOWARTH Technologies
Apache Web Server 1
Apache Web Server 2
Apache Web Server N
HardwareLoad Balancer
High Availability & Scalability of Web
Server Tier
Application Server
Clustered LIFERAY Portal nodes
ensures high availability of portal
application servers
Adding additional application server
nodes in the cluster can increase the
capacity
Initial Capacity can be decided
based on LIFERAY Portal Performance
benchmarks
8© 2014 KNOWARTH Technologies
Apache Web Server
LIFERAY Portal App Server 1
LIFERAY Portal App Server 2
LIFERAY Portal App Server N
High Availability & Scalability of
Application Server Tier
Database
There are multiple options for high availability and scalability
of database tier
Database Clustering
Read/Write Database Separation
Database Sharding
Database clustering depends upon the database provider
and can be implemented independently
Read/Write Database split and database sharding is
supported by LIFERAY Portal
9© 2014 KNOWARTH Technologies
High Availability & Scalability of
Database Tier
Read/Write Database Separation
Most database support read-write
separation and replication
LIFERAY Portal provides a way to
configure separate read and write
database
Read/write separation of database
benefits from database level
optimization
It also helps scaling database by
separating read and write operations
10© 2014 KNOWARTH Technologies
Apache Web Server
DatabaseServer
(WRITE)
DatabaseServer(READ)
High Availability & Scalability of
Database Tier
Data Replication
LIFERAY Portal Application Server
CREATE, UPDATE,DELETES
SELECTS
Database Sharding
LIFERAY Portal offers sharding data for
each virtual portal instance
Sharding enables separating huge
amount of data in comparatively
small instances
This improves performance as well as
scalability of portal
11© 2014 KNOWARTH Technologies
Apache Web Server
Database Server(SHARD-1)
Database Server(SHARD-2)
High Availability & Scalability of
Database Tier
LIFERAY Portal Application Server
Company ID (Portal Instance)
1,3,5
Company ID (Portal Instance)
2,4
Media Gallery Storage
Liferay offers multiple options to store
media gallery data
Depending upon the requirement right
option should be used
Here are recommended options in
sequence
File System Store(SAN/NAS)
Database Store
Amazon S3
CMIS
12© 2014 KNOWARTH Technologies
Database Store
High Availability & Scalability of Media
Gallery
Amazon S3
CMIS Store
File System Store
Search Engine
There are multiple options to make the search engine highly
available and scalable
Embedded Lucene search engine with LIFERAY Cluster Link based
replication
This option works in most cases and recommended approach
Integration with Solr based Search engine
If there is a heavy use of search engine in LIFERAY then it is
recommended to integrate LIFERAY with Solr search engine
Integration with Solr based read/write architecture
In case of further optimization Solr’s master/slave feature should be used
LIFERAY provides built in support to configure Solr master/slave design
High Availability & Scalability of
Search Engine
13© 2014 KNOWARTH Technologies
Architecting following
components can ensure high
performance of LIFERAY
Portal
Caching
Static Resource Delivery
Content Delivery Network
Architecting Portal for High Performance
14© 2014 KNOWARTH Technologies
Caching improves performance
by reducing
Database calls
Expensive object creations
Expensive garbage collection
LIFERAY provides three level of
Cache built in
L1 – Request Scope Cache
L2 – Memory based Cache
L3 – Swap Space Cache
Caching for high performance
15© 2014 KNOWARTH Technologies
L3 Cache Bucket
L2 Cache Bucket
L1 Cache Bucket
LIFERAY Portal uses embedded EHCache for L2 & L3
Cache by default
In clustered environment right cache replication
strategy needs to be used for high performance
LIFERAY Offers following cache replication strategy in
recommended order
Cluster Link based cache replication
RMI Based cache replication
JGroups based cache replication
Caching for high performance
16© 2014 KNOWARTH Technologies
Centralized Cache Server
High volume caching separate cache server like Terracotta is
recommended
LIFERAY provides built in support for Terracotta based
Caching
For high volume caching it will benefit against cache
replication overhead
Caching for high performance
17© 2014 KNOWARTH Technologies
Web Accelerator for caching
web resource
For content driven public portals,
it is recommended to cache
whole pages through web
accelerator
Varnish is one of the popular
open source web accelerator
Refer blog on our website for
more details on configuration
http://www.knowarth.com/integrate
-liferay-with-varnish/
Caching for high performance
18© 2014 KNOWARTH Technologies
Apache Web Server 1
Apache Web Server 2
Apache Web Server N
HardwareLoad Balancer
Varnish Server 1
Varnish Server 2
Delivery of static content like images, css, javascripts, videos affects
response time
Improvement in static content delivery can help improving
performance
Two options to improve static content delivery
Static Content Delivery from Apache Web Server
This option improves overhead of LIFERAY Portal application server in delivering static
resources
Additional deployment step required to copy static resources on Apache Web Server
Content Delivery Network
LIFERAY supports content delivery network built in
CDN improves response time for static content delivery especially for multi region user
base
Static Content Delivery for High
Performance
19© 2014 KNOWARTH Technologies
CONFIGURATION BEST PRACTICES
20© 2014 KNOWARTH Technologies
Disable all servlet filters for unused features
Disable all schedulers for unused features
Disable all unused auto login hooks
Disable counters for unused features
Asset View Counters
Document Counters
Document Rankings
Disable inline permissions if not required
Disable unused Liferay features like Pingback and
Trackbacks in Blogs Portlet
Portal Configuration Best Practices
21© 2014 KNOWARTH Technologies
Web server should be configured to deliver static resources
It reduces overhead on application server
Web server should be configured to add longer browser
cache time in static resource responses
Web server should be configured to compress static
resource responses
Web server should be configured to run required number of
process to meet concurrent user requirement
Web Server Configuration Best
Practices
22© 2014 KNOWARTH Technologies
PORTAL RUNTIME TUNING
23© 2014 KNOWARTH Technologies
Portal runtime tuning involves three step iterative
process
Load generation can be done using tools like Jmeter,
Grinder, Load runner
During the exercise different resources needs to be
monitored
Portal Runtime Tuning
24© 2014 KNOWARTH Technologies
Generate Load Monitor Resources Tune Configuration
Resource Monitoring
Apache Web Server
Max Processes vs. Actual Processes
Memory Usage
CPU Utilization
LIFERAY Portal Application Server
Max Threads Vs. Actual Threads
CPU Utilization
Memory Utilization
Max JDBC Connections vs. Busy Connections
Disk IO
JVM Heap Usage
JVM Garbage Collection
Portal Runtime Tuning
25© 2014 KNOWARTH Technologies
Resource Monitoring
Database Server
Max Connections vs. Live Connections
Slow Queries
CPU Usage
Memory Usage
Disk IO
Cache
Cache Hits
Cache Misses
Portal Runtime Tuning
26© 2014 KNOWARTH Technologies
Useful Tools for Monitoring
Jconsole & Visual VM
Monitoring JVM, Garbage Collection, Cache Statistics, Threads,
CPU, Memory usage, database connection pool etc.
mpstate, vmstat
Monitoring CPU
ifstat, iostat
Monitoring IO statistics
Portal Runtime Tuning
27© 2014 KNOWARTH Technologies
ABOUT KNOWARTH
28© 2014 KNOWARTH Technologies
29
What is KNOWARTH?
A solution focused start up having 40+ years
combined Liferay experience which has helped
various organizations to:
Replace proprietary products with open source
solutions in Liferay
Achieve their business goals with open source
solutions
Increase ROI
Reduce TCO
Improve performance of their portal application
25+ Projects Implemented
4 Books Authored& Reviewed
Strong Focus On Quality
100+ Years of Combined Experience
Solutions Delivered:
Intranet
Extranet
Products
Content Management
Systems
Social Collaboration
Platforms
© 2014 KNOWARTH Technologies
Enterprise Software Solutions Offerings
30
KNOWARTH Offerings
Technologies & Frameworks
- Java - Spring - Wicket - Backbone.js - Compiere
- PHP - Struts - GWT - EXT-JS - iDempiere
- J2EE - Hibernate - YUI - AUI - ZK
Solutions
- Portal - ECM/WCM
- Document Management - ERP
- Enterprise Integrations - E-Commerce
Services
- Custom Development - Consulting
- Cloud Infra & Mgmt. - Performance Tuning
- Support & Maintenance - IT Infra Support
- UI/UX Design & Development
© 2014 KNOWARTH Technologies
While implementing Liferay projects, we integrated various
technologies & products with Liferay. Some of them are:
Project Experience - Integrations
31© 2014 KNOWARTH Technologies
32
You can leverage our Portal Performance Assessment & Tuning Services.
Contact us on [email protected] or visit our site
www.knowarth.com for a one day free assessment.
Portal Performance Tuning Services
© 2014 KNOWARTH Technologies
Q&A
33© 2014 KNOWARTH Technologies