Made some changes to the database setup

Little or nothing to do with distillation.

Moderator: Site Moderator

Post Reply
User avatar
Husker
retired
Posts: 5031
Joined: Thu Aug 17, 2006 1:04 pm

Made some changes to the database setup

Post by Husker »

Do people see any improvements in performance on the site? I think it is faster, but on this crappy laptop, it is pretty hard to tell.

I am hoping that with these changes, the database corruption we have been seeing (about every month), will be a thing of the past (fingers crossed).

H.
Hillbilly Rebel: Unless you are one of the people on this site who are legalling distilling, keep a low profile, don't tell, don't sell.
beowoulfe
Novice
Posts: 97
Joined: Mon Aug 29, 2011 6:17 am
Location: It's sunny here

Re: Made some changes to the database setup

Post by beowoulfe »

Thanks, I for one would have blown myself up or poisoned myself by now if it weren't for this site.
"Patriotism is supporting your country all the time and your government when it deserves it."
--Mark Twain
Ayay
Distiller
Posts: 1656
Joined: Tue Sep 16, 2008 1:25 am
Location: Planet Erf...near the bottom.

Re: Made some changes to the database setup

Post by Ayay »

Well done Husker! Everything I click opens instantly. Writing a post, submitting it, then editing it and seeing it updated in the forum all happens without delay.
cornflakes...stripped and refluxed
The Baker
Master of Distillation
Posts: 4674
Joined: Sun Aug 27, 2006 4:48 am
Location: Northern Victoria, Australia

Re: Made some changes to the database setup

Post by The Baker »

Don't know if it is what you just did but it is going like a rocket tonight.
Which is good because I can glance at the posts and quickly move on to the ones that are relevant to what I do.
Thanks.
The Baker
User avatar
Husker
retired
Posts: 5031
Joined: Thu Aug 17, 2006 1:04 pm

Re: Made some changes to the database setup

Post by Husker »

I am hopeful that with the database 'tuning' that things will work a lot faster, and actually perform better with our hosting system, than it did before. The DB will not cache a lot more in memory, thus hitting the physical disk a lot less (in theory). From the small amount of time, since I have made this change, things do seem very snappy. Response time for rendering a full page, even on my horrible system is well under a second, and that is for just about any page. Prior to this, it varied, between 1 and 5s (sometimes longer). We were also having crashing of certain tables, causing the site to go down, about monthly. That is the main concern I have. If that gets fixed, and the site gets sped up as a bonus, then I will be very happy. I am very hopeful, that is the exact situation we have now.

H.
Hillbilly Rebel: Unless you are one of the people on this site who are legalling distilling, keep a low profile, don't tell, don't sell.
rad14701
retired
Posts: 20865
Joined: Wed Dec 19, 2007 4:46 pm
Location: New York, USA

Re: Made some changes to the database setup

Post by rad14701 »

These tweaks do seem to be making the boards more responsive... You must have been making changes when I was getting errors last night... HAven't seen any today, so far... Fingers crossed... :thumbup:
User avatar
Husker
retired
Posts: 5031
Joined: Thu Aug 17, 2006 1:04 pm

Re: Made some changes to the database setup

Post by Husker »

The crash of the phpbb3_sessions db last night, triggered my digging into what can be done to optimize the DB.

WARNING, techno babble to follow. This may put most people to sleep.

'Fixing' (rebuilding), the sessions DB is pretty trivial. Also, pretty safe, because if there is a bad record, and it is lost, it does not really matter. That user will simply get a new session key the next time they log in. The only time this 'could' make any difference at all, is if a bot is using the sid (session id), in it's file naming (i.e. a bot that is multi-socketing, but trying to keep a single session 'view' to the server), then until that bot rolls through the changed pages it is pulling, and re-pulls the forum index pages, it will be downloading 0 byte files. But for 'normal' users, this is never a problem. They simply get a new server session, and proceed forward.

However, EVER having to rebuild that table (and having it crash consistently), was showing that 'something' was not right in the DB. Yes, easy to fix, but we should not be having to do that time and time again.

I am really hoping that the DB tweaks have solved the problem. We were having multiple threads hitting REAL files, at the same time, locking them (just a hypothesis by me, but I think it is a very likely cause of the problem). Now, most of those read/writes will be done into memory cache, and thus, will not have the file locking issues to cause problems. The DB will flush any real writes out to disk, when the DB is not 'busy'. As long as the updates and commits are handled properly (and they 'should'), then more caching should help resolve these type issues, IF it really is this issue.

Fingers still crossed .....

Note, if this DOES work much better, I may remove all time aging of session files, within phpbb, and simply write a cron script, to perform an update, and scrap all sessions, that are more than a week old. Removing the 'cleanup' from happening within phpbb, causes that update to happen only when my cron script runs (probably once a day), compared to happening every page load (and possibly more often than that), if phpbb is used to age those records.

H.
Hillbilly Rebel: Unless you are one of the people on this site who are legalling distilling, keep a low profile, don't tell, don't sell.
rad14701
retired
Posts: 20865
Joined: Wed Dec 19, 2007 4:46 pm
Location: New York, USA

Re: Made some changes to the database setup

Post by rad14701 »

Husker, your techno-babble makes sense to me... :ewink: But, then again, we're IT Geeks... :lolno:

:eugeek:
rtalbigr
Distiller
Posts: 2200
Joined: Wed Nov 17, 2010 2:25 am
Location: Tennessee

Re: Made some changes to the database setup

Post by rtalbigr »

Husker, your techno-babble makes NO sense to me, but the site is much faster, pages are coming up almost instantly, so thanks for all your hard work!

Big R
"Necessity is the plea for every infringement of human freedom. It is the argument of tyrants; it is the creed of slaves." William Pitt
Samohon
retired
Posts: 3432
Joined: Mon Oct 05, 2009 4:22 am
Location: Somewhere in the UK...

Re: Made some changes to the database setup

Post by Samohon »

There is a substantial speed improvement H, at least on my Archlinux rig...

Was wondering why the site was giving me errors too last night...Thanks H, its all been for the best... :thumbup:
♦♦ Samohon ♦♦

Beginners should visit The New Distillers Reading Lounge and the Safety and Related Issues among others...
Post Reply