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




User Avatar: 3

Posted by alx

Glad you are taking the time to explain all of this to us. Thank you! :3
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! <img src="http://images.subeta.net/smilies/6398_emoticon_smile.gif" border="0" />
Thanks for the update Alex. ♥ <img src="http://images.subeta.net/smilies/6398_emoticon_grin.gif" border="0" /> You are very much loved. <img src="http://images.subeta.net/smilies/6398_emoticon_wink.gif" border="0" />
Thanks for the great explanation. Hope you get things sorted out.
"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
User not found:
Thanks for explaining what's been going on.
Keep up the good work!
User not found:
Kind of reminds me of how our government works. lol! Thanks for keeping us informed!
Well, I'm sure we all appreciate your hard work in researching how to solve this issue. <img src="http://images.subeta.net/smilies/6398_emoticon_smile.gif" border="0" />
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
Thank You!
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 <img src="http://images.subeta.net/smilies/6398_emoticon_grin.gif" border="0" />

So it's all to do with torque right? wink
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
Wow. Are your eyes brown?
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!!
DwI
Thanks Alex!
I love that the staff of this site keep everyone <strong>completely</strong> updated about whats going on. You're amazing! Thanks! Keep up the wonderful work!
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
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!
That actualy makes sense. Good luck fixing it!
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?
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. <img src="http://images.subeta.net/smilies/6398_emoticon_grin.gif" border="0" /> <img src="http://images.subeta.net/smilies/6398_emoticon_heart.gif" border="0" />
ahaha I LOVE Hotroxy's statement
Alex is a sexy programmer haha... you're awesome Alex! <img src="http://images.subeta.net/smilies/6398_emoticon_happy.gif" border="0" /> :<img src="http://images.subeta.net/smilies/6398_emoticon_heart.gif" border="0" />:
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.
I love ow you always break things down for us. You're a doll ♥
SEA
Thanks for the update Alex. <img src="http://images.subeta.net/smilies/6398_emoticon_heart.gif" border="0" />
Thank you for all the hard work you guys are putting in to keep subeta up and running <img src="http://images.subeta.net/smilies/6398_emoticon_smile.gif" border="0" />
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.
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!
Thanks for the update, keep up the great work.
Thanks for the analysis... throws more money at Subeta <img src="http://images.subeta.net/smilies/6398_emoticon_grin.gif" border="0" />
yay for progress!!
(thank you subeta staff!!)
Alex, you really are my hero here! lol <img src="http://images.subeta.net/smilies/6398_emoticon_grin.gif" border="0" /> Thanks for the heads' up and the most excellent explanation! You win a lollipop! <img src="http://images.subeta.net/smilies/6398_emoticon_grin.gif" border="0" />
User not found:
I thought it was my comp being crappy, <img src="http://images.subeta.net/smilies/6398_emoticon_raspberry.gif" border="0" /> thanks for the update.
so educational! the most i've learned about mysql servers since last semester ended. x3 thank you alx
Many thanks.
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
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.
That sounds interesting. Troublesome, annoying, but an interesting learning experience.

Good luck solving the problem! <img src="http://images.subeta.net/smilies/6398_emoticon_smile.gif" border="0" />
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! <img src="http://images.subeta.net/smilies/6398_emoticon_smile.gif" border="0" />

Also, I'd much rather deal with the ''lag storms'' and such than the Db crashing, so I'm staying positive <img src="http://images.subeta.net/smilies/6398_emoticon_smile.gif" border="0" />
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. ^^
I understood! You're amazing! <img src="http://images.subeta.net/smilies/6398_emoticon_grin.gif" border="0" />

"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.
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!
hands alx the "longest news post" award <img src="http://images.subeta.net/smilies/6398_emoticon_smile.gif" border="0" />
Good luck!
theres always something<img src="http://images.subeta.net/smilies/6398_emoticon_raspberry.gif" border="0" />

gl alx
Too much to read. <img src="http://images.subeta.net/smilies/smiley_sadface.gif" border="0" />
But I got the gist of it.
Thanks for the update! <img src="http://images.subeta.net/smilies/6398_emoticon_grin.gif" border="0" />
Too much to read. <img src="http://images.subeta.net/smilies/smiley_sadface.gif" border="0" />
But I got the gist of it.
Thanks for the update! <img src="http://images.subeta.net/smilies/6398_emoticon_grin.gif" border="0" />
Thanks for the heads up Alex. I really love to "watch" your brain work. <img src="http://images.subeta.net/smilies/6398_emoticon_wink.gif" border="0" /> It's very sexy. ducks under desk
It did make since Alx my dear and I like this a whole bunches better then those dreadful rollbacks.
thanks!!!!!!!!!!!!!
You're doing the best you can and that's all we ask <img src="http://images.subeta.net/smilies/6398_emoticon_smile.gif" border="0" /> Thanks Alex!
User not found:
wow that was a ton to read! thanks for the explanation though!
Thank you, at least now I can stop crafting Voodoo Dolls of my ISP <img src="http://images.subeta.net/smilies/6398_emoticon_smile.gif" border="0" />

Leave Comment

Comments are currently on a short cache, meaning your comment may take a few minutes to show up after you post it.