Langsom LAMP webserver - hvor er flaskehalsen? (innodb?)
Jeg har en webserver, der bliver dræbende langsom i spidsbelastningsperioder - nogle sidevisninger tager pludselig op mod et minut.Jeg mistænker at innodb er sat dårligt op, men i princippet famler jeg i blinde.
Det er en production-maskine, så jeg har holdt mig lidt tilbage fra at tage de store chancer, i forhold til at skrue på settings.
Nogen der kan komme med et indspark til hvor jeg bør starte min fejlsøgning?
Maskinen:
* Intel Xeon E3-1275V2 - Red.PS
* 2x HDD 3,0 TB SATA
* 1x SSD 240 GB SATA
* 4x RAM 8192 MB DDR3 ECC
Den virtuelle maskine der er sat op til LAMP har fået 12GB RAM tildelt, med mulighed for mere, hvis det gavner noget.
mysql -e "SHOW VARIABLES LIKE 'innodb%'" giver mig:
1 Variable_name Value
2 innodb_adaptive_flushing ON
3 innodb_adaptive_hash_index ON
4 innodb_additional_mem_pool_size 8388608
5 innodb_autoextend_increment 8
6 innodb_autoinc_lock_mode 1
7 innodb_buffer_pool_instances 1
8 innodb_buffer_pool_size 2147483648
9 innodb_change_buffering all
10 innodb_checksums ON
11 innodb_commit_concurrency 0
12 innodb_concurrency_tickets 500
13 innodb_data_file_path ibdata1:10M:autoextend
14 innodb_data_home_dir
15 innodb_doublewrite ON
16 innodb_fast_shutdown 1
17 innodb_file_format Antelope
18 innodb_file_format_check ON
19 innodb_file_format_max Antelope
20 innodb_file_per_table OFF
21 innodb_flush_log_at_trx_commit 1
22 innodb_flush_method
23 innodb_force_load_corrupted OFF
24 innodb_force_recovery 0
25 innodb_io_capacity 300
26 innodb_large_prefix OFF
27 innodb_lock_wait_timeout 50
28 innodb_locks_unsafe_for_binlog OFF
29 innodb_log_buffer_size 8388608
30 innodb_log_file_size 5242880
31 innodb_log_files_in_group 2
32 innodb_log_group_home_dir ./
33 innodb_max_dirty_pages_pct 75
34 innodb_max_purge_lag 0
35 innodb_mirrored_log_groups 1
36 innodb_old_blocks_pct 37
37 innodb_old_blocks_time 0
38 innodb_open_files 300
39 innodb_print_all_deadlocks OFF
40 innodb_purge_batch_size 20
41 innodb_purge_threads 0
42 innodb_random_read_ahead OFF
43 innodb_read_ahead_threshold 56
44 innodb_read_io_threads 4
45 innodb_replication_delay 0
46 innodb_rollback_on_timeout OFF
47 innodb_rollback_segments 128
48 innodb_spin_wait_delay 6
49 innodb_stats_method nulls_equal
50 innodb_stats_on_metadata ON
51 innodb_stats_sample_pages 8
52 innodb_strict_mode OFF
53 innodb_support_xa ON
54 innodb_sync_spin_loops 30
55 innodb_table_locks ON
56 innodb_thread_concurrency 0
57 innodb_thread_sleep_delay 10000
58 innodb_use_native_aio ON
59 innodb_use_sys_malloc ON
60 innodb_version 5.5.40
61 innodb_write_io_threads 4