The document discusses various techniques for optimizing performance of a Mura CMS website. It covers server tuning including optimizing the web server configuration, compressing static assets, and setting far future expires headers. It also discusses Java Virtual Machine tuning and database optimization. For Mura tuning, it recommends settings in the Mura admin such as enabling site caching and restricting access. It provides code examples for optimizing primary navigation, using the CacheOMatic tag, implementing CfStatic, and using ShowTrace for debugging.
13. Agenda
Server Tuning
We’ll take a look at a few common areas that often
need tuning
Web Server
JVM settings
14. Agenda
Server Tuning
We’ll take a look at a few common areas that often
need tuning
Web Server
JVM settings
DB
15. Web Server
Check the following
1. Is the web server configured according to load?
16. Web Server
Minimal Apache Config
StartServers 1
MinSpareServers 1
MaxSpareServers 3
MaxClients 50
MaxRequestsPerChild 4000
17. Web Server
Heavy Load Apache Config
StartServers 18
MinSpareServers 20
MaxSpareServers 55
MaxClients 600
MaxRequestsPerChild 4000
18. Web Server
Check the following
1. Is the web server configured according to load?
2. Are static assets being gzipped?
19. Web Server
MOD_DEFLATE EXAMPLE
LoadModule deflate_module libexec/apache2/
mod_deflate.so
<IfModule mod_deflate.c>
# html, xml, css, and js:
AddOutputFilterByType DEFLATE text/html text/
plain text/xml text/css text/javascript
</IfModule>
20. Web Server
Check the following
1. Is the web server configured according to load?
2. Are static assets being gzipped?
3. Are far future expires headers set?
21. Web Server
MOD_EXPIRES EXAMPLE
LoadModule deflate_module libexec/apache2/mod_deflate.so
<IfModule mod_expires.c>
Header set cache-control: public
ExpiresActive on
# set default
ExpiresDefault "access plus 24 hours"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType text/html "now"
</IfModule>
22. Static Assets
Get the assets to the browser as fast as possible
1. Minify your JS and CSS
23. Static Assets
Get the assets to the browser as fast as possible
1. Minify your JS and CSS
2. Combine as much JS into one file. Same goes for CSS
24. Static Assets
Get the assets to the browser as fast as possible
1. Minify your JS and CSS
2. Combine as much JS into one file. Same goes for CSS
3. Load as much JS near the end of the HTML file
25. Static Assets
Get the assets to the browser as fast as possible
1. Minify your JS and CSS
2. Combine as much JS into one file. Same goes for CSS
3. Load as much JS near the end of the HTML file
By doing this, the site will ‘feel’ much faster.
27. JVM Tuning
Minimum / Maximum Heap Size
-Xms384m -Xmx512m
For best performance, always make sure the maximum is
set to 512m or greater. If your server has the free ram
available, this is a great way to increase performance.
28. JVM Tuning
Maximum Permanent Heap Size
-XX:MaxPermSize=256m
XX:MaxPermSize specifies the the maximum size for the
permanent generation heap, a heap that holds objects
such as classes and methods.
32. Mura Tuning
Now lets take a look at what we can tune in Mura
First up, settings you can change in the admin
33. Mura Tuning
Now lets take a look at what we can tune in Mura
First up, settings you can change in the admin
On deck, what we can do with code to reduce the
server workload
34. Admin Settings
There are a few key settings in the Mura admin to look for
Site Caching
Session Tracking
Restrict Access
35. Admin Settings
Site Caching
Enable caching on production Mura instances
Reduces the workload on the DB and CFML engine
Cache Capacity
Sets a hard limit on how many cached items
Cache Free Memory Threshold
Keeps a specified % free for other proccesses
36. Admin Settings
Session Tracking
Can cause a huge strain on the database
Consider using Google Analytics
When performance is critical, consider disabling
session tracking
37. Admin Settings
Restrict Access
Be strategic about how content is restricted
Restricting a section is far more effective
Mura must calculate the permissions for each page
request
39. Code
Primary Navigation
Set viewDepth to 1 at most
Use the CacheOMatic tag to eliminate server load
40. Code
CacheOMatic tag
Use the CacheOMatic tag when possible
Navigation is a great use case
Database output - lists, tables
Ability to set a timespan to keep output fresh
Ability to set a unique key - useful for mobile, users
45. Code
ShowTrace
Shows you what’s going on under the hood of Mura
Helpful to debug production instances, where enabling
server debugging is problematic
Mura adds tracepoints to custom events to help debug
slow code
46. Code
Custom feed sorting / limits
If possible limit the rows returned
Try not to sort by extended attributes
If you can’t avoid, then make sure the feed is very
targeted -- limit work for the DB