Excellent article on Non-Paged Pool

Mark Russinovich has an excellent piece (here) on how ’non-paged pool’ memory sizes are calculated for various versions of Windows operating systems. As those of you who are dealing with high performance, high connection, server systems know, non-paged pool is one of those annoying system wide limits that can sometimes get in the way of servicing a large number of clients as every active I/O operation consumes some non-paged pool. The good news is that on Vista x64 systems and later the way that non-paged pool limits are calculated has changed and the limits are much higher.

As I’ve said on here before, exhausting non-paged pool can leave a machine in a very unstable situation and as such it’s good to profile your server and limit the number of connections that it can service to those that it can service safely. Of course profiling like this is a complex matter. Mark has a tool linked from his web page, NotMyFault, which can ’leak’ non-paged pool and so allow you to place a machine in an exhaustion, or near to exhaustion situation for testing.

Something else that interests me is that Mark’s Process Explorer tool can find and report the maximum size of the non-paged pool using dbghelp.dll and the windows symbol files. Knowing the size of the pool (and the rate at which I/O requests and other socket server related actions uses the pool) would enable me to build some safeguards to prevent non-paged pool exhaustion into The Server Framework itself… Something for me to think on.