Jump to content
  • entries
    227
  • comments
    4,390
  • views
    101,421

Whoosh: Database Optimization


Binkmeister

285 views

Have ya ever noticed how crawly BZP gets after a while? I sure do. But where everybody else gets to just complain about it, yours truly is the one who actually has to do something about it.

 

We get lots and lots of hits a day... about 2.5 million, actually. That's a lot of database traffic. Every forum and blog page hit, as well as every news story page, has at least one database call - sometimes up to a dozen per page. So the DB traffic gets measured in number of hits per second, and sometimes the number climbs into the 50s or more. That's a lot of processing, and the poor DB gets tired after a while.

 

Well, not tired so much as fragmented. We have routines that we run (and when I say "we" I mean "I') every once in a while to help speed things up. After the Invision Power Board upgrade, we whizzed along with rarely any slowdowns. But as time went on, things started to lag more and more. Hours and hours of research unearthed a few database commands that I can use to get everything back up to the legal speed limit again.

 

But they take several hours to run, and I have to babysit them.

 

It looks like it's getting to be that time again. Routine queries are taking longer and longer, and the site is getting swamped with DB queries mired in molasses. It's been about a month since I did the last set of optimizations, so it looks like it would be a good idea to do this on a monthly basis.

 

So, to make a long story not so long, I'll be taking the site offline for a few hours sometime over the weekend so I can run the optimization routines. I try to do it relatively late at night, which is one of the few benefits of living on the Left Coast of the US... my 10 p.m. is 1 a.m. for all youse East-Coasters. And believe youse me... er, you'd better believe that Binkums needs his beauty sleep. Boy howdy. So I won't be up too late.

 

Just one of the many benefits of being an administrator. It's not all pranking the staff and sitting pretty, no sirree. Well, maybe for Dimensioneer. But not this boy, nope. I earn my keep.

 

Oh, on a side note... this blog entry is being written sitting on the sofa downstairs, where it's nice 'n cool, on my spiffy new work-provided Dell laptop. WiFi's awesome. This laptop is the only decent thing to come from my employer in many months. But if I could trade it to get rid of the stomach pains lately, I would - in a heartbeat.

 

[EDIT] The database maintenance is completed. Took a little over 1.5 hours. It'll take some time to build back up the table caches so it runs faster, probably by tomorrow morning.

 

7 Comments


Recommended Comments

2 a.m for me^^ I wonder what makes the DB tired though.....And your getting stomach pains..so is my dad....So you got a dell? Nah I never really like dells....Well at least your employer for once did something for you. :)

Link to comment

12:00 midnight for me.

 

 

.......nice employer, have a cookie. c'mon, you know you want it.... *whistles softly*

 

hope you can recoup those hours of lost sleep. mesa feels sorry for you.

Link to comment

Would only allowing members to view most of the forums cut down on the Db load? A lot of forums do that, and i guess there must be a reason...

LN

Link to comment

No, it's Winders. Of course. But I spit in the face of convention - I installed Second Life... heh heh.

What is Second Life? Is it an operating system?

-Toa Of Justice

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...