Performance

Memcached Config For Drupal On Ubuntu

Memcached is a free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load

Memcached is used in Drupal mostly for caching Database queries in memory to improve authenticated user experience and reduce load on database. Primarily cache tables are swapped to have a memcached backend.

Find the Largest Table in a MySQL Database


SELECT CONCAT(table_schema, '.', table_name),
CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows,
CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA,
CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx,
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size,
ROUND(index_length / data_length, 2) idxfrac
FROM information_schema.TABLES
WHERE table_schema='database_name'

Site Benchmarking and Performance Improvement

Improving Site Performance:
1. Disable all caching in the site and do benchmark for anon user
2. Benchmark for auth user for a particular page
3. Check logs to see if any notice or error is happening in the site. Solve the issue and notice BM
4. Disable unwanted modules if any and do another benchmark. Note the diff.
5. Modify or update apache or mysql setting minor if any to see noticiable change in benchmark
6. Optimize PHP and see if noticeable difference occurs
7. Install Devel and check queries and page rendering times