SlideShare ist ein Scribd-Unternehmen logo
1 von 60
Downloaden Sie, um offline zu lesen
@YourTwitterHandle#DV14 #YourTag @MilenDyankov#DV14 #beyondXmx
Web application performance tuning beyond Xmx
Milen Dyankov
This talk is not about JVM and GC tuning !
Disappointed? You shouldn't be, there are plenty of other talks out there!
This talk is not about Liferay either !
However you may want to check it out anyway! It is a great platform!
This is not a university courseThis is not a university course
on performance tuning!on performance tuning!
I'm just sharing my personalI'm just sharing my personal
experience with you!experience with you!
performance
tuning
expert
Customer's statement:
“It is very slow!
You need to improve
the performance!”
What would you do?
Customer's statement:
“It is very slow!
You need to improve
the performance!”
What would you do?
Check the CPU andCheck the CPU and
memory usagememory usage
Check theCheck the
JVM parametersJVM parameters
Check the databaseCheck the database
for slow queriesfor slow queries
Check the CPU andCheck the CPU and
memory usagememory usage
Check theCheck the
JVM parametersJVM parameters
Check the databaseCheck the database
for slow queriesfor slow queries
While those are valid points, they are all the WRONG answer!
Customer's statement:
“It is very slow!
You need to improve
the performance!”
What would you do?
Ask to provideAsk to provide
numbers!numbers!
Ask to provideAsk to provide
expectations!expectations!
Ask to provideAsk to provide
units!units!
Customer's statement:
“It is very slow!
You need to improve
the performance!”
What would you do?
Ask to provideAsk to provide
numbers!numbers!
Ask to provideAsk to provide
expectations!expectations!
Ask to provideAsk to provide
units!units!
Customer's statement:
“It is very slow!
You need to improve
the performance!”
What would you do?
Make sure everyone uses the same definitions and units
to describe both the status and the expectations!
“It can only serve N users,
we expect it to serve MxN users”
“It can only serve N users,
we expect it to serve MxN users”
N users accessing the systemN users accessing the system
at random times during given period!at random times during given period!
N users accessing the systemN users accessing the system
as a result of marketing campaign!as a result of marketing campaign!
N users accessing the systemN users accessing the system
every day between 8:00 and 8:15!every day between 8:00 and 8:15!
consider these
“It can only serve N users,
we expect it to serve MxN users”
N users accessing the systemN users accessing the system
at random times during given period!at random times during given period!
N users accessing the systemN users accessing the system
as a result of marketing campaign!as a result of marketing campaign!
N users accessing the systemN users accessing the system
every day between 8:00 and 8:15!every day between 8:00 and 8:15!
consider these
Don't confuse
ability to scale with
performance tuning!
Use unambiguous
or less ambiguous
units!
Unambiguous
Ambiguous
Business Technical
usersusers
concurrent usersconcurrent users
concurrent sessionsconcurrent sessions
concurrent requestsconcurrent requests
requests per secondrequests per second
(M/K)bytes per second(M/K)bytes per second
But keep in mind:
sometimes being too technical
leads to the wrong decisions!
Use unambiguous
or less ambiguous
units!
Consider this statement:Consider this statement:
“N needs to travel from town A to town B.
What is the fastest possible way?”
But keep in mind:
sometimes being too technical
leads to the wrong decisions!
Consider this statement:
“N needs to travel from town A to town B.
What is the fastest possible way?”
M x
But keep in mind:
sometimes being too technical
leads to the wrong decisions!
Refinement:
N is a group of M passengers
Refinement:
N is a group of M passengers
Consider this statement:
“N needs to travel from town A to town B.
What is the fastest possible way?”
But keep in mind:
sometimes being too technical
leads to the wrong decisions!
How to do performance tuning?
It's kind of like …
… drawing an Owl!
How to do performance tuning?
●
First draw 2 ellipses!
It's kind of like …
… drawing an Owl!
How to do performance tuning?
●
First draw 2 ellipses!
●
Then draw the rest
of the damn Owl!
It's kind of like …
… drawing an Owl!
How to do performance tuning?
units = defineUnits();
expectations = defineExpectations(units);
results = measurePerformance();
while (!results.match(expectations)) {
component = findLowestPerforming(results);
bottleneck = findBottleneck (component);
remove(bottleneck);
results = measurePerformance();
}
Enough analogies! Let's try with an algorithm:
How to do performance tuning?
units = defineUnits();
expectations = defineExpectations(units);
results = measurePerformance();
while (!results.match(expectations)) {
component = findLowestPerforming(results);
bottleneck = findBottleneck (component);
remove(bottleneck);
results = measurePerformance();
}
Enough analogies! Let's try with an algorithm:
How to do performance tuning?
units = defineUnits();
expectations = defineExpectations(units);
results = measurePerformance();
while (!results.match(expectations)) {
component = findLowestPerforming(results);
bottleneck = findBottleneck (component);
remove(bottleneck);
results = measurePerformance();
}
Enough analogies! Let's try with an algorithm:
How to do performance tuning?
Application
measurePerformance();measurePerformance();
Application
measurePerformance();measurePerformance();
units = defineUnits();
expectations = defineExpectations(units);
- results = measurePerformance()
+ data = collectData();
+ results = analyze(data)
while (!results.match(expectations)) {
component = findLowestPerforming(results);
bottleneck = findBottleneck (component);
remove(bottleneck);
- results = measurePerformance()
+ data = collectData();
+ results = analyze(data)
}
Let's refine the algorithm:
Application
measurePerformance();measurePerformance();
units = defineUnits();
expectations = defineExpectations(units);
- results = measurePerformance()
+ data = collectData();
+ results = analyze(data)
while (!results.match(expectations)) {
component = findLowestPerforming(results);
bottleneck = findBottleneck (component);
remove(bottleneck);
- results = measurePerformance()
+ data = collectData();
+ results = analyze(data)
}
Let's refine the algorithm:
Application
measurePerformance();measurePerformance();
Browser Network Server JVM Container Application BrowserNetwork. . .
collectData();collectData();
Browser Network Server JVM Container Application BrowserNetwork. . .
Take into account your target group!
Respect “Cache-Control” and “Expires” headers !
Home page is not the main entrance anymore!
Consider search results and referrals!
Take ONLY what you REALLY need!
Measure the impact of 3rd party code (analytics, ads, …)!
collectData();collectData();
Browser Network Server JVM Container Application BrowserNetwork. . .
You are NOT the only creature in the space and time!
Understand who else is using the same network, what for and when!
A network is, what the name says – a net, not a line!
There may be many networks and interfaces involved!
Network traffic goes in two directions!
No problem on the way in, does NOT mean no problem on the way out!
(or vice-versa)
collectData();collectData();
Browser Network Server JVM Container Application BrowserNetwork. . .
“Server” is one of the most ambiguous words !
Amazon, Jelastic, … are servers as well … but different!
Virtual resources are … well, VIRTUAL!
“… 3 VMs (8GB of RAM each) … oh the server has 16GB of RAM”
Operating System will only tell you what you ask for !
nice, top, htop, atop, dstat, vmstat, ifstat, iostat, …
collectData();collectData();
Browser Network Server JVM Container Application BrowserNetwork. . .
Know what your workers are doing!
Regular thread dumps help find long running threads!
Garbage collection of course! Everyone knows that!
-verbose:gc -Xloggc:... -XX:+PrintGCDetails
Tools are nice but they also consume resources!
Don't measure having the profiler attached!
collectData();collectData();
Browser Network Server JVM Container Application BrowserNetwork. . .
Policies, politics, preferences and common sense!
Don't fight against windmills!
Sessions tend to grow, last forever and …
… replicate!
Security, audits, transactions … ,Security, audits, transactions … ,
…… and interceptors in general!and interceptors in general!
collectData();collectData();
Browser Network Server JVM Container Application BrowserNetwork. . .
Text Object XML Object JSON … !→ → → → →
Simultaneous translation is not an easy job!
Many a mickle makes a muckle!Many a mickle makes a muckle!
Number of calls is as important as the time the call takes!Number of calls is as important as the time the call takes!
Cache stats – hits, misses, invalidation, overflows, ...
Not caching anything? Great! You just found the bottleneck!
collectData();collectData();
Browser Network Server JVM Container Application BrowserNetwork. . .
Databases
External storages
Frameworks
3rd
party services
. . .
Last, but not least,
pay attention to all those
little tiny things that makes
an Owl look like an Owl!
Oh and here is something that is valid
for about everything we covered so far:
You can really make use of
another pair of eyes!
collectData();collectData();
“It doesn't matter how beautiful your theory is,
it doesn't matter how smart you are.
If it doesn't agree with experiment, it's wrong.”
Richard P. Feynman
Do I really have to do all that?
You better do! Here is why:
Do I really have to do all that?
You better do! Here is why:
Even the guys behind BIG names
sometimes don't do it right!
2014, Louvre Museum, Paris, France
Do I really have to do all that?
You better do! Here is why:
THE USUAL SUSPECTS
is a movie title not a problem solving strategy!
Do I really have to do all that?
You better do! Here is why:
units = defineUnits();
expectations = defineExpectations(units);
- results = measurePerformance()
+ data = collectData();
+ results = analyze(data)
while (!results.match(expectations)) {
component = findLowestPerforming(results);
bottleneck = findBottleneck (component);
remove(bottleneck);
- results = measurePerformance()
+ data = collectData();
+ results = analyze(data)
}
Back to the algorithm:
units = defineUnits();
expectations = defineExpectations(units);
- results = measurePerformance()
+ data = collectData();
+ results = analyze(data)
while (!results.match(expectations)) {
component = findLowestPerforming(results);
bottleneck = findBottleneck (component);
remove(bottleneck);
- results = measurePerformance()
+ data = collectData();
+ results = analyze(data)
}
Back to the algorithm:
1
2
3
analyze(analyze(datadata););
The Base Rate Fallacy
When people have both
generic and specific information,
they tend to make judgments of probability
based entirely upon specific information,
leaving out the base rate.
analyze(analyze(datadata););
Congruence bias
A hypothesis is tested only
by thinking of results that would be found
if that hypothesis is true.
This heuristic, which many people seem to use,
ignores alternative hypotheses
analyze(analyze(datadata););
units = defineUnits();
expectations = defineExpectations(units);
- results = measurePerformance()
+ data = collectData();
+ results = analyze(data)
while (!results.match(expectations)) {
component = findLowestPerforming(results);
bottleneck = findBottleneck (component);
remove(bottleneck);
- results = measurePerformance()
+ data = collectData();
+ results = analyze(data)
}
Back to the algorithm:
units = defineUnits();
expectations = defineExpectations(units);
- results = measurePerformance()
+ data = collectData();
+ results = analyze(data)
while (!results.match(expectations)) {
component = findLowestPerforming(results);
bottleneck = findBottleneck (component);
remove(bottleneck);
- results = measurePerformance()
+ data = collectData();
+ results = analyze(data)
}
Back to the algorithm:
I'm sorry! I don't have any universal solution yet!
But I will be happy to give you some
links, tips and warnings
if you don't mind!
remove(remove(bottleneckbottleneck););
Browser Network Server JVM Container Application BrowserNetwork. . .
“I sometimes go into a client site and got
3X improvements on performance
just with some tuning of the operating system
and the ways VMs are running.”
Martin Thompson
http://www.infoq.com/presentations/top-10-performance-myths
Step out of the comfort zone!
remove(remove(bottleneckbottleneck););
Browser Network Server JVM Container Application BrowserNetwork. . .
Avoid tuning by folklore!
remove(remove(bottleneckbottleneck););
Don't copy JVM settings from various blogs!
They are not meant to be for you!
Browser Network Server JVM Container Application BrowserNetwork. . .
Blocking vs Nonblocking Cache
Data structures
( the famoust ArrayList vs LinkedList interview question is for a reason )
Method complexity
( StringBuilder vs String.concat )
Logging
Know what the code you use actually do!
remove(remove(bottleneckbottleneck););
Browser Network Server JVM Container Application BrowserNetwork. . .
Going multi-thread !
Going asynchronous !
Going modular!
Going multi-vm !
Going distributed!
Going off-heap!
Get (more) things done!
remove(remove(bottleneckbottleneck););
SPECIAL CASE FOR FRAMEWORK AND LIBRARY DEVELOPERS
Tuning the unknown!
“A common mistake that people make
when trying to design something
completely foolproof is to underestimate
the ingenuity of complete fools.”
The Hitchhiker's Guide to the Galaxy
Douglas Adams
There are 2382 configuration properties
in Liferay 6.2
Make it configurable!
SPECIAL CASE FOR FRAMEWORK AND LIBRARY DEVELOPERS
Tuning the unknown!
Document it !
There are 6896 lines of comments
documenting Liferay 6.2 properties!
SPECIAL CASE FOR FRAMEWORK AND LIBRARY DEVELOPERS
Tuning the unknown!
Provide reasonable defaults !
Example:
#
# If the user can unzip compressed HTTP content,
# the GZip filter will zip up the HTTP content
# before sending it to the user. This will speed up
# page rendering for users that are on dial up.
#
com.liferay.portal.servlet.filters.gzip.GZipFilter=true
SPECIAL CASE FOR FRAMEWORK AND LIBRARY DEVELOPERS
Tuning the unknown!
Provide performance results
for most common cases!
SPECIAL CASE FOR FRAMEWORK AND LIBRARY DEVELOPERS
Tuning the unknown!
@YourTwitterHandle#DV14 #YourTag @MilenDyankov#DV14 #beyondXmx
Photo: http://www.flickr.com/photos/wwworks/4759535950/
http://www.liferay.com
@Liferay
http://www.facebook.com/Liferay
milen.dyankov@liferay.com
http://www.liferay.com/web/milen.dyankov/
@milendyankov
@LiferayPL

