Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High CPU use #104

Closed
planetahuevo opened this issue Jul 7, 2017 · 8 comments
Closed

High CPU use #104

planetahuevo opened this issue Jul 7, 2017 · 8 comments
Assignees

Comments

@planetahuevo
Copy link

@planetahuevo planetahuevo commented Jul 7, 2017

Hi,
I am having a big CPU use when backing my server up with phpbu.
I am only using myslqdump and tar so I suspect that TAR is the problem being a lot of files to pack.
I have found this which could be a great feature to add.
https://unix.stackexchange.com/questions/39722/preventing-tar-from-using-too-much-cpu-and-disk-old-laptop-crashes-if-100

Of course being able to do incremental backups and things like that will be better but the solution on that link is a much easier solution for the meantime.

Thanks!

@j7an
Copy link

@j7an j7an commented Aug 22, 2017

Would using Percona XtraBackup add to the high CPU or reduce it since it supports "hot backup"?

@sebastianfeldmann
Copy link
Owner

@sebastianfeldmann sebastianfeldmann commented Aug 22, 2017

I'm a bit confused. The problem here is that combining and compressing a lot of small files with tar could lead to a high CPU usage.
In case of XtraBackup for MySQL the execution of any backup adds to the CPU usage.
My experience with "hot backup" with XtraBackup is that the load increase is recognizable but not a big problem. Of course, this always depends on your use case and your environment.

@planetahuevo
Copy link
Author

@planetahuevo planetahuevo commented Aug 22, 2017

Yep, for me, I think TAR is the problem and not MySQL.

@planetahuevo
Copy link
Author

@planetahuevo planetahuevo commented Aug 29, 2017

Hi, do you have any ETA for this?
Last backup took 100% of the CPU for 4 hours... that is too much to handle...
It is a 10Gb website but adding the pipeline option will solve this problem.
Thanks!

@sebastianfeldmann
Copy link
Owner

@sebastianfeldmann sebastianfeldmann commented Aug 30, 2017

No real ETA but I hope I can have a look at this soonish ;)

sebastianfeldmann added a commit that referenced this issue Aug 30, 2017
@sebastianfeldmann
Copy link
Owner

@sebastianfeldmann sebastianfeldmann commented Aug 30, 2017

I just added a new option to the tar source

<option name="throttle" value="5m" />

This way it will pipe its stream via pv make sure you have it installed.
To test this you can install dev-master. I will release version 5.0.2 hopefully later this evening.

@sebastianfeldmann
Copy link
Owner

@sebastianfeldmann sebastianfeldmann commented Aug 30, 2017

phpbu 5.0.2 is out you can have a look at the documentation

@planetahuevo
Copy link
Author

@planetahuevo planetahuevo commented Sep 1, 2017

Uau. Amazing. Thank you very much.
Installing and testing 5.0.2 today. I will let you know how it goes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.