SlideShare une entreprise Scribd logo
1  sur  20
Jahia Performance Tuning

Hayssam Saleh - ebiznext
Summary
 Ecommerce is what we do
 How we came to Jahia ?
 The performance bottlenecks
 How me made our servers busy sleeping
 How Jahia treat its users equally (well)
 A (Jack)Rabbit can’t be slow unless you want it to.
 Assumptions
 Publication nodes are for publishing only

 My promise
 Won’t talk about anything already in the docs.
Ecommerce is what we do
The easy part
Metropolitan Transportation Pass
The challenge
200.000 Pass / hour
55 Pass / second
250 hits/ second

Selfcare services
The challenge
30.000 users / minute

The hard part
Now do it with a CMS
Performance bottlenecks
Browser
Jahia1

Browser
Browser

Data

Browser

Jahia2

Browser

Network
bottleneck

Always on
Scalability

Slow access
How me made our servers busy sleeping
How we made our server busy
sleeping
Browser
Browser

Jahia1

Browser
Browser
Browser

Data

Jahia2
Jahia Caching (1/3)
Jahia1

EHCACHE

Data

Jahia2

EHCACHE

 DiskStore Policy which is 20 times slower than Memory Store
 Writing is slow
 Writing to disk uses OubjectOutputStream which is 18 times slower
than byte copy

 Eviction is costly
 Not only does EhCache write data to disk it also need to remove it
from the memory store

 Reads from disks require deserialization + disk reads and
they are both synchronous
Jahia Caching (2/3)
 DiskStore Policy which is 20 times slower than Memory Store
 Writing is slow
 Writing to disk uses OubjectOutputStream which is 18 times slower
than byte copy

 Eviction is costly
 Not only does EhCache write data to disk it also need to remove it
from the memory store

 Reads from disks require deserialization + disk reads and
they are both synchronous

 If you have to use the DiskStore policy then :
 Use SSD drives
 Deastivate disk schedulers (set elevator to noop)
 Limit disk access by setting noatime
Jahia Caching (3/3)
 MemoryStore Policy





 Memory is faster than disk
 Byte Copy is faster than Object serialization
 Require to increase JVM Memory and the GC does not like it
 Memory is subject to GC

 EhCache (commercial version) can use Off Heap Memory
  Not subject to GC
  Allocated outside the JVM
  Managed by EhCache externally

 No perfect solution ?
 The truth is elsewhere 
Reactive Caching
Cloud effective
Cache invalidation
Browser
Jahia1

Browser
Browser
Browser

EhCache
DiskStore

Akamai /
CDN /
Varnish

Data

Jahia2

EhCache
DiskStore

Browser

Cache invalidation
<cacheEventListenerFactory
class="fr.mycompany.jahia.services.ehcache.AkamaiListenerFactory"
properties="akamaiUrlprefix=www.mycompany.fr,
type=arl,
domain=staging,
action=remove"
listenFor="all"
/>

+ 100 lines of Java code
 Jahia treat its users equally (well)
The problem we wanted to solve
What we wanted
Hot deployment
Zero downtime

Continuous deployment
No human intervention

What we got
What we wanted
Almost linear scalability
Green / Blue deployment
Zzzzz
Green Line

Blue Line

App1

App1

App2

App2

App3

App3

Install Blue Line
Open Blue Gates
Close Green Gates
Wait for sessions to die
Install Green Line

 An what if we did not have any session ???
What we did ? Jahia stateless

Browser

L
o
a
d
B
a
l
a
n
c
e
r

Session

Jahia1

Session
Session

Session

Browser

Jahia2

Session

Round robin
does not guaranty
Equal session lifetime

80 lines of Java code inside a Jahia Filter

L
o
a
d
B
a
l
a
n
c
e
r

Session

Jahia1

Session

Session in cookie based
Jahia stays Stateless

Jahia2
Canari Deployment
Canari
App1

App1

App2

App2

App3

App3

Foreach
Stop
Install
Start
 JackRabbit Best Practices

My name
is not Jack
JackRabbit versus SGBDR versus File System

Content Repository
SGBDR
Integrity

File System
Hierarchy

Structure
CRUD

Queries

Transactions

Notifications

Versioning

ACL