Weitere ähnliche Inhalte

Andere mochten auch

Moved to https://slidr.io/azzazzel/business-wins-in-modularity-microservices-...
Moved to https://slidr.io/azzazzel/business-wins-in-modularity-microservices-...Moved to https://slidr.io/azzazzel/business-wins-in-modularity-microservices-...
Moved to https://slidr.io/azzazzel/business-wins-in-modularity-microservices-...Milen Dyankov
 
Moved to https://slidr.io/azzazzel/what-s-not-new-in-modular-java
Moved to https://slidr.io/azzazzel/what-s-not-new-in-modular-javaMoved to https://slidr.io/azzazzel/what-s-not-new-in-modular-java
Moved to https://slidr.io/azzazzel/what-s-not-new-in-modular-javaMilen Dyankov
 
Moved to https://slidr.io/azzazzel/osgi-for-outsiders
Moved to https://slidr.io/azzazzel/osgi-for-outsidersMoved to https://slidr.io/azzazzel/osgi-for-outsiders
Moved to https://slidr.io/azzazzel/osgi-for-outsidersMilen Dyankov
 
Moved to https://slidr.io/azzazzel/osgi-fundamentals
Moved to https://slidr.io/azzazzel/osgi-fundamentalsMoved to https://slidr.io/azzazzel/osgi-fundamentals
Moved to https://slidr.io/azzazzel/osgi-fundamentalsMilen Dyankov
 
