SMF strikes again, while it's not the direct cause, it's certainly part of the problem.
SMF tracks who's online, which is fine, but it also lumps guest tracking into the same table. This is also fine except for two things.
1) It stores the current status of the user as a PHP serialised string, this includes fields like current forum and thread the user is in. It then uses `LIKE` (aka, substring) searches in this text field to determine these values. This is SLOW, and beyond ridiculous.
I have solved this by adding two columns to the table for these fields and altered SMF to populate them correctly and use them for the lookups.
2) When SMF generates the number of users online vs guest stats on the bottom of the page, it does it the worst way possible. It selects EVERY record from the table, guest or not, and if the record isn't associated with a guest, it increments a counter as it iterates over the data set. When we get totally spammed like today, the table fills up with 100k+ "guest/null" entries. This means that on every page load, 100k+ records are pulled from the database, just to count them.

I have solved this by limiting the first query to non-guests only and then running a second `select count(*) from...` query to get the guest count.
While this doesn't solve the bot crawling issue, it should hopefully help to keep things responsive during these high load periods.
Here is the before & after implementing the change, CPU load graph:
