I've been shutting down and restarting the server, but is there something short of that you can do to quickly recover from a high-paging situation?
Prevention is better than cure, so you should try to avoid such situations in the first place. If the problem is caused by uncontrolled growth of memory usage (eg. memory leaks) you could setup Monit to restart the monitored process once it exceeds a certain memory limit. If the traffic is spiky, you might consider throttling the number of requests. It's always better to handle less requests with reasonable performance instead of trying to serve everybody but extremely slowly.
Unfortunately there is no quick way if the system is paging a lot. If you are still able to access the system you can try to kill the most memory consuming processes.
will give you an idea on memory consumption. First column shows the resident set size, second the pid of the process and third the command executed.
Be patient and try to end the process by
If this does not work any more, try a