The following link is good for understanding how to (mainly designed for OS issues but can include networking/mysql bits)
In some cases rather than just copy someone else's work i link directly to their site.
Some of these may be duplicated in other areas but this page has been designed as a dumping ground for troubleshooting scripts/tips....
performance problems & partitioning https://blog.mayflower.de/353-Is-MySQL-partitioning-useful-for-very-big-real-life-problems.html
find more information on a process
check open php connections