The Yogscast Effect - Your SysOp Speaking

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
TrueBrain
OpenTTD Developer
OpenTTD Developer
Posts: 1370
Joined: 31 May 2004 09:21

The Yogscast Effect - Your SysOp Speaking

Post by TrueBrain »

Because you asked ( http://www.tt-forums.net/viewtopic.php?p=983726#p983726 )

I am going to start a new term: The Yogscast Effect (in memory of The Slashdot Effect). Read on why:

Last few hours I have been poking around our services. The lovely thing about a heavy load is that it means you can finally try out those things you always wanted to try out, and see how the traffic flows. Sadly it also means sometimes you do something wrong :D (like kicking the load balancer out of order, tralalalaaa :P).

Some more fun statistics:

- on an average day our front httpd handles around 7 hits/s. During EU peak this is more, during EU night this is less. (normal EU profile). This is around 700k hits per day.
- during releases we mostly reach around 40 hits/s, where in December 2009 (our xmas release I believe?) we got values like 1.5M hits per day.
- over the last year we grew from around 5 hits/s to 7 hits/s, going from around 500k hits per day to 700k hits per day.
- in a month we handle around 20M hits, and have 0.5M ~ 1.0M unique visitors.

The last few weeks I have been doing a lot of work on the background to make our services more accessible (speed-wise). Over time MediaWiki has been using more and more CPU to render a page, and we got more and more page hits. So I move around stuff to be more separated, and MediaWiki for example runs in its own box. Days like these remind me why I do that. Of course normally you also have a much faster page, but nobody really notices it. With 700k hits per day I can only hope a normal sane system can handle that without people having the idea of 'lag'.

Today (well, yesterday, stats are based on yesterday :P) reminds me why I do those things.

- an average of 46 hits/s. During EU peak more, but also during US peak. Our normal profile is totally whacked.
- because of the release the 5th and yogscast, we had 3.5M hits yesterday.
- I have measured peaks (5 minute window) of 250 hits/s and (1 hour window) of 80 hits/s.
- in the last 2 days we had 0.1M unique visitors. That would mean 1.5M if it continues (doubtful, but just for the sake of comparing values).
- this is higher than the slashdot post a few months back! (of course we were also smaller than, so it is comparing apples with oranges a bit ..)

On some parts of the site, the requests are tenfolded that of normal. Then of course we have many people downloading all files from BaNaNaS (why?), others who are spidering our complete website (again: why?), but many many many many many many legit users.

Like said above, for me this was a nice moment to start toying with a few things. It is hard to tune a service when you cannot really produce a load over it. Of course I often run DoS like applications to fake a load, but nothing beats a human. Today showed exactly that. I mostly worked on our load balancer for binaries.

To serve you binaries, you connect to http://binaries.openttd.org/, and from your point of view, you just get the file. In reality you get a redirect to one of our mirrors (which are so kindly donated by people. See http://www.openttd.org/en/contact for more on who in which country). When I build this load balancer, I used the following formula:

(The distance between each mirror and your geolocation as obtained via GeoIP) * (current 'load' on server), sorted by this value, take the lowest.

'Load' of a server is just the amount of GB flowing through a server in a window. The window was kinda large, so our load was normally around 20 or so. I knew this formula was broken, mostly as it was possible for US to get overloaded, and which would start to offload binaries to Europa. A very unwanted effect. But also needed to avoid lot of traffic on one mirror.

Today I asked Zernebok (the hoster of this forum) if they would mind an increased load on their mirror as after all we were getting a lot more US people all of a sudden. He was fine with it (tnx again!), so I fiddled with the balancer to balance better. I also noticed that GB (the country) had an unusual load, so I needed to look into that too. The latter turns out to be people from countries like Spain. The closest mirror we have for them is funny enough GB. This is network-wise not efficient, but geo-located the shortest route. Funny how that goes.

I changed the formula to the following:

(the distance between each mirror and your geolocation as obtained via GeoIP) ** (current 'load' on server), sorted by this value, take the lowest.

Mind the **. This means: power of. So the values EXPLODE. Of course with a load of 20 this is unacceptable. So .. I decreased the window of the load by a load, and keep the value around 2. This gives me a much better result, and one I would expect.

People who connect from the US have a high chance of hitting the US mirror. But if he gets loaded a lot for a short window, it does get offloaded to Europa. Perfect!
Also, within Europe routing is better. People from Spain now balance between GB, NL and DE, depending on their load. It scales so much better :)

