| Author |
Message |
JNMann
uses MSD regulary

Joined: 10 Apr 2011
Posts: 17

|
Posted:
2011-10-08, 21:33 CPU Usage during Backup |
  |
I run mysqldumper once an hour on my forum site. Whilst running I can see CPU usage through my cpanel shoot up to 100%.
Is this normal please?
|
|
  |
 |
Anzeigen
|
Posted:
Anzeigen |
 |
|
| |
 |
DSB
Developer


Age: 41
Joined: 30 Apr 2004
Posts: 16067
Location: Reichenberg bei Würzburg

|
Posted:
2011-10-09, 12:26 (No subject) |
  |
Yes. Fully backing up the database with all records causes a high load on the server. I wouldn't run this once an hour. I would do it once a day. Better do it in the night when there are only a few members online.
_________________ Gruß / Greetings, DSB
Teigwaren heißen Teigwaren, weil sie Teig waren.
Diejenigen, die lautstark darüber diskutieren, warum es nicht geht, mögen bitte jene nicht stören, die es gerade tun.
|
|
    |
 |
JNMann
uses MSD regulary

Joined: 10 Apr 2011
Posts: 17

|
Posted:
2011-10-09, 18:22 (No subject) |
  |
The backup only takes 2 minutes or so, just one database being backed up. Never had problems before but now I'm on a cloud shared sever I can see the load. I'd prefer to have more regular backups but maybe once or twice a day will have to suffice.
|
|
  |
 |
Proffie
knows MySQLDumper

Joined: 06 Dec 2011
Posts: 2

|
Posted:
2011-12-06, 20:22 (No subject) |
  |
I am having the same problem. When CPU reaches 100%, the webhost starts to place restrictions which seems to often cause a table to crash. CPU usage can be controlled with PHP backups, but the speed control appears to have no effect whatsoever on PERL backups. Also, I can't see how to set charset for PERL backups.
I would simply use PHP backup to control the problem, but I do not believe it is possible to run the PHP backup from a CRON job.
Please advise how I can get around this problem.
Thanks
|
|
  |
 |
DSB
Developer


Age: 41
Joined: 30 Apr 2004
Posts: 16067
Location: Reichenberg bei Würzburg

|
Posted:
2011-12-06, 20:43 (No subject) |
  |
« Proffie » wrote: When CPU reaches 100%, the webhost starts to place restrictions which seems to often cause a table to crash.
If this really is the case then switch the webhost. MySQLDumper only reads the tables. This cannot cause a crash of a table!
Quote: CPU usage can be controlled with PHP backups, but the speed control appears to have no effect whatsoever on PERL backups.
Yes. The number of records that are read in one go is set in the perl configuration file (mysqldumper.conf.php) and is set automatically to 10000. You could edit that file and reduce this value but you need to do that manually.
Quote: Also, I can't see how to set charset for PERL backups.
It is set in crondump.pl in line 74. If you need to change this, do it here. But watch what you are doing. Normally there is no reason to change this.
Quote: I would simply use PHP backup to control the problem, but I do not believe it is possible to run the PHP backup from a CRON job.
If this would work we wouldn't have coded the Perl script.
_________________ Gruß / Greetings, DSB
Teigwaren heißen Teigwaren, weil sie Teig waren.
Diejenigen, die lautstark darüber diskutieren, warum es nicht geht, mögen bitte jene nicht stören, die es gerade tun.
|
|
    |
 |
Proffie
knows MySQLDumper

Joined: 06 Dec 2011
Posts: 2

|
Posted:
2011-12-08, 19:55 (No subject) |
  |
Thanks for your support, really appreciate it.
From what I can tell, when the CPU reaches maximum the webhost throttles the script. I think this causes it to crash, leaving a connection open to a table or maybe leaving the table locked which is why a repair is then needed. I'm no expert at MySQL, and it has taken a while to find out what has been causing the errors but it was definitely related to the high CPU during backup. The webhost is cheap!
I've had to reduce the number down a lot to keep the CPU in check, but this should do the trick. The MySQL server is default utf8, but the database I am backing up is latin1 so I assume it is better to backup with latin1 encoding.
Thanks again
|
|
  |
 |
DSB
Developer


Age: 41
Joined: 30 Apr 2004
Posts: 16067
Location: Reichenberg bei Würzburg

|
Posted:
2011-12-09, 22:10 (No subject) |
  |
« Proffie » wrote: The MySQL server is default utf8, but the database I am backing up is latin1 so I assume it is better to backup with latin1 encoding.
No, you don't need to do that. All characters of latin1 are included in utf8 so there is no problem.
_________________ Gruß / Greetings, DSB
Teigwaren heißen Teigwaren, weil sie Teig waren.
Diejenigen, die lautstark darüber diskutieren, warum es nicht geht, mögen bitte jene nicht stören, die es gerade tun.
|
|
    |
 |
|
|
CrackerTracker © 2004 - 2012 CBACK.de
Powered by Orion based on phpBB
© 2001, 2002 phpBB Group
CBACK Orion Style based on FI Theme
All times are GMT + 2 Hours
phpBB SEO
|