Picking the right innodb_buffer_pool_size
Don't forget that InnoDB Buffer Pool Houses Data and Indexes
Please run this query
SELECT CONCAT(ROUND(KBS/POWER(1024,
IF(PowerOf1024<0,0,IF(PowerOf1024>3,0,PowerOf1024)))+0.49999),
SUBSTR(' KMG',IF(PowerOf1024<0,0,
IF(PowerOf1024>3,0,PowerOf1024))+1,1)) recommended_innodb_buffer_pool_size
FROM (SELECT SUM(data_length+index_length) KBS FROM information_schema.tables
WHERE engine='InnoDB') A,
(SELECT 3 PowerOf1024) B;
This will tell you how big the InnoDB Buffer Pool Needs to Be. Since you only have 24GB of installed RAM, then innodb_buffer_pool_size needs to be 18G (75% of installed RAM) or the query's suggestion, whichever is smaller.