Full Text
Search
Performance tuning
 Indexing is done asynchronously
 Data is available after a short delay
 Disabling it
 If you don’t use it comment out SearchIndex in workspace.xml

 Avoid extra useless searches
 For each node returned by Lucene, JackRabbit checks the ACE for that node
 Set the property resultFetchSize accordingly
 Defaults to 100

 Adjust Lucene to JackRabbit Ids correctly
 Set the property cacheSize to maximize cache hits
 Available in RepositoryStatitics
Performance tuning
 Avoid multiple I/O on your DB
 Set minRecordLength to a value that avoid read/write to be larger than DB Unit of I/O
 Unit of I/O defaults to 8K for Postgres, Oracle, SQLServer

 Avoid too many references to a single node
 JackRabbit is node oriented
 When links between nodes matters we use a Graph database
 Tuple Visit(Page, User)
 Tuple Like(Page, User)

 For large node sets
 Add extra levels
 Paths quickly reduce the search domain

 Speedup write
 Use usual transaction patterns
 Write asynchronously whenever possible
Questions
My name
is Jack

Contenu connexe

Tendances

Webinar Slides: Migrating to Galera Cluster
Webinar Slides: Migrating to Galera ClusterWebinar Slides: Migrating to Galera Cluster
Webinar Slides: Migrating to Galera Cluster
Severalnines
 

Tendances (20)

Evolution of MongoDB Replicaset and Its Best Practices
Evolution of MongoDB Replicaset and Its Best PracticesEvolution of MongoDB Replicaset and Its Best Practices
Evolution of MongoDB Replicaset and Its Best Practices
 
Optimizing Your Cluster with Coordinator Nodes (Eric Lubow, SimpleReach) | Ca...
Optimizing Your Cluster with Coordinator Nodes (Eric Lubow, SimpleReach) | Ca...Optimizing Your Cluster with Coordinator Nodes (Eric Lubow, SimpleReach) | Ca...
Optimizing Your Cluster with Coordinator Nodes (Eric Lubow, SimpleReach) | Ca...
 
How Prometheus Store the Data
How Prometheus Store the DataHow Prometheus Store the Data
How Prometheus Store the Data
 
Tuning tips for Apache Spark Jobs
Tuning tips for Apache Spark JobsTuning tips for Apache Spark Jobs
Tuning tips for Apache Spark Jobs
 
Migrating and living on rds aurora
Migrating and living on rds auroraMigrating and living on rds aurora
Migrating and living on rds aurora
 