Moved to https://slidr.io/azzazzel/leveraging-osgi-to-create-extensible-plugi...
Moved to https://slidr.io/azzazzel/leveraging-osgi-to-create-extensible-plugi...Moved to https://slidr.io/azzazzel/leveraging-osgi-to-create-extensible-plugi...
Moved to https://slidr.io/azzazzel/leveraging-osgi-to-create-extensible-plugi...Milen Dyankov
 
Moved to https://slidr.io/azzazzel/software-craftsmanship-in-the-era-of-softw...
Moved to https://slidr.io/azzazzel/software-craftsmanship-in-the-era-of-softw...Moved to https://slidr.io/azzazzel/software-craftsmanship-in-the-era-of-softw...
Moved to https://slidr.io/azzazzel/software-craftsmanship-in-the-era-of-softw...Milen Dyankov
 
Moved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterprise
Moved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterpriseMoved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterprise
Moved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterpriseMilen Dyankov
 
Dynamic programming on .net
Dynamic programming on .netDynamic programming on .net
Dynamic programming on .netMohammad Tayseer
 
Website Latency Diagnostics
Website Latency DiagnosticsWebsite Latency Diagnostics
Website Latency DiagnosticsAlex Burciu
 
Web Performance Optimization @Develer
Web Performance Optimization @DevelerWeb Performance Optimization @Develer
Web Performance Optimization @DevelerMassimo Iacolare
 
