Is the high load caused by web2py process or postgresql? Is web2py on the same machine as postgresql?
Use top or htop to find which process uses the CPU. If it is web2py *use* the profiler. If it postgres try to find the bad query and try to improve it by using EXPLAIN. Could be also the swapping causing the troubles. On VPS nodes remember to lower the swappines (see sysctl) to n < 20 or remove swap completely. mic 2012/5/10 Ross Peoples <ross.peop...@gmail.com>: > The DB layer is usually the bottleneck. However, moving from models to > modules should reduce any bottleneck caused by the web server.