During backup mysql runs at 100% CPU for 10 hours - visitors face very slow site

During backup mysql runs at 100% CPU for 10 hours - visitors face very slow site

by Norbert Berger -
Number of replies: 9
I am running my Moodle site via EasyPhP on Windows 2000 Pro, with 1 GB of RAM and an AMD XP2800+ processor. Regular backups of all courses, users etc start at 22:00 and run until 8:30 in the morning every other day now. Data in courses amounts to under 2 GB, over 100 courses, and about 800 students registered. Have scheduled disk maintenance jobs for alternate nights. Task manager reports mysql runs at 100% CPU during those hours, other processes are minimal.

The site grinds down to a halt for visitors during those hours. Has anyone experienced similar problems? Any solutions that might remedy this short of not backing up?

Norbert
Average of ratings: -
In reply to Norbert Berger

Re: During backup mysql runs at 100% CPU for 10 hours - visitors face very slow site

by Darren Smith -
Yes, I experienced exactly the same thing when upgrading to 1.5.

I can't remember what the cpu was at but similar situation in terms of courses (I think we are 150+) and data (some courses require large graphic/media uploads).

It wasn't a problem before the upgrade - backups were unnoticeable. After the upgrade things would slow down the essentially stop for a while when the zip was being processed. Speed up for a little bit and then go through the same process again for the next backup. Our backups started around midnight and would appear to go on through until well into the afternoon!

Our solution - we turned off backup! Don't panic. What happens now is (I think!) the whole contents of the disk are copied across to another server using a simple copy script on a server - not using moodle backup. It obviously takes a while to copy across all of those gigs of data but we now just do it once a week and obviously the moodle server processor isn't hit trying to create all of those zips. The database is backed up in a similar way.
In reply to Darren Smith

Re: During backup mysql runs at 100% CPU for 10 hours - visitors face very slow site

by Norbert Berger -
Hi Darren

Thanks for the reply and the suggestion.. I thought of such a workaround but would really appreciate if anyone in the moodle community fixed this function. Just found the backup and restore forums and will try my luck there.

Norbert
In reply to Darren Smith

Re: During backup mysql runs at 100% CPU for 10 hours - visitors face very slow site

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
With such hardware 10 hours is a lot!

Has anybody a comparison between Windows and Linux for the same job on same hardware?
In reply to Visvanath Ratnaweera

Re: During backup mysql runs at 100% CPU for 10 hours - visitors face very slow site

by Darren Smith -
I haven't got a comparison but just a quick note to say my experience above was on a linux server running the latest fedora core.

Normally on reading a post such as Norbert's I would have put it down to using windows / easyphp but our linux server is a beefy dual processor with plenty of RAM and disk space.
In reply to Visvanath Ratnaweera

Svar: Re: During backup mysql runs at 100% CPU for 10 hours - visitors face very slow site

by Joar Herseth -
backup:
linux apache, 1GB mem P4 3GHZ-  2GB in moodle data dir 1650 users 250 courses: takes 9 minutes to make a sql file of the database, tar gz /var/www, and copy this to another server.
In reply to Joar Herseth

Re: Svar: Re: During backup mysql runs at 100% CPU for 10 hours - visitors face very slow site

by Scott Horsley -
This is actually occuring in a lot of places based on this thread. I am noticing the same thing on a system running quite a large school. After the upgrade the system now takes 10+ hours to back up. I start the cron at 12am (midnight) and it sometimes failed to finished before midday. During this time, Mysql is chewing out 100% of the cpu and the system is almost unusable. I normally destroy the process and things return to normal.

I am curious as to what the backup script actually does, if all it does is copy the data than I can remove it but if it is involved in anything else than I am a little nervous about removing the actual process all together.

Any feedback would be muchly appreciated

Scott
In reply to Scott Horsley

Re: Svar: Re: During backup mysql runs at 100% CPU for 10 hours - visitors face very slow site

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
Be sure to have a 1.5.2+ version later dan 1/9 -> there was a bug fix at that time in backup.
In reply to koen roggemans

Re: Svar: Re: During backup mysql runs at 100% CPU for 10 hours - visitors face very slow site

by Gavin McCullagh -
Speaking of which, does anyone know roughly when 1.5.3 will be released?

Gavin
In reply to Gavin McCullagh

Re: Svar: Re: During backup mysql runs at 100% CPU for 10 hours - visitors face very slow site

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
you get my vote wink - please with optimised lang packs included big grin

Of course, I understand making a release is a time consuming business and with a lot to do for the fascinating 1.6 coming closer every day, there are more usefull things to do then spending time on making a new release (with the need of release notes etc).
I hope every Moodle admin realises it never causes any harm to update to a new + version from time to time, especially when you experience some trouble. From that point of view, there is a new release daily cool

Is it possible to put a datestamp on a + version please (eg when hovering the moodle icon release number - build date )?