Moved to https://slidr.io/azzazzel/liferay-multi-channel-mobile-delivery-plat...
Moved to https://slidr.io/azzazzel/liferay-multi-channel-mobile-delivery-plat...Moved to https://slidr.io/azzazzel/liferay-multi-channel-mobile-delivery-plat...
Moved to https://slidr.io/azzazzel/liferay-multi-channel-mobile-delivery-plat...Milen Dyankov
 
OSGi for outsiders - Milen Dyankov
OSGi for outsiders - Milen DyankovOSGi for outsiders - Milen Dyankov
OSGi for outsiders - Milen Dyankovmfrancis
 
Application Performance Monitoring (APM)
Application Performance Monitoring (APM)Application Performance Monitoring (APM)
Application Performance Monitoring (APM)Site24x7
 
Microservices OSGi-running-with-apache-karaf
Microservices OSGi-running-with-apache-karafMicroservices OSGi-running-with-apache-karaf
Microservices OSGi-running-with-apache-karafAchim Nierbeck
 
Moved to https://slidr.io/azzazzel/what-is-a-portal
Moved to https://slidr.io/azzazzel/what-is-a-portalMoved to https://slidr.io/azzazzel/what-is-a-portal
Moved to https://slidr.io/azzazzel/what-is-a-portalMilen Dyankov
 

Andere mochten auch (17)

Moved to https://slidr.io/azzazzel/business-wins-in-modularity-microservices-...
Moved to https://slidr.io/azzazzel/business-wins-in-modularity-microservices-...Moved to https://slidr.io/azzazzel/business-wins-in-modularity-microservices-...
Moved to https://slidr.io/azzazzel/business-wins-in-modularity-microservices-...
 
Moved to https://slidr.io/azzazzel/what-s-not-new-in-modular-java
Moved to https://slidr.io/azzazzel/what-s-not-new-in-modular-javaMoved to https://slidr.io/azzazzel/what-s-not-new-in-modular-java
Moved to https://slidr.io/azzazzel/what-s-not-new-in-modular-java
 
Moved to https://slidr.io/azzazzel/osgi-for-outsiders
Moved to https://slidr.io/azzazzel/osgi-for-outsidersMoved to https://slidr.io/azzazzel/osgi-for-outsiders
Moved to https://slidr.io/azzazzel/osgi-for-outsiders
 
Moved to https://slidr.io/azzazzel/osgi-fundamentals
Moved to https://slidr.io/azzazzel/osgi-fundamentalsMoved to https://slidr.io/azzazzel/osgi-fundamentals
Moved to https://slidr.io/azzazzel/osgi-fundamentals
 
Moved to https://slidr.io/azzazzel/leveraging-osgi-to-create-extensible-plugi...
Moved to https://slidr.io/azzazzel/leveraging-osgi-to-create-extensible-plugi...Moved to https://slidr.io/azzazzel/leveraging-osgi-to-create-extensible-plugi...
Moved to https://slidr.io/azzazzel/leveraging-osgi-to-create-extensible-plugi...
 
Moved to https://slidr.io/azzazzel/software-craftsmanship-in-the-era-of-softw...
Moved to https://slidr.io/azzazzel/software-craftsmanship-in-the-era-of-softw...Moved to https://slidr.io/azzazzel/software-craftsmanship-in-the-era-of-softw...
Moved to https://slidr.io/azzazzel/software-craftsmanship-in-the-era-of-softw...
 
Moved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterprise
Moved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterpriseMoved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterprise
Moved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterprise
 
Dynamic programming on .net
Dynamic programming on .netDynamic programming on .net
Dynamic programming on .net
 
IIS 6.0 and asp.net
IIS 6.0 and asp.netIIS 6.0 and asp.net
IIS 6.0 and asp.net
 
Website Latency Diagnostics
Website Latency DiagnosticsWebsite Latency Diagnostics
Website Latency Diagnostics
 
Web Performance Optimization @Develer
Web Performance Optimization @DevelerWeb Performance Optimization @Develer
Web Performance Optimization @Develer
 
Application Performance Testing Checklist
Application Performance Testing ChecklistApplication Performance Testing Checklist
Application Performance Testing Checklist
 
Moved to https://slidr.io/azzazzel/liferay-multi-channel-mobile-delivery-plat...
Moved to https://slidr.io/azzazzel/liferay-multi-channel-mobile-delivery-plat...Moved to https://slidr.io/azzazzel/liferay-multi-channel-mobile-delivery-plat...
Moved to https://slidr.io/azzazzel/liferay-multi-channel-mobile-delivery-plat...
 
OSGi for outsiders - Milen Dyankov
OSGi for outsiders - Milen DyankovOSGi for outsiders - Milen Dyankov
OSGi for outsiders - Milen Dyankov
 
Application Performance Monitoring (APM)
Application Performance Monitoring (APM)Application Performance Monitoring (APM)
Application Performance Monitoring (APM)
 
Microservices OSGi-running-with-apache-karaf
Microservices OSGi-running-with-apache-karafMicroservices OSGi-running-with-apache-karaf
Microservices OSGi-running-with-apache-karaf
 
