I'd expect any cpu load caused by optimizations to settle down fairly quickly -- unless:
- your cache is not large enough - this will cause resources to be optimized over and over.
- your resource urls (images/css/js) change with a very high frequency
Running PageSpeed optimization on websites with user generated content should not pose a problem in itself.
If your cache is undersized (check the hit/miss rates) you might want to try this:
- Move the disk cache away from tmpfs and give it more disk space, to get the available space to match the 5X recommendation.
- Configure a large LRU instead. Note that the LRU memory required will be multiplied by the amount of nginx workers you are running.
To control the load caused by optimizations, either initially or because of massive user contributed content,
you could have a look at:
and limiting the number of concurrent image optimizations:
Otto