My server (64GB,16CPUs) has mariadb 5.5.60.
The queries are around 500 selects /second and 300 inserts/seconds.
The queries are simple select of auth token and user details.
Both are properly indexed.
The insert query is also very simple.
However, the CPU usage is still high %cpu usage is >600%.
The following is the mysql config.
max_connections = 5000 max_user_connections=1000 key_buffer_size = 10024M myisam_sort_buffer_size = 512M read_buffer_size = 1G table_open_cache = 9000 thread_cache_size = 900 wait_timeout = 300 connect_timeout = 300 tmp_table_size = 8G max_heap_table_size = 4G max_allowed_packet = 10G net_buffer_length = 2048M max_connect_errors = 100 read_rnd_buffer_size = 2048M bulk_insert_buffer_size = 2G query_prealloc_size = 512M query_alloc_block_size = 128M transaction_alloc_block_size = 128M transaction_prealloc_size = 128M max_write_lock_count = 16 log-error external-locking=FALSE open_files_limit=50000 character-set-server = utf8 innodb_buffer_pool_size=40G table_cache=10G innodb_file_per_table=1 skip-name-resolve