Moved to https://slidr.io/azzazzel/what-is-a-portal
Moved to https://slidr.io/azzazzel/what-is-a-portalMoved to https://slidr.io/azzazzel/what-is-a-portal
Moved to https://slidr.io/azzazzel/what-is-a-portal
 

Ähnlich wie Moved to https://slidr.io/azzazzel/web-application-performance-tuning-beyond-xmx

Javaland 2017: "You´ll do microservices now". Now what?
Javaland 2017: "You´ll do microservices now". Now what?Javaland 2017: "You´ll do microservices now". Now what?
Javaland 2017: "You´ll do microservices now". Now what?André Goliath
 
Securing Rails
Securing RailsSecuring Rails
Securing RailsAlex Payne
 
Data oriented design and c++
Data oriented design and c++Data oriented design and c++
Data oriented design and c++Mike Acton
 
Kostiantyn Yelisavenko "Mastering Macro Benchmarking in .NET"
Kostiantyn Yelisavenko "Mastering Macro Benchmarking in .NET"Kostiantyn Yelisavenko "Mastering Macro Benchmarking in .NET"
Kostiantyn Yelisavenko "Mastering Macro Benchmarking in .NET"LogeekNightUkraine
 
Building frameworks: from concept to completion
Building frameworks: from concept to completionBuilding frameworks: from concept to completion
Building frameworks: from concept to completionRuben Goncalves
 
What Are We Still Doing Wrong
What Are We Still Doing WrongWhat Are We Still Doing Wrong
What Are We Still Doing Wrongafa reg
 
Scaling a Rails Application from the Bottom Up
Scaling a Rails Application from the Bottom Up Scaling a Rails Application from the Bottom Up
Scaling a Rails Application from the Bottom Up Abhishek Singh
 
Anything data (revisited)
Anything data (revisited)Anything data (revisited)
Anything data (revisited)Ahmet Akyol
 
Systems Monitoring with Prometheus (Devops Ireland April 2015)
Systems Monitoring with Prometheus (Devops Ireland April 2015)Systems Monitoring with Prometheus (Devops Ireland April 2015)
Systems Monitoring with Prometheus (Devops Ireland April 2015)Brian Brazil
 
Abusing the Cloud for Fun and Profit
Abusing the Cloud for Fun and ProfitAbusing the Cloud for Fun and Profit
Abusing the Cloud for Fun and ProfitAlan Pinstein
 
Velocity building a performance lab for mobile apps in a day - final
Velocity   building a performance lab for mobile apps in a day - finalVelocity   building a performance lab for mobile apps in a day - final
Velocity building a performance lab for mobile apps in a day - finalAshray Mathur
 
The Ember.js Framework - Everything You Need To Know
The Ember.js Framework - Everything You Need To KnowThe Ember.js Framework - Everything You Need To Know
The Ember.js Framework - Everything You Need To KnowAll Things Open
 
Teaching Elephants to Dance (Federal Audience): A Developer's Journey to Digi...
Teaching Elephants to Dance (Federal Audience): A Developer's Journey to Digi...Teaching Elephants to Dance (Federal Audience): A Developer's Journey to Digi...
Teaching Elephants to Dance (Federal Audience): A Developer's Journey to Digi...Burr Sutter
 
Smart Client Development
Smart Client DevelopmentSmart Client Development
Smart Client DevelopmentTamir Khason
 
Performance Oriented Design
Performance Oriented DesignPerformance Oriented Design
Performance Oriented DesignRodrigo Campos
 
TLV Data Plumbers: Exactly once processing
TLV Data Plumbers: Exactly once processingTLV Data Plumbers: Exactly once processing
TLV Data Plumbers: Exactly once processingalooma
 
The Yin and Yang of Software
The Yin and Yang of SoftwareThe Yin and Yang of Software
The Yin and Yang of Softwareelliando dias
 
A Bonus to the "Three Interviews About Static Analyzers" Article, or Intervie...
A Bonus to the "Three Interviews About Static Analyzers" Article, or Intervie...A Bonus to the "Three Interviews About Static Analyzers" Article, or Intervie...
A Bonus to the "Three Interviews About Static Analyzers" Article, or Intervie...Andrey Karpov
 
Building Hermetic Systems (without Docker)
Building Hermetic Systems (without Docker)Building Hermetic Systems (without Docker)
Building Hermetic Systems (without Docker)William Farrell
 
Design for Scale / Surge 2010
Design for Scale / Surge 2010Design for Scale / Surge 2010
Design for Scale / Surge 2010Christopher Brown
 

Ähnlich wie Moved to https://slidr.io/azzazzel/web-application-performance-tuning-beyond-xmx (20)

Javaland 2017: "You´ll do microservices now". Now what?
Javaland 2017: "You´ll do microservices now". Now what?Javaland 2017: "You´ll do microservices now". Now what?
Javaland 2017: "You´ll do microservices now". Now what?
 
Securing Rails
Securing RailsSecuring Rails
Securing Rails
 
Data oriented design and c++
Data oriented design and c++Data oriented design and c++
Data oriented design and c++
 
Kostiantyn Yelisavenko "Mastering Macro Benchmarking in .NET"
Kostiantyn Yelisavenko "Mastering Macro Benchmarking in .NET"Kostiantyn Yelisavenko "Mastering Macro Benchmarking in .NET"
Kostiantyn Yelisavenko "Mastering Macro Benchmarking in .NET"
 
Building frameworks: from concept to completion
Building frameworks: from concept to completionBuilding frameworks: from concept to completion
Building frameworks: from concept to completion
 
