MySQLDumper-Board Forum Index Follow me on Twitter

Portal  •   Forum  •  Downloads  •  Profile  •  Search   •  Register  •  Log in to check your private messages  •  Log in  •  


 CPU Usage during Backup

Post new topicReply to topic
Author Message
JNMann
uses MSD regulary
uses MSD regulary





Joined: 10 Apr 2011
Posts: 17


blank.gif

PostPosted: 2011-10-08, 21:33    CPU Usage during Backup Reply with quoteBack to top

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?

OfflineView user's profileSend private message    
Anzeigen











Posted:    Anzeigen Back to top


    
DSB
Developer
Developer




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


germany.gif

PostPosted: 2011-10-09, 12:26    (No subject) Reply with quoteBack to top

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.

OfflineView user's profileSend private messageSend e-mailVisit poster's website    
JNMann
uses MSD regulary
uses MSD regulary





Joined: 10 Apr 2011
Posts: 17


blank.gif

PostPosted: 2011-10-09, 18:22    (No subject) Reply with quoteBack to top

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.
OfflineView user's profileSend private message    
Proffie
knows MySQLDumper
knows MySQLDumper





Joined: 06 Dec 2011
Posts: 2


blank.gif

PostPosted: 2011-12-06, 20:22    (No subject) Reply with quoteBack to top

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

OfflineView user's profileSend private message    
DSB
Developer
Developer




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


germany.gif

PostPosted: 2011-12-06, 20:43    (No subject) Reply with quoteBack to top

« 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. Wink

_________________
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.

OfflineView user's profileSend private messageSend e-mailVisit poster's website    
Proffie
knows MySQLDumper
knows MySQLDumper





Joined: 06 Dec 2011
Posts: 2


blank.gif

PostPosted: 2011-12-08, 19:55    (No subject) Reply with quoteBack to top

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

OfflineView user's profileSend private message    
DSB
Developer
Developer




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


germany.gif

PostPosted: 2011-12-09, 22:10    (No subject) Reply with quoteBack to top

« 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.

OfflineView user's profileSend private messageSend e-mailVisit poster's website    
Display posts from previous:      
Post new topicReply to topic


 Jump to:   


Show permissions
Similar topics
Topic Author Forum Replies Posted
No new posts Ältere Beiträge und User aus früherem... abelius-kiel Allgemeine Fragen zu MySQLDumper 3 2012-04-22, 10:16 View latest post
No new posts Backup bricht ab Timm85 Fehler / Probleme 2 2012-04-21, 00:20 View latest post
No new posts Backup mit FTP ist leer pelikan1999 Gelöst/Erledigt 9 2012-04-07, 18:05 View latest post
No new posts Backup Error Vengeance66 Errors and questions 4 2012-04-02, 16:52 View latest post
No new posts Scheduling Daily Backup Under Windows vincentwansink Errors and questions 1 2012-03-24, 17:54 View latest post

 
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