Quantcast
Viewing all articles
Browse latest Browse all 18769

Several ways to be faster

There are several ways for one database engine to be faster than another. The obvious way is to use algorithms that are more clever and efficient. The less obvious way is to provide better performance monitoring. Database engines that support complex OLTP workloads tend to be complex. This is especially true when the workload is only affordable when using disk-based storage and conversational transactions. Complex engines frequently have great peak performance that can be difficult to duplicate on production workloads. Monitoring is the key to making production performance approach peak benchmark performance.

 

Percona frequently writes about this topic and I learn a lot from them. They have made it easier to diagnose performance problems in Percona Server and XtraDB.

 

I wish that other MySQL experts would write about this topic more frequently. I suspect they are more likely to encounter unpatched versions of MySQL that don't have the extra monitoring provided by patches and they have to work harder to diagnose the problems.

 

I will use the extra monitoring from the Facebook patch as an example. Below is a diff between the counters available in official MySQL 5.5.8 and the MySQL 5.1.52 plus the Facebook patch. Any line that starts with ">" is only in the Facebook patch.

 

0a1,8

> Innodb_adaptive_hash_hits

> Innodb_adaptive_hash_misses

> Innodb_adaptive_hash_pages_added

> Innodb_adaptive_hash_pages_removed

> Innodb_adaptive_hash_rows_added

> Innodb_adaptive_hash_rows_removed

> Innodb_adaptive_hash_rows_updated

> Innodb_background_drop_table_queue

2a11

> Innodb_buffer_pool_pages_dirty_pct

3a13,15

> Innodb_buffer_pool_pages_flushed_by_lru

> Innodb_buffer_pool_pages_flushed_by_list

> Innodb_buffer_pool_pages_flushed_by_single_page

5a18

> Innodb_buffer_pool_pages_lru_old

12a26,35

> Innodb_buffer_pool_flushed_adaptive

> Innodb_buffer_pool_flushed_free_margin_foreground

> Innodb_buffer_pool_flushed_free_margin_background

> Innodb_buffer_pool_flushed_max_dirty

> Innodb_buffer_pool_flushed_other

> Innodb_buffer_pool_flushed_preflush

> Innodb_buffer_pool_flushed_background_checkpoint

> Innodb_buffer_pool_flushed_foreground_checkpoint

> Innodb_buffer_pool_neighbors_flushed_from_list

> Innodb_buffer_pool_neighbors_flushed_from_lru

13a37

> Innodb_data_fsync_seconds

20a45,58

> Innodb_data_retried_reads

> Innodb_data_retried_writes

> Innodb_data_async_read_requests

> Innodb_data_async_read_bytes

> Innodb_data_async_read_svc_seconds

> Innodb_data_sync_read_requests

> Innodb_data_sync_read_bytes

> Innodb_data_sync_read_svc_seconds

> Innodb_data_async_write_requests

> Innodb_data_async_write_bytes

> Innodb_data_async_write_svc_seconds

> Innodb_data_sync_write_requests

> Innodb_data_sync_write_bytes

> Innodb_data_sync_write_svc_seconds

23a62,67

> Innodb_ibuf_merged_records

> Innodb_ibuf_merges

> Innodb_ibuf_inserts

> Innodb_ibuf_size

> Innodb_log_checkpoints

> Innodb_log_syncs

26a71,93

> Innodb_log_write_archive

> Innodb_log_write_background_async

> Innodb_log_write_background_sync

> Innodb_log_write_checkpoint_async

> Innodb_log_write_checkpoint_sync

> Innodb_log_write_commit_async

> Innodb_log_write_commit_sync

> Innodb_log_write_flush_dirty

> Innodb_log_write_other

> Innodb_log_sync_archive

> Innodb_log_sync_background_async

> Innodb_log_sync_background_sync

> Innodb_log_sync_checkpoint_async

> Innodb_log_sync_checkpoint_sync

> Innodb_log_sync_commit_async

> Innodb_log_sync_commit_sync

> Innodb_log_sync_flush_dirty

> Innodb_log_sync_other

> Innodb_lru_restore_loaded_pages

> Innodb_lru_restore_total_pages

> Innodb_mutex_os_waits

> Innodb_mutex_spin_rounds

> Innodb_mutex_spin_waits

34a102,103

> Innodb_purge_pending

> Innodb_records_in_range_seconds

35a105

> Innodb_row_lock_deadlocks

38a109

> Innodb_row_lock_wait_timeouts

44c115,135

< Innodb_truncated_status_writes

---

> Innodb_rwlock_s_os_waits

> Innodb_rwlock_s_spin_rounds

> Innodb_rwlock_s_spin_waits

> Innodb_rwlock_x_os_waits

> Innodb_rwlock_x_spin_rounds

> Innodb_rwlock_x_spin_waits

> Innodb_secondary_index_record_read_check

> Innodb_secondary_index_record_read_sees

> Innodb_srv_checkpoint_seconds

> Innodb_srv_background_checkpoint_seconds

> Innodb_srv_foreground_checkpoint_seconds

> Innodb_srv_free_margin_foreground_seconds

> Innodb_srv_free_margin_background_seconds

> Innodb_srv_ibuf_contract_seconds

> Innodb_srv_buf_flush_seconds

> Innodb_srv_purge_seconds

> Innodb_srv_main_sleep_seconds

> Innodb_transaction_commit_all

> Innodb_transaction_commit_with_undo

> Innodb_transaction_rollback_partial

> Innodb_transaction_rollback_total



PlanetMySQL Voting: Vote UP / Vote DOWN

Viewing all articles
Browse latest Browse all 18769

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>