emergency weblog; or: epersonae; or: elaine nelson

in which I write about stuff

server optimization

interesting conversation, lots of tips

Categories: conference notes, drupal, pnwds, Professional

“because I have crashed servers that weren’t optimized” indeed.

suggestion from Adam (at lunch) to look at the actual theme(s) that were used with themekey, see if those have any squirrelly sql-type stuff in them. (also, I wonder about the recent memory upgrade. maybe I should just *try* it and see what happens.)

shared hosting (ie this site), virtual private server (no personal experience), dedicated server (ie, work)

apache: RAM hog. 20mb+ usage? list of items: keepalivetimeout – time waiting to kill process. 1-3 seconds for drupal. maxclients – simultaneous connections. maxrequestsperchild – don’t want to force unnec restarts. no caching for authenticated users! big issue for an intranet. advanced caching module? static & dynamic content on different apache servers. intriguing. image sprites may be more useful than zlib. ramdisk for most commonly used files. memcached daemon. loadmodule.conf file, remove unused (apache) modules.

mysql – pick good option file. my-huge.conf. log slow queries. (set for abt 5 secs) need to fix all to get improved performanced. query caching, in config file for mysql, 124mb (?). innodb tables, supposed to be good for writing a lot.

php – php cache option, accelerators (like Zend, APC) apc apparently to become standard w/php6. 2 confi options in php.ini: max_execution_time (30 secs, but test!), memory_limit, usually turns to 124/148mb.

load testing. ab = apache benchmark. ab -n 50 -c 2 http://example.com gives a command-line report.

performance monitoring – uptime, free -m. if all memory is in swap, you don’t have enough ram.

top -d: how to see what processes are using how much.

vmstat: input/output speed.

wtf is this app, for performance monitoring? nagios? yes: http://www.nagios.org/

based on a question: nginex – for the static stuff, then apache only does the dynamic. or I think I hear someone saying they use it for the whole thing instead of apache.

what’s causing overload, apachetop or top to see what process. apachetop sounds really useful. also a mysqltop. cacti.

better to use performance-related modules or do stuff on the server? getting a balance between overcaching & undercaching. don’t want to double-compress.

reduce css calls. I’ve got to dig back into that.

gtmetrics (gpmetrics?)

far-future expiration headers. yslow was really helpful, and almost all front-end.

pressflow – install profile? fork. http://pressflow.org/

Comment feed

Comments are closed.