denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)
Denise ([staff profile] denise) wrote in [site community profile] dw_maintenance2012-02-09 11:08 pm

Record breaking traffic day!

I'll lead with the good news: we've been setting new records for traffic constantly for the past month or so, and just now we broke 30Mbps (megabits of traffic transfered per second) for the first time, which is an awesome milestone that we are totally dancing around and celebrating. People are using our baby!

So, if we're transfering record amounts of data, and if (as mentioned on our offsite status twitter) we added two new webservers today to help push out traffic, why has the site been so sluggish today?

As I mentioned in the 2 Feb dw-news post, the answer is very complex. There are a lot of underlying causes that can look to you guys (the people who are just trying to load your reading page and comment on various posts) like the site is just plain sucking, and I know it must be tempting to wonder: hey, this keeps happening, why can't they just fix it?



To over-simplify the explanation and use a metaphor: think of the site as the counter at a really busy deli at lunch rush. There's a bunch of people behind the counter taking customer orders, making sandwiches, etc, but there's a whole bunch of people waiting in line for their sandwiches, and every person who walks in joins a long line of people waiting. The deli owner can add more people behind the counter making sandwiches (more webservers, which we added today), they can improve the process of taking orders to speed it up by letting you order commonly-requested sandwiches by number (better caching of content that doesn't change often, like images and CSS and JavaScript), and they can rearrange the stuff behind the counter so sandwich makers can work more efficiently and get the sandwiches made faster (code optimization so the webservers complete requests faster) -- but sometimes there's still going to be a line anyway!

Today (the answer changes from day to day, and sometimes from hour to hour), the biggest slowdown comes from entries with large numbers of comments, because the code that generates those pages has a bunch of inefficiencies that don't start showing up until you see a whole lot of people loading those entries and interacting on them -- the code that generates the page takes time to run, and every additional microsecond it takes, it ties up a process on the webserver it's running on. The webservers can only run so many processes at once, so when there's no free webserver processes available, you ask the site for the page and it has to yell "Hang on a second, I'll get to you as soon as I've got a process free!" at you. Even if you aren't viewing or commenting on an entry with lots of comments, somebody else is, and so the servers wind up being busy. (This is like how if you walk into the deli and just want a root beer, you still have to wait in line with all the people who are buying sandwiches.)

We've known this was going to be a problem for a while, but fixing the underlying cause is going to take a lot of work, because there are a bunch of tiny inefficiences that add up to big problems when they're taken all together.

[staff profile] mark has been making a bunch of code fixes that will speed things up in the short term, and [personal profile] allen is working on the more sweeping code changes that will speed things up in the long term. The code changes Mark just made should help a lot, but high traffic periods (evenings, US time) may continue to be sluggish for a few more days.

We've also added more caching of frequently-accessed and unchanging data: CSS files, JavaScript files, images, and icons are all being cached so they load faster, and served from the fast static content frontend, which takes the burden of serving those off the webservers that are working to build pages. Meanwhile, [personal profile] alierak has been working on optimizing our server response so we can squeak every microsecond out of the servers themselves.

So, in short: We're busy! We're all really sorry about the slowdowns at peak traffic times, and we're working really hard to increase capacity and speed up site performance. Thank you all for your patience (you really are the best users a site ownership team could ask for!) and for continuing to use Dreamwidth. This is a very exciting problem to have. :)
ilyena_sylph: Jarod of the Pretender, smiling while laying on a floor, from the pilot (Pretender: Jarod happy)

[personal profile] ilyena_sylph 2012-02-10 04:58 am (UTC)(link)
I love your extended analogies!

This one is really fantastic, too.

Best of luck to [staff profile] mark and [personal profile] allen and [personal profile] alierak on all of the stuff they're doing!
rosalynian: (sorariku | we'll go together)

[personal profile] rosalynian 2012-02-10 04:58 am (UTC)(link)
your openness and communication and friendliness is just so bloody amazing, let me tell you that. i'm so glad i came here.
mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)

[staff profile] mark 2012-02-10 05:01 am (UTC)(link)
I made a fix this evening that should help a lot with the big comment entries. Here's the CPU usage graph from one of our web servers -- purple is bad.

CPU usage graph showing the CPU dropped from 100% to 50%

From a tiny change (http://changelog.dreamwidth.org/1138598.html) that really proves the old truism about knowing where to put the period (or whatever it is, I've forgotten).
Edited 2012-02-10 05:03 (UTC)
dragondancer5150: (Default)

[personal profile] dragondancer5150 2012-02-10 05:05 am (UTC)(link)
This is a very exciting problem to have. :)

Not that it isn't true, but I have to admit it made me laugh. XD

I can't BEGIN to thank you (and Mark...yesterday? day before?) for taking the time to explain things why/how they're running like they are. Sometimes, that's all a user really wants is to be kept informed. I appreciate the really informal, friendly tone too, as opposed to a faceless and formal, very generalized "we're working on it, not going to go into detail, just believe us" approach.

KEEP UP THE GREAT WORK!
backtothelight: David Hasselhoff in a white cowboy hat. (Save a horse - ride a cowboy)

[personal profile] backtothelight 2012-02-10 05:06 am (UTC)(link)
I am patient. I can wait. You guys do your thing. (: You're awesome.
digi_punk: (design team)

[personal profile] digi_punk 2012-02-10 05:10 am (UTC)(link)
I wish I understood more of this stuff but all I really got out of that was "purple is bad" so GO GREEN!

And thank you, all of you. While I may not always understand the technical jargon, something about you taking the time to explain it to me really does help. Sometimes I think I just imagine the internet like it's only magical Lawnmower Man world where you guys just make your little digitized worker drones move blocks around or something. It really does take work though and I appreciate all the work you guys put in.
moonvoice: (tv - bones - sweets loves you)

[personal profile] moonvoice 2012-02-10 05:10 am (UTC)(link)
Thanks for keeping us in the loop; and good luck on getting the site to an increased capacity to deal with the increased traffic. :D

Also, huzzah increased traffic!
em_kellesvig: John Sheppard looking mischievous with caption "Mischief Managed" (Laptop and coffee)

[personal profile] em_kellesvig 2012-02-10 05:16 am (UTC)(link)
You know, one of these days, I'm going to have to throw real money at you all. I really enjoy the site, the service, and the wonderful attitude you have toward keeping everyone up to date. I'm just, you know, terminally broke. But when I do have money, it's yours. Thanks!
formidable: (Mr. Blue sky please tell us why)

[personal profile] formidable 2012-02-10 05:17 am (UTC)(link)
Thank you for your hard work and keeping us updated! <3
pebblerocker: Red Dwarf's Cat climbs through a hatch; text "Investigating" (Investigating!)

[personal profile] pebblerocker 2012-02-10 05:18 am (UTC)(link)
And the Dreamwidth deli makes the best sandwiches! I'll have extra avocado on mine, please.
rezykel: (het - reino heart)

[personal profile] rezykel 2012-02-10 05:19 am (UTC)(link)
I used to work in a fast food chain, I greatly enjoy your metaphor!

And cheers for the update and the hard work you're putting into this site. ♥
exor674: Computer Science is my girlfriend (Default)

[personal profile] exor674 2012-02-10 05:20 am (UTC)(link)
Purple is bad, red would also be bad, that funky beige-ish color is good!
chris: (power)

[personal profile] chris 2012-02-10 05:21 am (UTC)(link)
Thumbs up; rock on!
rezykel: (het - i'm cheered up alright)

[personal profile] rezykel 2012-02-10 05:21 am (UTC)(link)
I really enjoy the site, the service, and the wonderful attitude you have toward keeping everyone up to date.

Now those are words of truth!
sara: S (Default)

[personal profile] sara 2012-02-10 05:33 am (UTC)(link)
think of the site as the counter at a really busy deli at lunch rush. There's a bunch of people behind the counter taking customer orders, making sandwiches, etc, but there's a whole bunch of people waiting in line for their sandwiches, and every person who walks in joins a long line of people waiting.

...I'm having Baltimore deli flashbacks, now, Dee. You'd better shove a corned beef on rye with dressing through the router, hold the angry Jews. ;>
jumpuphigh: Pigeon with text "jumpuphigh" (Default)

[personal profile] jumpuphigh 2012-02-10 05:33 am (UTC)(link)
Now I want a sandwich with avocado. Mmmmmm
angle_on_it: (artistic)

[personal profile] angle_on_it 2012-02-10 05:40 am (UTC)(link)
Every day on Dreamwidth is a double-rainbow day thanks to you DW staffers!
stakes: 7. (Default)

+1

[personal profile] stakes 2012-02-10 05:42 am (UTC)(link)
seriously
storyfan: (Default)

[personal profile] storyfan 2012-02-10 05:42 am (UTC)(link)
I haven't noticed any problems at all.
milady_dragon: Dragon Myfanwy (Default)

[personal profile] milady_dragon 2012-02-10 05:49 am (UTC)(link)
Would this have anything to do with my network page only loading three entries, all of them dated February 1st?
phagocytosis: delineate (ʰᵒᶰᵉʸᶜʰᶦᵖ)

[personal profile] phagocytosis 2012-02-10 05:49 am (UTC)(link)
Thanks for explaining how it works!
subluxate: Sophia Bush leaning against a piano (Default)

[personal profile] subluxate 2012-02-10 05:50 am (UTC)(link)
That reminds me of how my ex typed throughout a page and got massively frustrated about the page not working...until someone glanced it over, pointed it out, and find-and-replace cleared it.

In other words, tiny fixes are sometimes the best fixes.
andraste: The reason half the internet imagines me as Patrick Stewart. (Default)

[personal profile] andraste 2012-02-10 05:52 am (UTC)(link)
When you get right down to it, everyone wanting sandwiches all at once is a good problem to have! Much better than the alternative, anyway.

Thank you for keeping us informed of developments.
februaryfour: baby yoda with mug (Default)

[personal profile] februaryfour 2012-02-10 05:53 am (UTC)(link)
I really love how I learn so much more about the technology underlying the web just by being a customer here.

Page 1 of 5