It’s all about the right setup. If you have “beast” of the car, like Ferrari – you need to know how to drive it properly… and drive it on adequate roads or adjust its speed if you need to drive it on the slower roads.
It is similar for powerful plugins, such as Swift – you have to know how to setup it properly, to unleash its full power and speed up your site so much and use it adequately on weaker servers. We have Swift Pro installed on 30+ of our sites and never had similar issues. Maybe the following instructions could help you:
As for the high CPU usage:
While Swift is generating the cache, the CPU usage can be higher than usual. Swift is using more aggressive optimization than any other plugin on the market and it needs some CPU. Usually it isn’t an issue and CPU usage can be increased temporarily, but if it goes back to normal after prebuild finished, you don’t need to worry about it.
However, for large sites on relatively small server it can cause too high CPU usage temporarily. Actually, when the server is using CPU it is always using 100%. High usage means the CPU was used for a longer period.
If CPU usage is constantly higher you may need check the configuration. It is recommended to:
– Enable Compute API: Settings > General > Compute API
– Enable Optimize Prebuild Only: Settings > Optimization > General > Optimize Prebuild Only
– If you are not satisfied with Optimize Prebuild Only option, enable Optimize in background instead: Settings > Optimization > General > Optimize in Background.
– Exclude third party CSS: Settings > Optimization > Styles> Exclude 3rd Party CSS.
– Disable Generate Critical CSS as generating Critical CSS is the most CPU intensive process: Settings > Optimization > Styles> Generate Critical CSS.
– Exclude third party JS: Settings > Optimization > Scripts > Exclude 3rd Party Scripts.
– Set Cache Expiry Mode to Action based, if you are not using nonce or anything that can expire on frontend: Settings > Caching > General > Cache Expiry Mode: Action based.
– Enable Prebuild Cache Automatically: Settings > Caching > Warmup > Prebuild Cache Automatically.
– Setup lower Limit prebuild speed (recommended to use on limited shared hosting): Settings > Caching > Warmup > Prebuild Speed: Moderate (or Slow).
– Exclude post types that you wouldn’t like to cache. Autoconfig should find most and exclude them automatically but you can can add them manually: Settings > Caching > Exceptions> Exclude Post Types.
As for the cache size:
The average size of a cached page should be about 200-400Kb. That means if you have 1.000 pages the normal cache size will be about 2-400 Mb.
This usually happens if there are a very large number of pages or if there is a dynamic part in JS or CSS – some themes/plugins creates dynamic js and that is why the folder is filled up. Please enable separate CSS (styles) and separate JS (Scripts) in Optimization settings and also exclude unnecessary post types: autoconfig should find most and exclude them automatically but you can can add them manually: Settings > Caching > Exceptions> Exclude Post Types.
If you still don’t have enough space for this you should maybe consider to exclude some pages from cache, or upgrade to a larger hosting package.
-
This reply was modified 6 years, 2 months ago by Ivica Delic.