The Best and Worst of Cassandra-stress Tool (Christopher Batey, The Last Pick...
The Best and Worst of Cassandra-stress Tool (Christopher Batey, The Last Pick...The Best and Worst of Cassandra-stress Tool (Christopher Batey, The Last Pick...
The Best and Worst of Cassandra-stress Tool (Christopher Batey, The Last Pick...
 
High Availability PostgreSQL with Zalando Patroni
High Availability PostgreSQL with Zalando PatroniHigh Availability PostgreSQL with Zalando Patroni
High Availability PostgreSQL with Zalando Patroni
 
Cassandra Summit 2015: Intro to DSE Search
Cassandra Summit 2015: Intro to DSE SearchCassandra Summit 2015: Intro to DSE Search
Cassandra Summit 2015: Intro to DSE Search
 
Logical replication with pglogical
Logical replication with pglogicalLogical replication with pglogical
Logical replication with pglogical
 
Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...
Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...
Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...
 
Advanced Apache Cassandra Operations with JMX
Advanced Apache Cassandra Operations with JMXAdvanced Apache Cassandra Operations with JMX
Advanced Apache Cassandra Operations with JMX
 
Shootout at the PAAS Corral
Shootout at the PAAS CorralShootout at the PAAS Corral
Shootout at the PAAS Corral
 
10 things i wish i'd known before using spark in production
10 things i wish i'd known before using spark in production10 things i wish i'd known before using spark in production
10 things i wish i'd known before using spark in production
 
Monitoring with Prometheus
Monitoring with PrometheusMonitoring with Prometheus
Monitoring with Prometheus
 
vSphere vStorage: Troubleshooting Performance
vSphere vStorage: Troubleshooting PerformancevSphere vStorage: Troubleshooting Performance
vSphere vStorage: Troubleshooting Performance
 
SQL Server vs Postgres
SQL Server vs PostgresSQL Server vs Postgres
SQL Server vs Postgres
 
PostgreSQL and RAM usage
PostgreSQL and RAM usagePostgreSQL and RAM usage
PostgreSQL and RAM usage
 
Introduction to XtraDB Cluster
Introduction to XtraDB ClusterIntroduction to XtraDB Cluster
Introduction to XtraDB Cluster
 
Cassandra Community Webinar: Apache Cassandra Internals
Cassandra Community Webinar: Apache Cassandra InternalsCassandra Community Webinar: Apache Cassandra Internals
Cassandra Community Webinar: Apache Cassandra Internals
 
Webinar Slides: Migrating to Galera Cluster
Webinar Slides: Migrating to Galera ClusterWebinar Slides: Migrating to Galera Cluster
Webinar Slides: Migrating to Galera Cluster
 

En vedette

Realtime Web avec Kafka, Spark et Mesos
Realtime Web avec Kafka, Spark et MesosRealtime Web avec Kafka, Spark et Mesos
Realtime Web avec Kafka, Spark et Mesos
ebiznext
 
De Maven à SBT ScalaIO 2013
De Maven à SBT ScalaIO 2013De Maven à SBT ScalaIO 2013
De Maven à SBT ScalaIO 2013
Stephane Manciot
 
Les modèles NoSQL
Les modèles NoSQLLes modèles NoSQL
Les modèles NoSQL
ebiznext
 
Machine Learning - Spark / MLlib
Machine Learning - Spark / MLlibMachine Learning - Spark / MLlib
Machine Learning - Spark / MLlib
ebiznext
 

En vedette (11)

PSUG #52 Dataflow and simplified reactive programming with Akka-streams
PSUG #52 Dataflow and simplified reactive programming with Akka-streamsPSUG #52 Dataflow and simplified reactive programming with Akka-streams
PSUG #52 Dataflow and simplified reactive programming with Akka-streams
 
Realtime Web avec Kafka, Spark et Mesos
Realtime Web avec Kafka, Spark et MesosRealtime Web avec Kafka, Spark et Mesos
Realtime Web avec Kafka, Spark et Mesos
 
Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015
Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015
Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015
 
DevOps avec Ansible et Docker
DevOps avec Ansible et DockerDevOps avec Ansible et Docker
DevOps avec Ansible et Docker
 
Machine learning
Machine learningMachine learning
Machine learning
 
De Maven à SBT ScalaIO 2013
De Maven à SBT ScalaIO 2013De Maven à SBT ScalaIO 2013
De Maven à SBT ScalaIO 2013
 
Scala io2013 : Our journey from UML/MDD to Scala macros
Scala io2013 : Our journey from UML/MDD to Scala macrosScala io2013 : Our journey from UML/MDD to Scala macros
Scala io2013 : Our journey from UML/MDD to Scala macros
 
Des principes de la démarche DevOps à sa mise en oeuvre
Des principes de la démarche DevOps à sa mise en oeuvreDes principes de la démarche DevOps à sa mise en oeuvre
Des principes de la démarche DevOps à sa mise en oeuvre
 
Les modèles NoSQL
Les modèles NoSQLLes modèles NoSQL
Les modèles NoSQL
 
Blazing Performance with Flame Graphs
Blazing Performance with Flame GraphsBlazing Performance with Flame Graphs
Blazing Performance with Flame Graphs
 
Machine Learning - Spark / MLlib
Machine Learning - Spark / MLlibMachine Learning - Spark / MLlib
Machine Learning - Spark / MLlib
 

Similaire à JahiaOne - Performance Tuning

Advanced caching techniques with ehcache, big memory, terracotta, and coldfusion
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusionAdvanced caching techniques with ehcache, big memory, terracotta, and coldfusion
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusion
ColdFusionConference
 
Share point 2013 distributed cache
Share point 2013 distributed cacheShare point 2013 distributed cache
Share point 2013 distributed cache
Michael Nokhamzon
 
Jug Lugano - Scale over the limits
Jug Lugano - Scale over the limitsJug Lugano - Scale over the limits
Jug Lugano - Scale over the limits
Davide Carnevali
 
Cloud computing 3702
Cloud computing 3702Cloud computing 3702
Cloud computing 3702
Jess Coburn
 
Java Standard Edition 6 Performance
Java Standard Edition 6 PerformanceJava Standard Edition 6 Performance
Java Standard Edition 6 Performance
white paper
 
Java Standard Edition 6 Performance
Java Standard Edition 6 PerformanceJava Standard Edition 6 Performance
Java Standard Edition 6 Performance
white paper
 
Java Standard Edition 6 Performance
Java Standard Edition 6 PerformanceJava Standard Edition 6 Performance
Java Standard Edition 6 Performance
white paper
 

Similaire à JahiaOne - Performance Tuning (20)

Advanced caching techniques with ehcache, big memory, terracotta, and coldfusion
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusionAdvanced caching techniques with ehcache, big memory, terracotta, and coldfusion
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusion
 
Share point 2013 distributed cache
Share point 2013 distributed cacheShare point 2013 distributed cache
Share point 2013 distributed cache
 
Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...
 
Developing High Performance and Scalable ColdFusion Applications Using Terrac...
Developing High Performance and Scalable ColdFusion Applications Using Terrac...Developing High Performance and Scalable ColdFusion Applications Using Terrac...
Developing High Performance and Scalable ColdFusion Applications Using Terrac...
 
11g R2
11g R211g R2
11g R2
 
Jug Lugano - Scale over the limits
Jug Lugano - Scale over the limitsJug Lugano - Scale over the limits
Jug Lugano - Scale over the limits
 
Performance Tuning - MuraCon 2012
Performance Tuning - MuraCon 2012Performance Tuning - MuraCon 2012
Performance Tuning - MuraCon 2012
 
Managing and Monitoring TeamPage
Managing and Monitoring TeamPageManaging and Monitoring TeamPage
Managing and Monitoring TeamPage
 
Performance Tuning - Memory leaks, Thread deadlocks, JDK tools
Performance Tuning -  Memory leaks, Thread deadlocks, JDK toolsPerformance Tuning -  Memory leaks, Thread deadlocks, JDK tools
Performance Tuning - Memory leaks, Thread deadlocks, JDK tools
 
SQL Server On SANs
SQL Server On SANsSQL Server On SANs
SQL Server On SANs
 
Joomla! Performance on Steroids
Joomla! Performance on SteroidsJoomla! Performance on Steroids
Joomla! Performance on Steroids
 
Oracle UCM: Web Site Performance Tuning
Oracle UCM: Web Site Performance TuningOracle UCM: Web Site Performance Tuning
Oracle UCM: Web Site Performance Tuning
 
Four Ways to Improve ASP .NET Performance and Scalability
 Four Ways to Improve ASP .NET Performance and Scalability Four Ways to Improve ASP .NET Performance and Scalability
Four Ways to Improve ASP .NET Performance and Scalability
 
Cloud computing 3702
Cloud computing 3702Cloud computing 3702
Cloud computing 3702
 
Caching your rails application
Caching your rails applicationCaching your rails application
Caching your rails application
 
Web Speed And Scalability
Web Speed And ScalabilityWeb Speed And Scalability
Web Speed And Scalability
 
Adobe AEM Maintenance - Customer Care Office Hours
Adobe AEM Maintenance - Customer Care Office HoursAdobe AEM Maintenance - Customer Care Office Hours
Adobe AEM Maintenance - Customer Care Office Hours
 
Java Standard Edition 6 Performance
Java Standard Edition 6 PerformanceJava Standard Edition 6 Performance
Java Standard Edition 6 Performance
 
Java Standard Edition 6 Performance
Java Standard Edition 6 PerformanceJava Standard Edition 6 Performance
Java Standard Edition 6 Performance
 
Java Standard Edition 6 Performance
Java Standard Edition 6 PerformanceJava Standard Edition 6 Performance
Java Standard Edition 6 Performance
 

Plus de Jahia Solutions Group

Plus de Jahia Solutions Group (20)

The Road ahead: What we see as the future of digital. By Elie Auvray
The Road ahead: What we see as the future of digital. By Elie AuvrayThe Road ahead: What we see as the future of digital. By Elie Auvray
The Road ahead: What we see as the future of digital. By Elie Auvray
 
Monitoring and Data-Driven Decision Making with Daniel Maher
Monitoring and Data-Driven Decision Making with Daniel MaherMonitoring and Data-Driven Decision Making with Daniel Maher
Monitoring and Data-Driven Decision Making with Daniel Maher
 
The ultimate search of the perfect customer experience By Brian Solis
The ultimate search of the perfect customer experience By Brian SolisThe ultimate search of the perfect customer experience By Brian Solis
The ultimate search of the perfect customer experience By Brian Solis
 
Docker, Kubernetes, Openshift: Jahia on steroids in production with Julian Ma...
Docker, Kubernetes, Openshift: Jahia on steroids in production with Julian Ma...Docker, Kubernetes, Openshift: Jahia on steroids in production with Julian Ma...
Docker, Kubernetes, Openshift: Jahia on steroids in production with Julian Ma...
 
Data for Dummies by Dan Katz, CDO at Safran
Data for Dummies by Dan Katz, CDO at SafranData for Dummies by Dan Katz, CDO at Safran
Data for Dummies by Dan Katz, CDO at Safran
 
Content and commerce: The perfect combo. By Catherine Barba
Content and commerce: The perfect combo. By Catherine BarbaContent and commerce: The perfect combo. By Catherine Barba
Content and commerce: The perfect combo. By Catherine Barba
 
The power of great customer experience in today’s world. Olivier Mourrieras &...
The power of great customer experience in today’s world. Olivier Mourrieras &...The power of great customer experience in today’s world. Olivier Mourrieras &...
The power of great customer experience in today’s world. Olivier Mourrieras &...
 
Making Digital simpler. Occam’s Razor, Horses, Zebras, and Evolution
Making Digital simpler. Occam’s Razor, Horses, Zebras, and EvolutionMaking Digital simpler. Occam’s Razor, Horses, Zebras, and Evolution
Making Digital simpler. Occam’s Razor, Horses, Zebras, and Evolution
 
Elasticsearch powered EDP by Cedric Mailleux
Elasticsearch powered EDP by Cedric MailleuxElasticsearch powered EDP by Cedric Mailleux
Elasticsearch powered EDP by Cedric Mailleux
 
Jahia Cloud Offerings by Julian Maurel & Abass Safoutou
Jahia Cloud Offerings by Julian Maurel & Abass SafoutouJahia Cloud Offerings by Julian Maurel & Abass Safoutou
Jahia Cloud Offerings by Julian Maurel & Abass Safoutou
 
Learn how to go headless with Jahia DX by Serge Huber
Learn how to go headless with Jahia DX by Serge HuberLearn how to go headless with Jahia DX by Serge Huber
Learn how to go headless with Jahia DX by Serge Huber
 
Making the life of patients easier in the healthcare sector thanks to digital...
Making the life of patients easier in the healthcare sector thanks to digital...Making the life of patients easier in the healthcare sector thanks to digital...
Making the life of patients easier in the healthcare sector thanks to digital...
 
Impletementing Analytics - Stop talking, Start doing! by Ben Salmon, We are C...
Impletementing Analytics - Stop talking, Start doing! by Ben Salmon, We are C...Impletementing Analytics - Stop talking, Start doing! by Ben Salmon, We are C...
Impletementing Analytics - Stop talking, Start doing! by Ben Salmon, We are C...
 
Strategy for content with local and global sites by Romain Gauthier
Strategy for content with local and global sites by Romain GauthierStrategy for content with local and global sites by Romain Gauthier
Strategy for content with local and global sites by Romain Gauthier
 
Apache Unomi presentation and update. By Serge Huber, CTO Jahia
Apache Unomi presentation and update. By Serge Huber, CTO JahiaApache Unomi presentation and update. By Serge Huber, CTO Jahia
Apache Unomi presentation and update. By Serge Huber, CTO Jahia
 
Personalisation and Headless in a business context by Lars Petersen
Personalisation and Headless in a business context by Lars PetersenPersonalisation and Headless in a business context by Lars Petersen
Personalisation and Headless in a business context by Lars Petersen
 
Digital Revolution from Silo to Platform by Gilles Babinet
Digital Revolution from Silo to Platform by Gilles BabinetDigital Revolution from Silo to Platform by Gilles Babinet
Digital Revolution from Silo to Platform by Gilles Babinet
 
A customer journey with AI by Xavier Vaccari, Softeam Group
A customer journey with AI by Xavier Vaccari, Softeam GroupA customer journey with AI by Xavier Vaccari, Softeam Group
A customer journey with AI by Xavier Vaccari, Softeam Group
 
Using CX to unlock Total Experience by David Balko, Tribal
Using CX to unlock Total Experience by David Balko, TribalUsing CX to unlock Total Experience by David Balko, Tribal
Using CX to unlock Total Experience by David Balko, Tribal
 
AI-monitor & Marketing Factory, customer case study by Valerie Voci
AI-monitor & Marketing Factory, customer case study by Valerie VociAI-monitor & Marketing Factory, customer case study by Valerie Voci
AI-monitor & Marketing Factory, customer case study by Valerie Voci
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Dernier (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

JahiaOne - Performance Tuning

  • 2. Summary  Ecommerce is what we do  How we came to Jahia ?  The performance bottlenecks  How me made our servers busy sleeping  How Jahia treat its users equally (well)  A (Jack)Rabbit can’t be slow unless you want it to.  Assumptions  Publication nodes are for publishing only  My promise  Won’t talk about anything already in the docs.
  • 3. Ecommerce is what we do The easy part Metropolitan Transportation Pass The challenge 200.000 Pass / hour 55 Pass / second 250 hits/ second Selfcare services The challenge 30.000 users / minute The hard part Now do it with a CMS
  • 5. How me made our servers busy sleeping
  • 6. How we made our server busy sleeping Browser Browser Jahia1 Browser Browser Browser Data Jahia2
  • 7. Jahia Caching (1/3) Jahia1 EHCACHE Data Jahia2 EHCACHE  DiskStore Policy which is 20 times slower than Memory Store  Writing is slow  Writing to disk uses OubjectOutputStream which is 18 times slower than byte copy  Eviction is costly  Not only does EhCache write data to disk it also need to remove it from the memory store  Reads from disks require deserialization + disk reads and they are both synchronous
  • 8. Jahia Caching (2/3)  DiskStore Policy which is 20 times slower than Memory Store  Writing is slow  Writing to disk uses OubjectOutputStream which is 18 times slower than byte copy  Eviction is costly  Not only does EhCache write data to disk it also need to remove it from the memory store  Reads from disks require deserialization + disk reads and they are both synchronous  If you have to use the DiskStore policy then :  Use SSD drives  Deastivate disk schedulers (set elevator to noop)  Limit disk access by setting noatime
  • 9. Jahia Caching (3/3)  MemoryStore Policy      Memory is faster than disk  Byte Copy is faster than Object serialization  Require to increase JVM Memory and the GC does not like it  Memory is subject to GC  EhCache (commercial version) can use Off Heap Memory   Not subject to GC   Allocated outside the JVM   Managed by EhCache externally  No perfect solution ?  The truth is elsewhere 
  • 10. Reactive Caching Cloud effective Cache invalidation Browser Jahia1 Browser Browser Browser EhCache DiskStore Akamai / CDN / Varnish Data Jahia2 EhCache DiskStore Browser Cache invalidation <cacheEventListenerFactory class="fr.mycompany.jahia.services.ehcache.AkamaiListenerFactory" properties="akamaiUrlprefix=www.mycompany.fr, type=arl, domain=staging, action=remove" listenFor="all" /> + 100 lines of Java code
  • 11.  Jahia treat its users equally (well)
  • 12. The problem we wanted to solve What we wanted Hot deployment Zero downtime Continuous deployment No human intervention What we got What we wanted Almost linear scalability
  • 13. Green / Blue deployment Zzzzz Green Line Blue Line App1 App1 App2 App2 App3 App3 Install Blue Line Open Blue Gates Close Green Gates Wait for sessions to die Install Green Line  An what if we did not have any session ???
  • 14. What we did ? Jahia stateless Browser L o a d B a l a n c e r Session Jahia1 Session Session Session Browser Jahia2 Session Round robin does not guaranty Equal session lifetime 80 lines of Java code inside a Jahia Filter L o a d B a l a n c e r Session Jahia1 Session Session in cookie based Jahia stays Stateless Jahia2
  • 16.  JackRabbit Best Practices My name is not Jack
  • 17. JackRabbit versus SGBDR versus File System Content Repository SGBDR Integrity File System Hierarchy Structure CRUD Queries Transactions Notifications Versioning ACL Full Text Search
  • 18. Performance tuning  Indexing is done asynchronously  Data is available after a short delay  Disabling it  If you don’t use it comment out SearchIndex in workspace.xml  Avoid extra useless searches  For each node returned by Lucene, JackRabbit checks the ACE for that node  Set the property resultFetchSize accordingly  Defaults to 100  Adjust Lucene to JackRabbit Ids correctly  Set the property cacheSize to maximize cache hits  Available in RepositoryStatitics
  • 19. Performance tuning  Avoid multiple I/O on your DB  Set minRecordLength to a value that avoid read/write to be larger than DB Unit of I/O  Unit of I/O defaults to 8K for Postgres, Oracle, SQLServer  Avoid too many references to a single node  JackRabbit is node oriented  When links between nodes matters we use a Graph database  Tuple Visit(Page, User)  Tuple Like(Page, User)  For large node sets  Add extra levels  Paths quickly reduce the search domain  Speedup write  Use usual transaction patterns  Write asynchronously whenever possible