Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Can your site handle this?

by Anonymous Monk
on Nov 06, 2011 at 00:51 UTC ( [id://936204]=note: print w/replies, xml ) Need Help??


in reply to Re: Can your site handle this?
in thread Can your site handle this?

Oh come on stress testing against Localhost is entirely unrealistic. For a start you've removed all network I/O limitations, and for seconds unless your renting a beefy server your likely to have far more available RAM on a home system, especially these days.

You mention swapping, and your quite right, the moment your server starts grinding in virtual memory it's game over.

Any large scale site these days runs on servers with dozens or hundreds of processors and many gigabytes or even terabytes of ram.

When your running out of ram it doesn't matter how clever your algorithm is and how efficient it is, it's still going to grind to a horrible slow halt when the memory is maxed out.

That's why I argue that memory usage is far more important these days in building scalable solutions than processing power is, where the same was not true just a few years ago when most of the solutions we have available (the ones which people religiously worship as being beyond question the only solutions worth using) were written.

I read somewhere, and I'm sorry I can't remember where to give citation, that HTTP::Engine, uses 15mb of ram per child process to do what it does, and that probably made perfect sense in 2006... It's designed for machines where memory usage was less important than processor speed, and that's why when the hardware changes specification new solutions are needed.

That in itself is proof of the validity of reinventing wheels when needed, because the road itself has changed.

Perhaps in the future CPU speed increases will falter whilst memory chip density will accelerate, then the situation shifts again, but in the meantime, unless you have a big-iron server budget your server is far more likely to run at peak efficiency using software which uses more processor power but only consumes 2mb of ram per child process rather than 15mb of ram per child process and leaves the CPU idling for most of its cycles.

This is also a generic argument for the comeback of dynamic languages in general, since they are always more processor intensive than their fully pre-compiled counterparts, a fact that simply doesn't matter here in late 2011.

Replies are listed 'Best First'.
Re^3: Can your site handle this?
by cavac (Parson) on Nov 06, 2011 at 01:06 UTC

    Oh come on stress testing against Localhost is entirely unrealistic. For a start you've removed all network I/O limitations,

    You are quite right for the most part. First of all, my DSL modem would go up in flames before even a cheap rent-a-server service would notice any relevant increase in traffic. So, for real-life testing you need a decent internet connection for a start. But then, yes, testing makes a lot more sense.

    But testing against localhost is also a good idea. You might notice race conditions and things like that a lot easier. At least, i did.

    and for seconds unless your renting a beefy server your likely to have far more available RAM on a home system, especially these days.

    When doing production critical services, i usually put my own servers in a colocation. While it's certainly more work, it usually pays (for me) in the long run. Especially when upgrade time comes around. But since i do (mostly) in-house stuff, your situation is probably completly different from mine...

    Don't use '#ff0000':
    use Acme::AutoColor; my $redcolor = RED();
    All colors subject to change without notice.
      your situation is probably completly different from mine...

      Yeh, sounds like it... I'm unemployed and I can only afford a basic server on a budget of about $20 a month. I am therefore forced to make the absolute most out of very limited hardware, at least until one of my sites becomes financially productive when I will be able to scale my hosting plan up.

      The practical upshot of being so highly restricted is that the code which runs fast on such a tiny box is going to kick arse when it gets run on a decent size box.

      I once had access to some IBM Big Iron, I have no idea how much ram it had or how much processing power as the service was provided on the basis of price per megabyte of storage. That was a few years ago now and at the time I couldn't see any problem with the efficiency of my system.

      It wasn't until quite recently when contemplating what would be needed to run a massive-multiplayer online game that I realised the software I had was not going to be anywhere near fast enough for the task given the size of server I can afford, so the quest to speed it up began and that's why aXML got optimised and married to Plack, with the result being that now it's several orders of magnitude faster and even a poxy little $20 a month server is a sufficient basis for several hundred concurrent users... and my path is clear to develop the game I have in mind and have wanted to get stuck into writing for a long time now.

      You know what aXML is a stupid unimaginative name... I really need to find a better one. I have been toying with "Diamond", or maybe "Sapphire". Either would be better and given that we already have "Perl" and "Ruby", the precious gem moniker seems to fit quite nicely with current trends.

        I'm unemployed and I can only afford a basic server on a budget of about $20 a month. I am therefore forced to make the absolute most out of very limited hardware, at least until one of my sites becomes financially productive when I will be able to scale my hosting plan up.

        I don't want to crush your hopes, but even if you had the best product on the whole internet, it would still take a fair bit of luck and most likely quite some investment to get the site financially productive. Since margins today are very low for most use cases, you'll probably need a huge user base.

        And to get that, you will need to have adequate hardware and bandwidth from the start - since a single link on a major new outlet or community website may send you a huge number of potential users. This is known as the Slashdot effect. If your site slows to a crawl, most of those user may never come back...

        The practical upshot of being so highly restricted is that the code which runs fast on such a tiny box is going to kick arse when it gets run on a decent size box.

        Maybe, maybe not. When you go to a large scale, more caching in RAM may become cheaper than more CPU power (often reversed in small scale systems).

        Also, when doing large site with many write operations, referential integrity of the data may or may not become much more important. It does especially when doing something financial (starting with serving ads). So you'll need an ACID compliant database, which, when configured correctly for performance, will most of the time also be more RAM bound than CPU bound.

        It wasn't until quite recently when contemplating what would be needed to run a massive-multiplayer online game

        This needs much more than just a fast server. For a successful service, you'll need redundant systems all over the world, a huge amount of low-lag bandwidth, 24/7 admin support, developers who constantly fix bugs and improve content and so on. Thats why there are not that much companies who have a success on the long run, a working community and actually make money through their service.

        and my path is clear to develop the game I have in mind and have wanted to get stuck into writing for a long time now.

        I wrote a (relatively simple) Jump'n'Run game myself called BlinkenSisters. Something like that is a shitload of work for a single person.

        I don't say it's impossible for a single person to write a working, modern, successful MMOG, but it would - in my opinion - take literally a decade or two to pull it off.

        Don't use '#ff0000':
        use Acme::AutoColor; my $redcolor = RED();
        All colors subject to change without notice.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://936204]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-04-19 10:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found