WebGUI Performance Tuning · Performance Tuning 2004 WebGUI User’s Conference. The Rules • Your...
Transcript of WebGUI Performance Tuning · Performance Tuning 2004 WebGUI User’s Conference. The Rules • Your...
WebGUI Performance Tuning
2004 WebGUI User’s Conference
The Rules
• Your mileage may vary
• Tuning can only do so much
• You can tune everything (hardware, software, network)
• Tuning WebGUI means tuning what WebGUI uses
Hardware Tuning
Pretuning• Research before you buy
• Compatibility
• Benchmarks
• Cheap hardware is usually slower
• Less cache
• Less efficient micro-controllers
Hard Disks
• The weakest link
• SCSI is faster than IDE
• RAID affects speed
• More spindles with smaller disks
Hardware Software
• Bad software slows good hardware
• Stay up to date
• drivers
• kernels
Software Tuning
Apache
• mod_perl
• KeepAlive Off
• Keeping Apache hot
• MinSpareServers
• MaxSpareServers
• StartServers
• mod_gzip
WebGUI
• Delete plug-ins from your config file that you don’t use
• Empty your trash and clipboard regularly
• Set your message board posts to be archived at intervals right for your site
HTML
• Dislocate your stylesheet to a file on the filesystem (collateral manager)
• Minimize the nesting of tables and divs
• Specify hard sizes on your images
preload.perl
• Use it!
• Add wobject, macros, and other plug-ins
• Remove the references to plug-ins you don’t use
• Enable Apache::DBI
MySQL
• Up max_connections to 1000
• Consider increasing buffers
• key_buffer=256M
• myisam_sort_buffer_size=64M
• query_buffer_size=5000
• sort_buffer=2M
• record_buffer=2M
MySQL (cont)• max_allowed_packet=16M
• Keep threads hot
• thread_cache=8
• thread_concurrency=4
• thread_stack=128K
• table_cache=512
WebGUI Caching
• Set your page caching as high as possible
• Export heavy and heavily traffic’d pages to static HTML
• Use in-memory templates if you have enough RAM
Network Tuning
Dislocate MySQL
MySQLApache /WebGUI
DBI
Replicate MySQL
MySQLMaster
Apache /WebGUI
MySQLSlave
MySQLSlaveDBI
MySQL Replication
Set Up A File Server
Apache /WebGUI
Apache /Static Files
SMB or NFS
Use a Proxy
Apache w/mod_proxy
Apache /WebGUI
HTTP
Load Balance
Apache /WebGUI
Load Balancer
Apache /WebGUI
Apache /WebGUI
File Server
HTTPNFS or SMB
Everything
Load Balancer
Apache /WebGUI
Apache /WebGUI
MySQL Master
HTTPNFS or SMBDBIMySQL Replication
Apache /Static Files
MySQL Slave
Network Setup
• Use 100MB or 1GB between servers
• Keep everything on a clean switch
• Use multiple network cards
• 1 for each server function
• 1 for utility functions such as backups and logins
Load Balancer Configuration
• Good - simple round robin
• Better - monitor processor, memory, hard disk, and network load; send requests to least used servers
• Don’t load balance on IP address
Localization
• Peer your site on as many backbones as possible
• Use local cache servers
Questions?