Firstly, note that UpdraftPlus does not run any code on the front end of your site. (This can be verified by reading the source code). It checks, whenever loaded, that it is being called on the back-end – and hands back control immediately if not.
By its nature as a backup plugin, UpdraftPlus has to do this:
- Read every file resource on your website
- Read every row in every table in your database
- Run all the accumulated data through a zip-file compressor
- Write out the results to disk
As such, UpdraftPlus will use plenty of I/O (input/output) resources and CPU. You can’t create a backup without doing those things.
If your website is small – e.g. just made up of some blog posts, and reasonably-sized images, then all this may not amount to much. If, on the other hand, you’ve uploaded lots of large resources (e.g. videos, audio files, or huge images) or if your site is very big and popular (e.g. has vast numbers of comments), then it may amount to more. The impact of the above will be greater if your webserver and database server are on the same physical machine.
UpdraftPlus is designed to only run a single process at a time – i.e. no parallelisation. So, it can only use one CPU core at a time, and there can only ever be one UpdraftPlus process that is reading from disk or writing to disk at once. It will also be subject to any limits you (or your web hosting company) configure via the PHP or operating system configuration. As such, UD’s design means that it uses as low resources at a time as is possible.
Via only running a single process at once, UpdraftPlus is doing all it can from where it sits to limit its own resource usage. There really is no other “internal” solution that can work across the huge variety of hosting and server setups that exist. If you have particular requirements for your server, then you need to configure them at the server level.
If you are the one configuring/running the server, then you should also spend some time on tuning your server, particularly the database – a lot can be done here.
So, what can be done to limit resource usage if I don’t have access to configure the web server?
- Configure the timing of your backup to run overnight – via the “Fix Backup Time” add-on, if you don’t already have it. In the “small hours” of the morning, servers are usually very lightly loaded, with lots of spare resources.
- Make sure that your webserver really is adequate for the task. Experience has shown us that there are plenty of people who are “penny-wise, pound-foolish”. Bargain-basement web hosting that saves you a few dollars a month almost always comes with a trade-off. That trade-off is that resources are very tight. If your site is big or busy enough that backing it up requires significant resources, then it’s probably also having enough visitors that the bargain-basement web hosting is cutting performance enough to chase away some of those visitors. It’s worth noting here that a low-end VPS, despite the pricing, is likely to have less resources available than typical shared web hosting. (By “typical web hosting”, we’re not talking about the folks who are selling the ridiculously under-priced deals where resources are cut to the absolute bone, e.g. one.com). This is because on a low-end VPS, you get one CPU – which is shared between your operating system, web server + PHP engine, and the database server. If you’ve got a backup process which is read/writing your whole website, and you’re wanting to run the operating system and serve up web pages at the same time, then that means that each of those tasks is going to be getting swapped in and out from the CPU, because they can’t all use it at once. On a shared web host, there are usually many CPUs (up to 32), and you are time-sharing them – so as long as all websites aren’t all having their backups at the same time, then there should be enough resources to go around. Some web hosts have stricter systems which will limit your CPU and disk I/O usage even if there’s plenty of overall CPU power available on the system, though. They vary.
- Alternatively, if you have sufficient access and expertise, then you can run the backup job from the shell, and use your system’s “nice” and/or “ionice” commands to limit resources whilst it runs. (Those commands are on Linux, Mac and other UNIX-like systems – on Windows there will be a different solution).
- Check that you don’t have any plugins that create enormous, mostly useless, database tables (e.g. some statistics plugins that record a new row in the database for every single visitor).
- If you store a lot of files, then go into the ‘Expert settings’ section of the UpdraftPlus page, and reduce the default setting for how much data is stored in each zip file. e.g. Reduce it from the default of 400Mb down to 100Mb. This will mean that UpdraftPlus spends less time in manipulating large zip files – which can use a lot of resources and be quite time-consuming, especially on slower servers.
- If you have a collection of large, unchanging files (e.g. historic audio/video), then you could take a one-time backup of these, store them somewhere safe and then after that exclude them from the UpdraftPlus backup using the exclusion options in UpdraftPlus. That will then save the time/resource usage that zipping them up into the UpdraftPlus backup would have taken.