I have added code snippet in question.
* Web server and db server running on 16GB machine. Its running on my local machine. 16GB ram.
* No network changes. I am trying everything on local
* Yes the code is custom code. UI & backend code
* 5GB of database size
* Yes we have Kentico Kinspector on site