# xtrabackup is using 100% of my CPU, how can I limit it?

**URL:** <https://forums.percona.com/t/xtrabackup-is-using-100-of-my-cpu-how-can-i-limit-it/7118>\
**Category:** Percona XtraBackup\
**Created:** [July 17, 2019, 9:15am UTC](https://forums.percona.com/t/xtrabackup-is-using-100-of-my-cpu-how-can-i-limit-it/7118 "2019-07-17T09:15:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![IGGt](https://avatars.discourse-cdn.com/v4/letter/i/67e7ee/32.png) [@IGGt](https://forums.percona.com/u/IGGt)\
**Post date:** [July 17, 2019, 9:15am UTC](https://forums.percona.com/t/xtrabackup-is-using-100-of-my-cpu-how-can-i-limit-it/7118/1 "2019-07-17T09:15:47Z")

</div>

I have recently updated my MySQL databases from 5.5 to 5.7.26. I am using xtrabackup to back these up. However, on MySQL 5.7 it is using 100% of my CPU, whereas on 5.5 it only used around 60%.

The servers are both the same specification (1 x CPU, 8 GB RAM). The 5.5 database servers were using xtrabackup 2.4.9, whereas the 5.7 databases are using 2.4.15.

The code I am running is:

```auto
xtrabackup ${MySQLConnectionString} --backup --compress --compress-threads=4 --slave-info --safe-slave-backup --extra-lsndir="${LogsDir}" --target-dir="${CurrentDir}" 

```

Is there something I can set to limit the CPU amount it is using to less than 100%?

---

<div class="post-metadata">

**Author:** ![IGGt](https://avatars.discourse-cdn.com/v4/letter/i/67e7ee/32.png) [@IGGt](https://forums.percona.com/u/IGGt)\
**Post date:** [July 18, 2019, 4:12am UTC](https://forums.percona.com/t/xtrabackup-is-using-100-of-my-cpu-how-can-i-limit-it/7118/2 "2019-07-18T04:12:49Z")

</div>

I have also tried this with

```auto
--parallel=1

```

and

```auto
--compress-threads=1

```

, but it seems to make no difference.

---

<div class="post-metadata">

**Author:** ![IGGt](https://avatars.discourse-cdn.com/v4/letter/i/67e7ee/32.png) [@IGGt](https://forums.percona.com/u/IGGt)\
**Post date:** [July 18, 2019, 7:45am UTC](https://forums.percona.com/t/xtrabackup-is-using-100-of-my-cpu-how-can-i-limit-it/7118/3 "2019-07-18T07:45:43Z")

</div>

So, using

```auto
--throttle=5

```

seems to pip it at around 60% on my test server, so I guess I need to experiment with that to see how high I can push it for any given database.

---

<div class="post-metadata">

**Author:** ![lorraine.pocklington](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/lorraine.pocklington/32/37_2.png) [@lorraine.pocklington](https://forums.percona.com/u/lorraine.pocklington)\
**Post date:** [July 18, 2019, 7:47am UTC](https://forums.percona.com/t/xtrabackup-is-using-100-of-my-cpu-how-can-i-limit-it/7118/4 "2019-07-18T07:47:32Z")

</div>

Let me share this insight with the development engineers in case they have anything to add with that new bit of information. Will post back in the next day or so if we have anything for you.

---

<div class="post-metadata">

**Author:** ![lorraine.pocklington](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/lorraine.pocklington/32/37_2.png) [@lorraine.pocklington](https://forums.percona.com/u/lorraine.pocklington)\
**Post date:** [July 18, 2019, 8:00am UTC](https://forums.percona.com/t/xtrabackup-is-using-100-of-my-cpu-how-can-i-limit-it/7118/5 "2019-07-18T08:00:29Z")

</div>

OK, one more suggestion for you to try pinpointing the issue.  
You could try to use perf record with xtrabackup and then post the output of perf report …
