Very slow cache processing: Is there any alternative? I have some Drupal sites and the one common problem on them: very large cache with very slow processing and therefore the sites work very slow. I have enabled all caches and set them to long lifetime. But the sites are still slow.
My server has 4GHz frequency and 4G RAM. DB queries log shows me that all queries takes 100-300ms summary.

When I perform profiling with xhprof I see that the largest part of wall time is used by serialize, unserialize and array_map functions. So i suppose it is because of large amount of serialized data stored in cache. So the data can be get from DB quickly but is processed by CPU very slowly.

So what should I do with the issue? 
How can I reduce cached data amout or store not serialized data in cache?
If a large part of your time is spent with serialize then that might point to some broken code; as in things keep getting serialized to be stored in the cache/db but it keeps on having a cache miss, otherwise you should only see unserialize with heavy cache usage.

The pattern you're pointing to sounds like you have some code that is abusing the variables table. Inside variable_initialize() it runs array_map with serialize, and variable_set() calls serialize. I would check the max_allowed_packet value inside of MySQL; my preference is to set it to 32M.

If you can provide more details, I can give you a better answer. I will say that using PHP7 should give you a big speedup if you haven't done so.