Advertisement
ioggstream

haproxy-troubleshooting

May 30th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.20 KB | None | 0 0
  1. ## Descrizione
  2.  
  3. mysql saturates its nproc limit (4k) with idle connections
  4. thanks for your support. We're organizing a call and checking your comments.
  5.  
  6. To reduce the impacts of this unbalanced distribution, can we configure mariadb to use thread_handling=pool-of-threads ?
  7.  
  8. From SHOW PROCESSLIST we got that many connections and threads.
  9.  
  10. count(id) user substring_index(host,':',1)
  11. 1183 neutron 10.20.105.31
  12. 848 nova 10.20.105.31
  13. 480 heat 10.20.105.31
  14. 406 keystone 10.20.105.31
  15. 241 nova_api 10.20.105.31
  16. 216 gnocchi 10.20.105.31
  17. 3 aodh 10.20.105.31
  18. 378 cinder 10.20.105.31
  19. 42 glance 10.20.105.31
  20. 1 root localhost
  21. 2 system user
  22.  
  23.  
  24. It seems that:
  25. - the applications don't do connection pooling (eg. neutron has >1k connections)
  26. - mysql saturates its nproc with idle threads
  27.  
  28.  
  29.  
  30. ## Analisi
  31.  
  32. Elencando il numero di processi connessi a mysql troviamo che haproxy ha circa 8k connessioni aperte verso mysql.
  33.  
  34. [root@c1f-ops-ctlp00 ~]# ss -twnp | grep 3306 | awk -F'"' '{d[$2]++; } END { for (k in d) {print k, d[k]}}' | sort -nk2
  35. 131
  36. beam.smp 1
  37. cinder-schedule 1
  38. nova-consoleaut 1
  39. sshd 1
  40. /usr/bin/python 1
  41. aodh-evaluator 2
  42. nova-scheduler 2
  43. glance-api 6
  44. cinder-volume 7
  45. cinder-api 46
  46. gnocchi-metricd 54
  47. httpd 154
  48. heat-engine 160
  49. nova-conductor 164
  50. neutron-server 388
  51. nova-api 443
  52. mysqld 4096
  53. haproxy 8192
  54.  
  55. Ecco la configurazione del server.
  56. MariaDB [(none)]> show variables like '%connect%';
  57. +--------------------------+-----------------+
  58. | Variable_name | Value |
  59. +--------------------------+-----------------+
  60. | character_set_connection | utf8 |
  61. | collation_connection | utf8_general_ci |
  62. | connect_timeout | 10 |
  63. | extra_max_connections | 1 |
  64. | init_connect | |
  65. | max_connect_errors | 10 |
  66. | max_connections | 8192 |
  67. | max_user_connections | 0 |
  68. +--------------------------+-----------------+
  69. MariaDB [(none)]> show variables like '%thread%';
  70. +-----------------------------------------+---------------------------+
  71. | Variable_name | Value |
  72. +-----------------------------------------+---------------------------+
  73. | aria_repair_threads | 1 |
  74. | binlog_optimize_thread_scheduling | ON |
  75. | debug_no_thread_alarm | OFF |
  76. | innodb_purge_threads | 1 |
  77. | innodb_read_io_threads | 4 |
  78. | innodb_thread_concurrency | 0 |
  79. | innodb_thread_concurrency_timer_based | OFF |
  80. | innodb_thread_sleep_delay | 10000 |
  81. | innodb_write_io_threads | 4 |
  82. | max_delayed_threads | 20 |
  83. | max_insert_delayed_threads | 20 |
  84. | myisam_repair_threads | 1 |
  85. | performance_schema_max_thread_classes | 50 |
  86. | performance_schema_max_thread_instances | 1000 |
  87. | pseudo_thread_id | 3429284 |
  88. | thread_cache_size | 8 |
  89. | thread_concurrency | 10 |
  90. | thread_handling | one-thread-per-connection |
  91. | thread_pool_idle_timeout | 60 |
  92. | thread_pool_max_threads | 500 |
  93. | thread_pool_oversubscribe | 3 |
  94. | thread_pool_size | 80 |
  95. | thread_pool_stall_limit | 500 |
  96. | thread_stack | 262144 |
  97. | wsrep_slave_threads | 1 |
  98. +-----------------------------------------+---------------------------+
  99. 25 rows in set (0.00 sec)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement