Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Tối ưu hóa Drupal
Search
Lê Thanh Sang
July 18, 2013
Research
0
130
Tối ưu hóa Drupal
Slide của Sang trình bày các vấn đề để tối ưu hóa cho Drupal.
Lê Thanh Sang
July 18, 2013
Tweet
Share
Other Decks in Research
See All in Research
Weekly AI Agents News!
masatoto
25
24k
Matching 2D Images in 3D: Metric Relative Pose from Metric Correspondences
sgk
1
320
Weekly AI Agents News! 7月号 論文のアーカイブ
masatoto
1
230
Weekly AI Agents News! 9月号 論文のアーカイブ
masatoto
1
120
TransformerによるBEV Perception
hf149
1
440
LLM時代にLabは何をすべきか聞いて回った1年間
hargon24
1
500
The Fellowship of Trust in AI
tomzimmermann
0
130
marukotenant01/tenant-20240916
marketing2024
0
510
非ガウス性と非線形性に基づく統計的因果探索
sshimizu2006
0
370
秘伝:脆弱性診断をうまく活用してセキュリティを確保するには
okdt
PRO
3
740
Zipf 白色化:タイプとトークンの区別がもたらす良質な埋め込み空間と損失関数
eumesy
PRO
6
710
工学としてのSRE再訪 / Revisiting SRE as Engineering
yuukit
19
11k
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
Bash Introduction
62gerente
608
210k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
How STYLIGHT went responsive
nonsquared
95
5.2k
We Have a Design System, Now What?
morganepeng
50
7.2k
Building Adaptive Systems
keathley
38
2.3k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
A Philosophy of Restraint
colly
203
16k
Docker and Python
trallard
40
3.1k
Transcript
Optimize Drupal Make your Drupal site faster Thursday, July 18,
13
Lê Thanh Sang • http://drupal.org/user/204321 • Skype: mr.lamphong • 5
years with Drupal • Captain of Sang.IO • Senior Drupal Developer at GO1 Thursday, July 18, 13
Agenda • Hardware • WebServer • Drupal • FrontEnd •
Monitor Thursday, July 18, 13
Hardware • Many CPU as possible • Faster disk IO
as possible (Sata < SAS < SSD < PCI Flash) Thursday, July 18, 13
Web Server • Reverse Proxy • Nginx for static file
• Percona Database server • PHP-FPM + Opcode (APC, Xcache, eAccelerator) • Redis or Memcache Thursday, July 18, 13
Web Server - Reverse Proxy • Use nginx or varnish
• Cache content on RAM (Create a mount point using tmpfs) • Allow flush cache on Internal IP. Use purge module on Drupal. Thursday, July 18, 13
Web Server • Using nginx if you can. Apache is
fine, use Reverse Proxy for faster. • Using mod_pagespeed (http:// code.google.com/p/modpagespeed/) • For nginx: https://github.com/pagespeed/ ngx_pagespeed Thursday, July 18, 13
Database Server • PerconaDB or MariaDB • Don’t use same
server with Drupal if you can. • Use master for write • Slave replication for read Thursday, July 18, 13
PHP-FPM • Running via socket (faster than TCP/IP) • Only
install extension we need • Set max_request • Turn off log for production Thursday, July 18, 13
Drupal • Use Pressflow (Require PHP 5) • Block cache
• Redis cache • Authenticated cache • Remove slow module (Statistics, admin_menu, tagadelic, nice menus) • Using xdebug or xhprof for profiling Thursday, July 18, 13
Drupal theme • Never use a function in the tpl
file, always on the preprocess function • In tpl only print variables • Only use hook_theme (theme, process, preprocess) Thursday, July 18, 13
Drupal search • Don’t use default DB search • Use
search_api • Solr or Elastic Search Thursday, July 18, 13
FrontEnd • Browser can send 4~6 request per domain (2
for IE). • CSS/JS aggregation • CDN, Gzip compression, sprites, image optimization (Done if using mog_pagespeed) Thursday, July 18, 13
Summary Upgrade your hardware is alway a best solution Thursday,
July 18, 13
Monitor munin monit vnstat htop Thursday, July 18, 13
Question? Lê Thanh Sang
[email protected]
Thursday, July 18, 13