Hi all! I've been working on some performance-related stuff today and figured I should post an update.

Firstly, I have to say that the new servers have been (from a corruption standpoint), rock-solid. That means we haven't been hard-crashing every 30 hours as a result of slow erosion of the database, nor have we been forced to recover a database off the slave server (YAY!)

However, our new servers are not without their gremlins. You may have noticed the site has been somewhat slow off and on, and even unresponsive at times. In fact, I hear Titania and her team are putting together a new Subeta Weather Bureau to try and forecast some of these lag storms. In the meantime though, I thought I'd explain what's going on.

Normally more powerful servers are a good thing. After all, faster servers should mean a faster site, right? As it turns out, not always.

One of the main measures of how fast servers are is how many processors ("cores") it has. Your average desktop or laptop computer has 1 or 2 cores. Subeta's database servers have 8 cores. More cores allows the server to do more things at once. Great, right?

Unfortunately, there can also be downsides to having more cores. To understand why, imagine this: let's say you have 2 people, and they're both getting their picture taken. So they play rock paper scissors to decide who gets to go first, and then they take turns posing for the camera. Everything's smooth.

Now let's say there are 8 people. Now they all start fighting amongst each other, trying to decide who gets to go first. In the meantime, no pictures are being taken.

The same thing happens with complicated programs (like a database) running on really powerful computers. Lots of cores means the database creates lots of different threads to take advantage of those cores, and the threads compete for resources. This doesn't always work so well: sometimes the threads end up fighting over resources like disk access and access to protected memory, and spend so much time fighting that no queries are being answered.

It's this effect that's been affecting Subeta off and on since we moved to the new servers. For some reason, the combination of resources and server capacity is past some critical level where it's actually slowing things down rather than providing a speed-up.

Unfortunately, MySQL is such a complicated program, there is no easy way to determine what combination of settings is causing these concurrency issues. It's a matter of tuning the server through trial-and-error to see what mitigates (and hopefully eventually eliminates) this effect.

If this explanation confuses you, a less accurate analogy is that of a car. At slow speeds, the car wheels grip the road and move the car forward. But if the driver puts his foot on the gas, the car's wheels can spin in place, spinning very quickly but not going anywhere. That's kind of what Subeta does when it locks up... mysql CPU usage climbs to 800% (100% x 8 cores) but actual use of the CPU to do work drops to a mere 4%, down from 30-40% normally.

Anyway, I hope that was understandable enough. The long and short of it is, we're working hard to track down what's causing the lag and get rid of it. And apart from the occasional lag storms, the new servers have proved to be 10 times as stable as we were before.

-Alex


December 31, 1969, 7:00 pm by SilveryBeing
Avatar Border
User Avatar

Glad you are taking the time to explain all of this to us. Thank you! :3

December 31, 1969, 7:00 pm by Saddlebred
User Avatar

Thank you so much for all your hard work, Alex! I really love how you take the time to explain these things to us too. You do a great job!

December 31, 1969, 7:00 pm by RegeneRegetta
User Avatar

Thanks for the update Alex. ♥ You are very much loved.

December 31, 1969, 7:00 pm by Chook_865
User Avatar

Thanks for the great explanation. Hope you get things sorted out.

December 31, 1969, 7:00 pm by miz_gadget
User Avatar

"It's this effect that's been affecting Subeta off and on since we moved to the new servers. "

The proper use of affect and effect. I think I love you, Alex! Thanks for the information, as always you explained things quite well. <3

December 31, 1969, 7:00 pm by Deleted User

Thanks for explaining what's been going on. Keep up the good work!

December 31, 1969, 7:00 pm by Deleted User

Kind of reminds me of how our government works. lol! Thanks for keeping us informed!

December 31, 1969, 7:00 pm by tiatsuchi
User Avatar

Well, I'm sure we all appreciate your hard work in researching how to solve this issue.

December 31, 1969, 7:00 pm by nmagelet
Avatar Border
User Avatar

Are we ever going to get that "re-write" we were promised 1-2 years ago, you know, the one that would supposedly fix everything? Instead it seems more like problems are being 'patched' instead of completely fixed

December 31, 1969, 7:00 pm by happy_lori
User Avatar

Thank You!

December 31, 1969, 7:00 pm by Friskysquirt
User Avatar

Thanks as always Alex. Not only do I now know why the site is acting wonky but I learnt more from you than I did in one year of a computing degree

So it's all to do with torque right? wink

December 31, 1969, 7:00 pm by Sensuous
Avatar Border
User Avatar

So that's what's been happening.

Subeta has been lagging a lot for me. (urgh) And I sometimes have to quit the browser 'cause it freezed up.

Hope you get things working well again. n-n

December 31, 1969, 7:00 pm by PaintedSavages
User Avatar

Wow. Are your eyes brown?

December 31, 1969, 7:00 pm by Bren
Avatar Border
User Avatar

Wow- that's impressive! Fantastic description! Can't thank you enough for taking the time to explain this to us non-computer literate people!! Kudos to you and the team Alex!!

December 31, 1969, 7:00 pm by DwI
User Avatar

Thanks Alex! I love that the staff of this site keep everyone completely updated about whats going on. You're amazing! Thanks! Keep up the wonderful work!

December 31, 1969, 7:00 pm by miao
User Avatar

Thanks for the explaination, and keeping all of us in the know that's why I love this site so much <333 thanks again, and keep up the amazing work! :'D

December 31, 1969, 7:00 pm by Faun_171
User Avatar

Oh, tell Titiana that that would be tres helpful D':

Thank you so much, I barely understood it but your examples are great! The gist I got was: you are working hard, you are very capable, we are in good hands. As always, in your code I trust!

December 31, 1969, 7:00 pm by Tomorrow
Avatar Border
User Avatar