Of course this took a bit of trial and error, and sadly I managed to hog all connections for around 8 minutes :P Took me a while to notice, as I was getting a beer ... hehehe :D In fact, I had to look back in the logs why there were 1000 times 500 requests served. Owh well, s*** happens :D (on a fun side-note, Yogscast made the claim they kicked us off the 'air'. I am sorry guys, I wish that was true. Would have been a better excuse :D). The true story is of course a bit more technical, but meh .. I f*** up :D Nuff said ;) (to give a bit of insight in a comparison: it is like a car-jam on a highway. If you jam one side for a bit, the effects last for a few minutes through the highway back)

My next point on the agenda, which is showing the first signs of stressmarks, is our main website. Due to old techniques used, and a f*** up deployment, it runs in a single thread and does not work with any form of cache. An average page takes 10ms to generate, which will tell you immediately it cannot serve more than 100 hits per second. We are not close to that yet (peaks of 50 hits per second I measured, as you might understand most of the hits go to our wiki, not our main page ;)), but I do want to be prepared for the next person that makes an epic livestream of our game. A lot is already done, but a bit still needs doing .. hope to roll it out early 2012, but time will tell. This piece will remove the final old part of our webservices, preparing us for at least 1000 hits/s on current estimation. That would be a lot of hits ...

I would like to close with: BRING .. IT .. ON !!

PS: sorry for the wall of text; you have XeryusTC to thank for that!
PPS: for those who laugh at the (in their eyes) low hits per day, I only have to say: I pity the fool. (and yes, you have to do the voice when you read this).
PPPS: one of the most under appreciated jobs is being a SysOp. If it works, nobody complains. If it fails, everyone complains.
PPPPS: btw, the same holds for people who collect your garbage every week.
The only thing necessary for the triumph of evil is for good men to do nothing.
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: The Yogscast Effect - Your SysOp Speaking

Post by Kogut »

Great, post - I want more walls of text like this!
TrueBrain wrote:Because you asked ( http://www.tt-forums.net/viewtopic.php?p=983726#p983726 )
PPPS: one of the most under appreciated jobs is being a SysOp. If it works, nobody complains. If it fails, everyone complains.
PPPPS: btw, the same holds for people who collect your garbage every week.
Well - it applies to many, many, many "hidden" jobs (see sb who installed systems that are supposed to protect from oil rig explosion, factory workers... etc)
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
User avatar
XeryusTC
Tycoon
Tycoon
Posts: 15415
Joined: 02 May 2005 11:05
Skype: XeryusTC
Location: localhost

Re: The Yogscast Effect - Your SysOp Speaking

Post by XeryusTC »

TrueBrain wrote:PS: sorry for the wall of text; you have XeryusTC to thank for that!
Glad to be of service ;)
TrueBrain wrote:PPPS: one of the most under appreciated jobs is being a SysOp. If it works, nobody complains. If it fails, everyone complains.
Welcome to the world of keeping any technology working as people suspect it. It is the same for being a live sound engineer: if no one notices you were around you did your job well, if they did notice you you probably failed.

It is nice to see some numbers (and to see you f*** up bigtime for once :P). I always find them a very interesting read and fortunately you managed to keep all of the weird techno babble out :P

TrueBrain wrote:but I do want to be prepared for the next person that makes an epic livestream of our game.
The only person I can think of to do that now is TotalBiscuit. When he did his WTF-a-thon he managed to crash the site of at least half of the games he played just by mentioning their name and linking to them for a brief moment on the livestream. The sites were probably not up to the task of handling a huge load though as the games were mostly from small indie developers.
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
Image
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
Image Image Image Image Image Image Image
City Builder
Engineer
Engineer
Posts: 107
Joined: 12 Apr 2010 11:58

Re: The Yogscast Effect - Your SysOp Speaking

Post by City Builder »

