Very slow Insert and update on 20 core 250 Gb RAM dedicated MYSQL 5.5 server on Ubuntu Most of the data is in tbl_user_ads. Its a huge table. 

Many concurrent processes (over 1000) try to select, insert or update this table.

The CPU utilization is just around 2%.

As I increase the number of processes which access this table the performance drops further.

I am getting lots of deadlocks.

Thanks for your time and help.

innodb status

my.cnf customizations:

innodb_buffer_pool_size=220G
innodb_buffer_pool_instances = 4
innodb_flush_log_at_trx_commit = 0
innodb_log_buffer_size=2048M
innodb_log_file_size = 1024M
innodb_flush_method = O_DIRECT
innodb_write_io_threads = 16
innodb_read_io_threads = 16
innodb_locks_unsafe_for_binlog = 1
innodb_lock_wait_timeout = 100
EDIT: after reading threw it, I noticed that your limiting it to 16 threads?
"innodb_read_io_threads = 16"
your server has 20 cores of cpu, and therefor you will only use a very small amount of CPU, try adding more threads and report back if it makes any difference,other then that i can't think of any thing else!

it may be due to server load, the fact that you have 20 cores may be useless, if the program can't multithread, whats your specs and general overall server load? other then that, I can't really think of any thing else that may be causing this.