What Are We Still Doing Wrong
What Are We Still Doing WrongWhat Are We Still Doing Wrong
What Are We Still Doing Wrong
 
Scaling a Rails Application from the Bottom Up
Scaling a Rails Application from the Bottom Up Scaling a Rails Application from the Bottom Up
Scaling a Rails Application from the Bottom Up
 
Anything data (revisited)
Anything data (revisited)Anything data (revisited)
Anything data (revisited)
 
Systems Monitoring with Prometheus (Devops Ireland April 2015)
Systems Monitoring with Prometheus (Devops Ireland April 2015)Systems Monitoring with Prometheus (Devops Ireland April 2015)
Systems Monitoring with Prometheus (Devops Ireland April 2015)
 
Abusing the Cloud for Fun and Profit
Abusing the Cloud for Fun and ProfitAbusing the Cloud for Fun and Profit
Abusing the Cloud for Fun and Profit
 
Velocity building a performance lab for mobile apps in a day - final
Velocity   building a performance lab for mobile apps in a day - finalVelocity   building a performance lab for mobile apps in a day - final
Velocity building a performance lab for mobile apps in a day - final
 
The Ember.js Framework - Everything You Need To Know
The Ember.js Framework - Everything You Need To KnowThe Ember.js Framework - Everything You Need To Know
The Ember.js Framework - Everything You Need To Know
 
Teaching Elephants to Dance (Federal Audience): A Developer's Journey to Digi...
Teaching Elephants to Dance (Federal Audience): A Developer's Journey to Digi...Teaching Elephants to Dance (Federal Audience): A Developer's Journey to Digi...
Teaching Elephants to Dance (Federal Audience): A Developer's Journey to Digi...
 
Smart Client Development
Smart Client DevelopmentSmart Client Development
Smart Client Development
 
Performance Oriented Design
Performance Oriented DesignPerformance Oriented Design
Performance Oriented Design
 
TLV Data Plumbers: Exactly once processing
TLV Data Plumbers: Exactly once processingTLV Data Plumbers: Exactly once processing
TLV Data Plumbers: Exactly once processing
 
The Yin and Yang of Software
The Yin and Yang of SoftwareThe Yin and Yang of Software
The Yin and Yang of Software
 
A Bonus to the "Three Interviews About Static Analyzers" Article, or Intervie...
A Bonus to the "Three Interviews About Static Analyzers" Article, or Intervie...A Bonus to the "Three Interviews About Static Analyzers" Article, or Intervie...
A Bonus to the "Three Interviews About Static Analyzers" Article, or Intervie...
 
Building Hermetic Systems (without Docker)
Building Hermetic Systems (without Docker)Building Hermetic Systems (without Docker)
Building Hermetic Systems (without Docker)
 
Design for Scale / Surge 2010
Design for Scale / Surge 2010Design for Scale / Surge 2010
Design for Scale / Surge 2010
 

Kürzlich hochgeladen

英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfIdiosysTechnologies1
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 

Kürzlich hochgeladen (20)

英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdf
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 