XeryusTC wrote:
TrueBrain wrote:but I do want to be prepared for the next person that makes an epic livestream of our game.
The only person I can think of to do that now is TotalBiscuit. When he did his WTF-a-thon he managed to crash the site of at least half of the games he played just by mentioning their name and linking to them for a brief moment on the livestream. The sites were probably not up to the task of handling a huge load though as the games were mostly from small indie developers.
I'm rather surprised at how many smaller developers try to host their own web server in their office with inadequate bandwidth to handle anything beyond a very minor load. It's kind of easy to see which developers do that when coming across their websites. The part that is surprising to me is that even though smaller developers are usually budget constrained, in this day and age web hosting is downright cheap for a proper host that won't have any problems handling the load that is put upon those sites from time to time.

Oh well, I hope that yogscast manages to introduce the game to a new audience, and that, that audience finds it to be a game they want to stick with. I'm always on the lookout for fun people to play with.
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: The Yogscast Effect - Your SysOp Speaking

Post by Kogut »

TrueBrain wrote:Then of course we have many people downloading all files from BaNaNaS (why?)
Is it a typical/popular behaviour? I am mainly interested in checking how many people really use my AI.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4766
Joined: 09 Sep 2007 05:03
Location: home

Re: The Yogscast Effect - Your SysOp Speaking

Post by Alberth »

I'd say so, if you look at how many times my example staircase height map is downloaded (which is really useless for playing)
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: The Yogscast Effect - Your SysOp Speaking

Post by Kogut »

Alberth wrote:I'd say so, if you look at how many times my example staircase height map is downloaded (which is really useless for playing)
Well, I downloaded it from a pure curiosity. Maybe I will upload "completely useless newgrf file"?
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: The Yogscast Effect - Your SysOp Speaking

Post by Yexo »

Kogut wrote:
Alberth wrote:I'd say so, if you look at how many times my example staircase height map is downloaded (which is really useless for playing)
Well, I downloaded it from a pure curiosity. Maybe I will upload "completely useless newgrf file"?
We already have that. It's called "Fix TTD grf bugs".
S4D Rampage
Engineer
Engineer
Posts: 4
Joined: 08 Dec 2011 21:52
Location: South Yorkshire, UK

Re: The Yogscast Effect - Your SysOp Speaking

Post by S4D Rampage »

City Builder wrote: Oh well, I hope that yogscast manages to introduce the game to a new audience, and that, that audience finds it to be a game they want to stick with. I'm always on the lookout for fun people to play with.
Funnily enough it was through yogscast that i actually heard about this game :)
GT: ImPulSe iZ Tank
Open TTD Name: S4D Rampage
Company name: Rampage LLC

www.writing.com
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: The Yogscast Effect - Your SysOp Speaking

Post by Lord Aro »

Ah, "they" have started to arrive :)
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
TrueBrain
OpenTTD Developer
OpenTTD Developer
Posts: 1370
Joined: 31 May 2004 09:21

Re: The Yogscast Effect - Your SysOp Speaking

Post by TrueBrain »

S4D Rampage wrote:
City Builder wrote: Oh well, I hope that yogscast manages to introduce the game to a new audience, and that, that audience finds it to be a game they want to stick with. I'm always on the lookout for fun people to play with.
Funnily enough it was through yogscast that i actually heard about this game :)
Welcome :)
The only thing necessary for the triumph of evil is for good men to do nothing.
User avatar
kamnet
Moderator
Moderator
Posts: 8705
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: The Yogscast Effect - Your SysOp Speaking

Post by kamnet »

Kogut wrote:
Alberth wrote:I'd say so, if you look at how many times my example staircase height map is downloaded (which is really useless for playing)
Well, I downloaded it from a pure curiosity. Maybe I will upload "completely useless newgrf file"?
Three words: "Secret Rubidium Cargo" *nods*
S4D Rampage
Engineer
Engineer
Posts: 4
Joined: 08 Dec 2011 21:52
Location: South Yorkshire, UK

Re: The Yogscast Effect - Your SysOp Speaking

Post by S4D Rampage »

TrueBrain wrote:
S4D Rampage wrote:
City Builder wrote: Oh well, I hope that yogscast manages to introduce the game to a new audience, and that, that audience finds it to be a game they want to stick with. I'm always on the lookout for fun people to play with.
Funnily enough it was through yogscast that i actually heard about this game :)
Welcome :)
Why thank you :D. I am enjoying the game...areoplanes are expensive :(. I'll stick with trains for now.

P.S: I hope the AI's don't take up my airport space :)
GT: ImPulSe iZ Tank
Open TTD Name: S4D Rampage
Company name: Rampage LLC

www.writing.com
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 8 guests