I offer onion hosting to the general public and I am having some issues with many hidden services when they share an instance of Tor with a very busy service. When there is a very busy hidden service the other users suffer from outages themselves. I run many instances of Tor and most of which have a bunch of users in them. Some users get moved to their own instances when they are busy.
My question is about monitoring the traffic of a particular hidden service on Tor's side of things, so I can identify busy hidden services. At the moment I merely monitor the resulting application traffic such as nginx logs. This is far from ideal because some hidden services when attacked don't go as far as making proper HTTP requests.
I am interested in monitoring the Tor process for an instance itself, and seeing the busiest hidden services. I would like to do this without using things like debug logging, but if that is my only chance let me know. I think that the control port interface could be used somehow to do this. I am proficient in Python programming and it coding is required it would be in that language.
Also, if you know some ways I can optimize Tor within its torrc configuration for doing lots of hidden services I would like to know.