Moved to https://slidr.io/azzazzel/web-application-performance-tuning-beyond-xmx

  • 1. @YourTwitterHandle#DV14 #YourTag @MilenDyankov#DV14 #beyondXmx Web application performance tuning beyond Xmx Milen Dyankov
  • 2. This talk is not about JVM and GC tuning ! Disappointed? You shouldn't be, there are plenty of other talks out there!
  • 3. This talk is not about Liferay either ! However you may want to check it out anyway! It is a great platform!
  • 4. This is not a university courseThis is not a university course on performance tuning!on performance tuning! I'm just sharing my personalI'm just sharing my personal experience with you!experience with you!
  • 6.
  • 7. Customer's statement: “It is very slow! You need to improve the performance!” What would you do?
  • 8. Customer's statement: “It is very slow! You need to improve the performance!” What would you do? Check the CPU andCheck the CPU and memory usagememory usage Check theCheck the JVM parametersJVM parameters Check the databaseCheck the database for slow queriesfor slow queries
  • 9. Check the CPU andCheck the CPU and memory usagememory usage Check theCheck the JVM parametersJVM parameters Check the databaseCheck the database for slow queriesfor slow queries While those are valid points, they are all the WRONG answer! Customer's statement: “It is very slow! You need to improve the performance!” What would you do?
  • 10. Ask to provideAsk to provide numbers!numbers! Ask to provideAsk to provide expectations!expectations! Ask to provideAsk to provide units!units! Customer's statement: “It is very slow! You need to improve the performance!” What would you do?
  • 11. Ask to provideAsk to provide numbers!numbers! Ask to provideAsk to provide expectations!expectations! Ask to provideAsk to provide units!units! Customer's statement: “It is very slow! You need to improve the performance!” What would you do? Make sure everyone uses the same definitions and units to describe both the status and the expectations!
  • 12. “It can only serve N users, we expect it to serve MxN users”
  • 13. “It can only serve N users, we expect it to serve MxN users” N users accessing the systemN users accessing the system at random times during given period!at random times during given period! N users accessing the systemN users accessing the system as a result of marketing campaign!as a result of marketing campaign! N users accessing the systemN users accessing the system every day between 8:00 and 8:15!every day between 8:00 and 8:15! consider these
  • 14. “It can only serve N users, we expect it to serve MxN users” N users accessing the systemN users accessing the system at random times during given period!at random times during given period! N users accessing the systemN users accessing the system as a result of marketing campaign!as a result of marketing campaign! N users accessing the systemN users accessing the system every day between 8:00 and 8:15!every day between 8:00 and 8:15! consider these Don't confuse ability to scale with performance tuning! Use unambiguous or less ambiguous units!
  • 15. Unambiguous Ambiguous Business Technical usersusers concurrent usersconcurrent users concurrent sessionsconcurrent sessions concurrent requestsconcurrent requests requests per secondrequests per second (M/K)bytes per second(M/K)bytes per second But keep in mind: sometimes being too technical leads to the wrong decisions! Use unambiguous or less ambiguous units!
  • 16. Consider this statement:Consider this statement: “N needs to travel from town A to town B. What is the fastest possible way?” But keep in mind: sometimes being too technical leads to the wrong decisions!
  • 17. Consider this statement: “N needs to travel from town A to town B. What is the fastest possible way?” M x But keep in mind: sometimes being too technical leads to the wrong decisions! Refinement: N is a group of M passengers
  • 18. Refinement: N is a group of M passengers Consider this statement: “N needs to travel from town A to town B. What is the fastest possible way?” But keep in mind: sometimes being too technical leads to the wrong decisions!
  • 19. How to do performance tuning?
  • 20. It's kind of like … … drawing an Owl! How to do performance tuning?
  • 21. ● First draw 2 ellipses! It's kind of like … … drawing an Owl! How to do performance tuning?
  • 22. ● First draw 2 ellipses! ● Then draw the rest of the damn Owl! It's kind of like … … drawing an Owl! How to do performance tuning?
  • 23. units = defineUnits(); expectations = defineExpectations(units); results = measurePerformance(); while (!results.match(expectations)) { component = findLowestPerforming(results); bottleneck = findBottleneck (component); remove(bottleneck); results = measurePerformance(); } Enough analogies! Let's try with an algorithm: How to do performance tuning?
  • 24. units = defineUnits(); expectations = defineExpectations(units); results = measurePerformance(); while (!results.match(expectations)) { component = findLowestPerforming(results); bottleneck = findBottleneck (component); remove(bottleneck); results = measurePerformance(); } Enough analogies! Let's try with an algorithm: How to do performance tuning?
  • 25. units = defineUnits(); expectations = defineExpectations(units); results = measurePerformance(); while (!results.match(expectations)) { component = findLowestPerforming(results); bottleneck = findBottleneck (component); remove(bottleneck); results = measurePerformance(); } Enough analogies! Let's try with an algorithm: How to do performance tuning?
  • 28. units = defineUnits(); expectations = defineExpectations(units); - results = measurePerformance() + data = collectData(); + results = analyze(data) while (!results.match(expectations)) { component = findLowestPerforming(results); bottleneck = findBottleneck (component); remove(bottleneck); - results = measurePerformance() + data = collectData(); + results = analyze(data) } Let's refine the algorithm: Application measurePerformance();measurePerformance();
  • 29. units = defineUnits(); expectations = defineExpectations(units); - results = measurePerformance() + data = collectData(); + results = analyze(data) while (!results.match(expectations)) { component = findLowestPerforming(results); bottleneck = findBottleneck (component); remove(bottleneck); - results = measurePerformance() + data = collectData(); + results = analyze(data) } Let's refine the algorithm: Application measurePerformance();measurePerformance();
  • 30. Browser Network Server JVM Container Application BrowserNetwork. . . collectData();collectData();
  • 31. Browser Network Server JVM Container Application BrowserNetwork. . . Take into account your target group! Respect “Cache-Control” and “Expires” headers ! Home page is not the main entrance anymore! Consider search results and referrals! Take ONLY what you REALLY need! Measure the impact of 3rd party code (analytics, ads, …)! collectData();collectData();
  • 32. Browser Network Server JVM Container Application BrowserNetwork. . . You are NOT the only creature in the space and time! Understand who else is using the same network, what for and when! A network is, what the name says – a net, not a line! There may be many networks and interfaces involved! Network traffic goes in two directions! No problem on the way in, does NOT mean no problem on the way out! (or vice-versa) collectData();collectData();
  • 33. Browser Network Server JVM Container Application BrowserNetwork. . . “Server” is one of the most ambiguous words ! Amazon, Jelastic, … are servers as well … but different! Virtual resources are … well, VIRTUAL! “… 3 VMs (8GB of RAM each) … oh the server has 16GB of RAM” Operating System will only tell you what you ask for ! nice, top, htop, atop, dstat, vmstat, ifstat, iostat, … collectData();collectData();
  • 34. Browser Network Server JVM Container Application BrowserNetwork. . . Know what your workers are doing! Regular thread dumps help find long running threads! Garbage collection of course! Everyone knows that! -verbose:gc -Xloggc:... -XX:+PrintGCDetails Tools are nice but they also consume resources! Don't measure having the profiler attached! collectData();collectData();
  • 35. Browser Network Server JVM Container Application BrowserNetwork. . . Policies, politics, preferences and common sense! Don't fight against windmills! Sessions tend to grow, last forever and … … replicate! Security, audits, transactions … ,Security, audits, transactions … , …… and interceptors in general!and interceptors in general! collectData();collectData();
  • 36. Browser Network Server JVM Container Application BrowserNetwork. . . Text Object XML Object JSON … !→ → → → → Simultaneous translation is not an easy job! Many a mickle makes a muckle!Many a mickle makes a muckle! Number of calls is as important as the time the call takes!Number of calls is as important as the time the call takes! Cache stats – hits, misses, invalidation, overflows, ... Not caching anything? Great! You just found the bottleneck! collectData();collectData();
  • 37. Browser Network Server JVM Container Application BrowserNetwork. . . Databases External storages Frameworks 3rd party services . . . Last, but not least, pay attention to all those little tiny things that makes an Owl look like an Owl! Oh and here is something that is valid for about everything we covered so far: You can really make use of another pair of eyes! collectData();collectData();
  • 38. “It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong.” Richard P. Feynman Do I really have to do all that? You better do! Here is why:
  • 39. Do I really have to do all that? You better do! Here is why:
  • 40. Even the guys behind BIG names sometimes don't do it right! 2014, Louvre Museum, Paris, France Do I really have to do all that? You better do! Here is why:
  • 41. THE USUAL SUSPECTS is a movie title not a problem solving strategy! Do I really have to do all that? You better do! Here is why:
  • 42. units = defineUnits(); expectations = defineExpectations(units); - results = measurePerformance() + data = collectData(); + results = analyze(data) while (!results.match(expectations)) { component = findLowestPerforming(results); bottleneck = findBottleneck (component); remove(bottleneck); - results = measurePerformance() + data = collectData(); + results = analyze(data) } Back to the algorithm:
  • 43. units = defineUnits(); expectations = defineExpectations(units); - results = measurePerformance() + data = collectData(); + results = analyze(data) while (!results.match(expectations)) { component = findLowestPerforming(results); bottleneck = findBottleneck (component); remove(bottleneck); - results = measurePerformance() + data = collectData(); + results = analyze(data) } Back to the algorithm:
  • 45. The Base Rate Fallacy When people have both generic and specific information, they tend to make judgments of probability based entirely upon specific information, leaving out the base rate. analyze(analyze(datadata););
  • 46. Congruence bias A hypothesis is tested only by thinking of results that would be found if that hypothesis is true. This heuristic, which many people seem to use, ignores alternative hypotheses analyze(analyze(datadata););
  • 47. units = defineUnits(); expectations = defineExpectations(units); - results = measurePerformance() + data = collectData(); + results = analyze(data) while (!results.match(expectations)) { component = findLowestPerforming(results); bottleneck = findBottleneck (component); remove(bottleneck); - results = measurePerformance() + data = collectData(); + results = analyze(data) } Back to the algorithm:
  • 48. units = defineUnits(); expectations = defineExpectations(units); - results = measurePerformance() + data = collectData(); + results = analyze(data) while (!results.match(expectations)) { component = findLowestPerforming(results); bottleneck = findBottleneck (component); remove(bottleneck); - results = measurePerformance() + data = collectData(); + results = analyze(data) } Back to the algorithm:
  • 49. I'm sorry! I don't have any universal solution yet! But I will be happy to give you some links, tips and warnings if you don't mind! remove(remove(bottleneckbottleneck););
  • 50. Browser Network Server JVM Container Application BrowserNetwork. . . “I sometimes go into a client site and got 3X improvements on performance just with some tuning of the operating system and the ways VMs are running.” Martin Thompson http://www.infoq.com/presentations/top-10-performance-myths Step out of the comfort zone! remove(remove(bottleneckbottleneck););
  • 51. Browser Network Server JVM Container Application BrowserNetwork. . . Avoid tuning by folklore! remove(remove(bottleneckbottleneck);); Don't copy JVM settings from various blogs! They are not meant to be for you!
  • 52. Browser Network Server JVM Container Application BrowserNetwork. . . Blocking vs Nonblocking Cache Data structures ( the famoust ArrayList vs LinkedList interview question is for a reason ) Method complexity ( StringBuilder vs String.concat ) Logging Know what the code you use actually do! remove(remove(bottleneckbottleneck););
  • 53. Browser Network Server JVM Container Application BrowserNetwork. . . Going multi-thread ! Going asynchronous ! Going modular! Going multi-vm ! Going distributed! Going off-heap! Get (more) things done! remove(remove(bottleneckbottleneck););
  • 54.
  • 55. SPECIAL CASE FOR FRAMEWORK AND LIBRARY DEVELOPERS Tuning the unknown! “A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.” The Hitchhiker's Guide to the Galaxy Douglas Adams
  • 56. There are 2382 configuration properties in Liferay 6.2 Make it configurable! SPECIAL CASE FOR FRAMEWORK AND LIBRARY DEVELOPERS Tuning the unknown!
  • 57. Document it ! There are 6896 lines of comments documenting Liferay 6.2 properties! SPECIAL CASE FOR FRAMEWORK AND LIBRARY DEVELOPERS Tuning the unknown!
  • 58. Provide reasonable defaults ! Example: # # If the user can unzip compressed HTTP content, # the GZip filter will zip up the HTTP content # before sending it to the user. This will speed up # page rendering for users that are on dial up. # com.liferay.portal.servlet.filters.gzip.GZipFilter=true SPECIAL CASE FOR FRAMEWORK AND LIBRARY DEVELOPERS Tuning the unknown!
  • 59. Provide performance results for most common cases! SPECIAL CASE FOR FRAMEWORK AND LIBRARY DEVELOPERS Tuning the unknown!
  • 60. @YourTwitterHandle#DV14 #YourTag @MilenDyankov#DV14 #beyondXmx Photo: http://www.flickr.com/photos/wwworks/4759535950/ http://www.liferay.com @Liferay http://www.facebook.com/Liferay milen.dyankov@liferay.com http://www.liferay.com/web/milen.dyankov/ @milendyankov @LiferayPL