That actualy makes sense. Good luck fixing it!

December 31, 1969, 7:00 pm by loopa
User Avatar

this explains a lot...now i have to apologize to my laptop. i thought the lag was his problem. yes, my laptop is male, so what?

December 31, 1969, 7:00 pm by TribalMoon
Avatar Border
User Avatar

Alex ... you really are exceptional! I love to hear these explanations. Its a great way to show us Subetans that the people in charge give a damn about us.

December 31, 1969, 7:00 pm by Lilazn
User Avatar

ahaha I LOVE Hotroxy's statement Alex is a sexy programmer haha... you're awesome Alex! ::

December 31, 1969, 7:00 pm by ROXY
User Avatar

OMG NOT ONLY DO YOU GEEK OUT TO COMPUTER TALK BUT YOU KNOW CARS TOO? OMG YOU ARE THE SEXIEST PROGRAMMER EVAR. I CLAIM YOU AS MY SUBETA BOYFRIEND.

BACK OFF BITCHES. I'M SRS. SRS BSNSS.

/ME DRAGS ALX AWAY.

December 31, 1969, 7:00 pm by lalaorya
User Avatar

I love ow you always break things down for us. You're a doll ♥

December 31, 1969, 7:00 pm by SEA
Avatar Border
User Avatar

Thanks for the update Alex.

December 31, 1969, 7:00 pm by panda_cub29
Avatar Border
User Avatar

Thank you for all the hard work you guys are putting in to keep subeta up and running

December 31, 1969, 7:00 pm by Sotsira
Avatar Border
User Avatar

Thanks for the update!~

My father is a network administrator and deals with servers as the majority of his workload responsibility. I'll talk to him about it and see if he has any suggestions.

December 31, 1969, 7:00 pm by Synbar
User Avatar

Alex, great analogies! i, low-techie that I am, have gotten the idea of what the problem is, and can appreciate your efforts to resolve it. Thanks for the update!

December 31, 1969, 7:00 pm by InVader
User Avatar

Thanks for the update, keep up the great work.

December 31, 1969, 7:00 pm by Julie
Avatar Border
User Avatar

Thanks for the analysis... throws more money at Subeta

December 31, 1969, 7:00 pm by Fallenemiko
User Avatar

yay for progress!! (thank you subeta staff!!)

December 31, 1969, 7:00 pm by Monsoon
Avatar Border
User Avatar

Alex, you really are my hero here! lol Thanks for the heads' up and the most excellent explanation! You win a lollipop!

December 31, 1969, 7:00 pm by Deleted User

I thought it was my comp being crappy, thanks for the update.

December 31, 1969, 7:00 pm by josi
User Avatar

so educational! the most i've learned about mysql servers since last semester ended. x3 thank you alx

December 31, 1969, 7:00 pm by Jinjah
User Avatar

Many thanks.

December 31, 1969, 7:00 pm by Valiant
User Avatar

You win an award. Getting me to understand the inner workings of computers is very difficult, and you did it! Give the man a gold star XD

December 31, 1969, 7:00 pm by natsnana
User Avatar

Thank you Alex for explaining so that even I can understand. You are very good at that. It sounds like something that may take a little time to fine tune, but not critical like the old problems. We appreciate you keeping us updated and know that it will all be worked out soon.

December 31, 1969, 7:00 pm by Saturnine
Avatar Border
User Avatar

That sounds interesting. Troublesome, annoying, but an interesting learning experience.

Good luck solving the problem!

December 31, 1969, 7:00 pm by draithypie
Avatar Border
User Avatar

Once again, Alex, thanks VERY much for an incredibly detailed and well-explained report! I'm still amazed at each one of these posts, since NO other similar site I've been on has EVER given updates like this!

Also, I'd much rather deal with the ''lag storms'' and such than the Db crashing, so I'm staying positive
Best of luck figuring out the complications!! You guys have been doing so much work, and from what I've seen you're doing a great job. ^^

December 31, 1969, 7:00 pm by blaGue
User Avatar

I understood! You're amazing!

"You may have noticed the site has been somewhat slow off and on, and even unresponsive at times."

Ahhhh, I just thought it was my internet being crap.

December 31, 1969, 7:00 pm by JessFaerieLuv
User Avatar

Thanks for the update on what was going on! It makes a lot of sense since you explained it. Kudos on keeping us all informed!

December 31, 1969, 7:00 pm by dreamocracy
User Avatar

hands alx the "longest news post" award Good luck!

December 31, 1969, 7:00 pm by styn
User Avatar

theres always something

gl alx

December 31, 1969, 7:00 pm by idunnowhy
User Avatar

Too much to read. But I got the gist of it. Thanks for the update!

December 31, 1969, 7:00 pm by idunnowhy
User Avatar

Too much to read. But I got the gist of it. Thanks for the update!

December 31, 1969, 7:00 pm by znogirl
User Avatar

Thanks for the heads up Alex. I really love to "watch" your brain work. It's very sexy. ducks under desk

December 31, 1969, 7:00 pm by BIRDIE
User Avatar

It did make since Alx my dear and I like this a whole bunches better then those dreadful rollbacks.

December 31, 1969, 7:00 pm by CerberusKat
User Avatar

thanks!!!!!!!!!!!!!

December 31, 1969, 7:00 pm by Jasher
User Avatar

You're doing the best you can and that's all we ask Thanks Alex!

December 31, 1969, 7:00 pm by Deleted User

wow that was a ton to read! thanks for the explanation though!

December 31, 1969, 7:00 pm by PoeticEnigma
User Avatar

Thank you, at least now I can stop crafting Voodoo Dolls of my ISP

Leave a Comment

Use @username to mention someone. Supports markdown formatting.