Announcements Official Site Related Announcements and News

Database maintenance this weekend

Thread Tools
 
Old Jun 13, 2008 | 12:33 PM
  #1  
cthree's Avatar
Thread Starter
Administrator
20 Year Member
 
Joined: Oct 2000
Posts: 20,274
Likes: 4
From: Toronto, Canada
Default Database maintenance this weekend

I'll be taking the site down tomorrow from 10AM till 5PM Eastern time (GMT-4) to do some long overdue and much needed database maintenance work. The database can't be changed while this is going on so the site must come down.

The result should be a faster database (and site) and one that is much easier to manage. Sorry for any inconvenience this causes but it needs to be done to make the site more reliable and faster.
Old Jun 13, 2008 | 12:39 PM
  #2  
Tadashi's Avatar
Registered User
 
Joined: Jul 2006
Posts: 22,407
Likes: 0
From: Montgomery, NY
Default

Thanks Erik

Thank God we have a group drive around here tomorrow


---
Ellen
Old Jun 13, 2008 | 01:00 PM
  #3  
j8mie's Avatar
20 Year Member
 
Joined: Apr 2006
Posts: 9,022
Likes: 1
From: There's no i in toast!
Default

Cheers for the headsup and for your continued efforts to keep this site up and running
Old Jun 13, 2008 | 10:17 PM
  #4  
MB's Avatar
MB
Member
Member (Premium)
 
Joined: Apr 2004
Posts: 33,838
Likes: 23
From: Sunshine Coast - England UK
Default

Old Jun 15, 2008 | 06:01 AM
  #5  
cthree's Avatar
Thread Starter
Administrator
20 Year Member
 
Joined: Oct 2000
Posts: 20,274
Likes: 4
From: Toronto, Canada
Default

I've completed a fairly lengthy database related optimization which should yield significant improvements. I'm sorry for the downtime but it was unavoidable and necessary to make this work.

First I dumped the entire database contents, some 16M rows, to an export file. I then reconfigured the database server from scratch choosing a configuration suited the hardware we are using.

The database of posts, topics, PMs, members, etc. was setup about 6 years ago based on what we had then. It still worked but but at the time we had much less capable hardware and software to run the database on. Many improvements have occurred in that time but we were trapped under design decisions made in days gone by which didn't take advantage of newer technology.

Once that was done I re-imported the database dump to create an entirely new database. I got that all done by just before 5PM and got the site back online.

In addition to simply dumping and recreating the database I also started to monitor those database operations which were taking an extra ordinary amount of time. Retrieving some topic pages was taking in excess of 30 seconds. I've been experimenting with ways to improve those queries and managed to come up with some very significant improvements on the order of 1000x. Some queries which took 60 seconds have been redesigned and in some cases I broke them down into multiple simpler queries and now complete in just a few milliseconds.

There are still a few problem areas which I will continue to monitor and redesign but I think I got many of the most often encountered performance problems under control (I hope).

Thanks again for your patience. I assure you it was worth the effort.
Old Jun 15, 2008 | 07:10 AM
  #6  
ricosuave's Avatar
Registered User
20 Year Member
 
Joined: Oct 2000
Posts: 4,686
Likes: 0
From: Richmond, VA
Default

certainly appreciate the work you've put into this.
Old Jun 15, 2008 | 07:26 AM
  #7  
AquilaEagle's Avatar
Administrator
Gold Member (Premium)
20 Year Member
Liked
Loved
Community Favorite
 
Joined: Jan 2002
Posts: 95,183
Likes: 69
From: Heath & Reach, Beds, UK
Default

Erik, will the work you did on the database and queries possibly have solved the multi moderation issues we had previously?

Trending Topics

Old Jun 15, 2008 | 12:19 PM
  #8  
cthree's Avatar
Thread Starter
Administrator
20 Year Member
 
Joined: Oct 2000
Posts: 20,274
Likes: 4
From: Toronto, Canada
Default

No. The MM feature recounts the posts each time it moves things and that is an expensive operation. To fix that the code needs to change so that it adds and subtracts the posts it moves from the counts rather than lazily recounting each forum from scratch. I've made a note.
Old Jun 15, 2008 | 12:44 PM
  #9  
AquilaEagle's Avatar
Administrator
Gold Member (Premium)
20 Year Member
Liked
Loved
Community Favorite
 
Joined: Jan 2002
Posts: 95,183
Likes: 69
From: Heath & Reach, Beds, UK
Default

I understand.

You're making lots of notes Erik
Old Jun 15, 2008 | 04:34 PM
  #10  
cthree's Avatar
Thread Starter
Administrator
20 Year Member
 
Joined: Oct 2000
Posts: 20,274
Likes: 4
From: Toronto, Canada
Default

104 items on my to-do list and counting.



All times are GMT -8. The time now is 07:56 AM.