Slashdot Mirror


Building a Better Webserver

msolnik writes: "The guys over at Aces' Hardware have put up a new article going over the basics, and not-so-basics, of building a new server. This is a very informative, I think everyone should devote 5 minutes and a can of Dr Pepper to this article."

80 of 286 comments (clear)

  1. What all companies should do by Delrin · · Score: 4, Insightful

    But don't.
    Actually a very interesting article, to be honest, in my 1 year of building webserver applications. I haven't gone through a process like this once. Usually we make a rough guess about how the application has performed (or more usually underperformed on existing servers, and just scale a percentile. As you can imagine, this is hardly realistic. Thanks for the read!

  2. New Webserver? by Archie+Binnie · · Score: 3, Troll

    Lets see exactly how long their lovely new webserver stands up to a slashdoting... :)

    (Maybe they just sent this so they could test it? Plan.)

    1. Re:New Webserver? by Cylix · · Score: 2

      We showed them...

      Looks like they might to revisit their approach to building a better webserver.

      It is hard to say if we have maxed their bandwidth or maybe given the server a real life lesson in load.

      I suspect the article might get a rewrite ;)

      Unfortunately I wasn't able to get past the first page, but me thinks the next article would introduce additional server's and some load balancing.

      [Slashdot Seal Of Death]

      --
      "You should always go to other people's funerals; otherwise, they won't come to yours." -- Yogi Berra
    2. Re:New Webserver? by benspionage · · Score: 2, Informative
      An excellent reply to the "they've been slashdotted" comment was given in the forum for this article. I should note that the site is responding fine now.


      Most people are unlikely/too lazy to follow the comment link above so I've repeated the first part of the response below:


      Yes, I read quite a few snide comments on slashdot about this server not being able to handle the load and ridiculing the article because of it. Frankly these people dont have a clue. It would be pointless in the extreme to operate a server 24/7 to handle the kind of loads the "slashdot effect" generates unless those kind of loads are the norm... A well tuned properly designed website/server should be equipped to handle 2 to 3 times its _expected_ peak traffic rate (which seems about what this server can do as its tuned now). It is a waste of money and hardware trying to do anymore than that imho as 99.9% of the time you would have alot of $$$ sitting totally idle in the form of hardware and bandwidth. Being a server admin myself, I think the guys here did an EXCELLENT job explaining what is involved with hosting a fairly high-traffic website effeciently. And I also think the server/programming for this site is well designed and does its job admirably (better than 99% of the websites on the internet at least). They did an excellent job of explaining the pros and cons

      of different approaches to dynamic sites. Knocking them for getting nailed by slashdot isnt exactly productive, I would like to see ANY site which uses database generated content on a single thousand dollar server handle that kind of load (my guess is > 1000 requests per second at its peak from what I have heard from others who have been slashdotted)... Caching can only do so much :)

      [Rest of comment follows, see link above for full version]

  3. Best webserver to generate traffic by Typingsux · · Score: 4, Funny
    Get IIS and no code red patch.
    Instant traffic to your site, no advertising!

    --
    The above post is an editorial, the poster cannot and will not be held responsible for all or in part for it's contents
    1. Re:Best webserver to generate traffic by czardonic · · Score: 2, Informative

      You'd get the traffic to your site no matter what server you run. Code Red would just pump up traffic from your site.

      --
      Takahashi Rumiko made beats! DON, taku, DON, taku. . .
  4. Offtopic XBox server by SilentChris · · Score: 2, Funny
    Offtopic somewhat, but some people are halfway there to upgrading the XBox to a decent Linux server.

    Note this article for information on connecting USB keyboards and mice, what shorting the debug pins does on the keyboard, and replacing that measly ATA33 hard drive cable with an ATA100 (surprise, surprise: it actually increased performance :) ).

    1. Re:Offtopic XBox server by interiot · · Score: 2
      The keyboard and mouse didn't talk to the CPU at all, just powered on.

      Anyway, it's not halfway there, more like .02% there. No idea yet on how to run random bits of code on it, Microsoft obviously will have put all sorts of hurdles there. And then you have to reverse engineer stuff for all the libraries and OS(since they're statically linked) and figure out how to talk to hardware for all the little differences from normal PCs they've added. Long way to go.

  5. talking about better web server. by 2Bits · · Score: 2, Funny
    If you have a slashdot-proof server, that's a better web server.

  6. Good article, but... by Computer! · · Score: 5, Interesting

    Microsoft has written several white papers of this sort already. Of course, they're Microsoft, so that means I can kiss my +2 bonus goodbye. Seriously, though.

    --
    If you fall off a building, go real limp, because maybe you'll look like a dummy and people will be like hey, free dummy
  7. Why not get the server version - Netra X1? by msolnik · · Score: 2, Informative

    Why would they go with the desktop version when they want a rackmount server? You can get the Netra X1 for 50$ less and it comes with the exact same hardware but in rackmount case. Check it here.

    1. Re:Why not get the server version - Netra X1? by Chagrin · · Score: 2

      With the X1 you don't get the smart card reader.

      ...well, you won't get drivers for the smart card reader anyway, but that's not the point.

      --

      I/O Error G-17: Aborting Installation

    2. Re:Why not get the server version - Netra X1? by green+pizza · · Score: 2

      ...well, you won't get drivers for the smart card reader anyway, but that's not the point.

      I don't know about Solaris 7, but Solaris 8 comes not only with drivers, but a neat smartcart GUI utility and some good developer libs for doing even more with the interface.

    3. Re:Why not get the server version - Netra X1? by SuiteSisterMary · · Score: 2

      Yeah, and putting one in yourself, be it internal or external, just isn't worth it. ;-)

      --
      Vintage computer games and RPG books available. Email me if you're interested.
  8. I usually... by nll8802 · · Score: 2, Funny

    I usually get a decent speed processor PIII 800, a really fast scsi drive or raid (Depending on the site), 512MB of ram ( Or more depending on the site ), and a copy of Slackware.

  9. Re:New Webserver? - not good by victim · · Score: 2

    It is 15 minutes after the article post and the site is dead. I got to the part about calculating how much RAM was required per visitor and multiplying by the expected number of visitors.

    Maybe they need to adjust their constants. :-)

    It is those d*mn modem users that drive up the RAM use. They stay connected longer on their GET and tie up resources longer.

  10. Am I the only one... by Schwamm · · Score: 2, Funny

    who couldn't figure out at first why Ace Hardware put up information about a new webserver?

  11. Update by Karma+50 · · Score: 2, Redundant

    It would be interesting to see an update from them tomorrow with the same graphs as on the Servers in Practice page with today's data.

    Their site is slowing down under the /. load.

    --
    http://www.thehungersite.com
  12. Re:Quick page, good read by DavidJA · · Score: 5, Insightful

    but I figure it's best to spend the money early on, get a good setup going that can handle high volumes

    Throwing money at the problem is exactly the WRONG approch. You need to start by spending time PLANNING and RESEARCHING the best way to do things.

    For example, if you are setting up a dynamic site like ./, which is serving 100 pages/second. It obviously needs to be dynamic, so you need a database to store all the comments in.

    There are two ways to do this, one is to serve content straight out of the database, but this means that for every page you serve up, there needs to be a database query. (the database queries are the expensive part in terms of time it takes to serve a page). The other way would be to serve the articals as static pages which are generated every minute or so by a process on the database and pushed down to the web server, which serves these up as static pages.

    The advantage of this is that insted of 100 database queries per minute, you end up with, maybe 10 queries per minute to populate the static pages. Sure, you site is no longer 100% dynamic, but it is a whole lot faster, and you have saved thousands of dollars to boot!

    This is just one small off-the-top-of-my-head example of where PLANNING sould become way before spending any money.

  13. Re:OSDN: Please read this by NerveGas · · Score: 2, Interesting

    <I think the part about Java/Resin is the most crucial. Anybody can throw hardware at a problem, but their programming methodolgy makes tremendous sense (ie: dump this Apache/CGI garbage in favor of real multithreading)>

    Funny. What was our next closest competitor spent several million dollars on Sun hardware and everything done in Java. We spent less than $40,000 on some dual-proc Intel machines, doing everything with Postgres, Perl, and Apache. The result? Our servers have many times the capacity that theirs do, and they're almost completely out of business.

    steve

    --
    Oh, you're not stuck, you're just unable to let go of the onion rings.
  14. Down already? by ParisTG · · Score: 2, Funny

    Should we really be taking advice on building a web server from someone who's server crashes under /.s load?

  15. Devote my time? by Arethan · · Score: 2
    "I think everyone should devote 5 minutes and a can of Dr Pepper to this article."
    5 minutes my ass. Now that me and 250,000 other people are all trying to access their server within the same 15 minute timeframe, it's going to be a good 5 minute wait per page. Lol!
  16. the Ultimate Webserver is... by GCP · · Score: 4, Insightful

    ...the one with a lot of mirrors.

    --
    "Those who have never entered upon scientific pursuits know not a tithe of the poetry by which they are surrounded."
  17. Re:OSDN: Please read this by trb · · Score: 4, Informative

    "Real multithreading" is really no panacea. See the notes from John Ousterhout's talk, Why Threads Are A Bad Idea (for most purposes).

  18. good but... they discounted x86 to fast by azephrahel · · Score: 2, Informative

    It really feels like they only made a token gesture towards using an x86 box. To be honest my next box will probably be a sunblade too (but hey, I'm gonna use it for a desktop ;) Mind you this was a really good article, but I think they should have said that they were just more comfortable with sparc and that was that. There was another good article on a similar subject not long ago, on Anandtech's new server. For that article they benchmarked different configs (mobo, proc, etc) then did a price performace.. as far as I recall. And they chose AMD ;)

    --
    You are only young once, but you can stay immature indefinitely.
  19. Re:looks good so far... by Griim · · Score: 2

    It's 5:06pm EST, and it's already slowing down from when I started reading it. Had one page fail to load, but then it recovered upon reloading.

  20. Just a can by VFVTHUNTER · · Score: 3, Funny

    of Dr. Pepper? I expect to go through a whole case waiting for the slashdot effect to wear off...

  21. True by john@iastate.edu · · Score: 3, Interesting
    Apache is cool and all, but I wonder if it is still the right tool for a lot of sites -- it has every feature under the sun, but it seems to me that more and more sites are getting more and more specialized and thus needing less and less of these features.

    Once upon a time, we had 1 web server that did everything, so it needed to be able to do everything. Now everytime we do something new we toss out a new webserver (or 2 or 10 of 'em). And they all basically need to do one thing (webmail, portal, whatnot) and do it well and that's it.

    So we've got a whole bunch of Apache servers which a bucket load of apache processes who basically spend all day doing little more than exec'ing the same CGI over and over (and copying the data around a couple of extra times).

    I'm pretty much now convinced that would my next step is going to be to franken-meld my cgi with something like mini-httpd so it is a single, persistant, app.

    I'm certainly not redoing the whole thing in Java though! :)

    --
    Shut up, be happy. The conveniences you demanded are now mandatory. -- Jello Biafra
  22. Re:New Webserver? - not good by 1010011010 · · Score: 2

    I'm thinking that their "better webserver" isn't so hot, considering the "connection refused" messages I'm getting.

    --
    Napster-to-go says "Fill and refill your compatible MP3 player", which is a lie. It's not MP3. It's WMA with DRM.
  23. What have we learned? by Defiler · · Score: 2, Funny

    The moral of this story:
    If your website is dynamically generated from a database, and your name isn't Amazon.com, don't let Slashdot link to you.
    A single $999 box isn't going to stand up to Slashdot, unless every page is static.

    1. Re:What have we learned? by sharkey · · Score: 2

      A single $999 box isn't going to stand up to Slashdot, unless every page is static.

      Don't you mean, "...unless each page really says *Server too busy*"?

      --

      --
      "Outlook not so good." That magic 8-ball knows everything! I'll ask about Exchange Server next.
  24. building a web server??? by Mudhiker · · Score: 2, Troll

    I'd call this buying a web server rather than building one...

    --
    "I want peace on earth and good will toward men." "We're the U.S. government. We don't do that sort of thing!!"
  25. argh, server performance vs BANDWIDTH by green+pizza · · Score: 4, Insightful

    Is it just me, or do most folks confuse these two. If a popular website only has a 9 Mbps pipe to the Internet, it doesn't matter how many Crays they have running their webserver farm, they're only going to be able to churn out 9 Mbps (minus overhead). Granted that the converse is possible... gobs of bandwidth, but a slow server... but I would imagine that bandwidth is the limiting factor of at least 99% of websites.

    1. Re:argh, server performance vs BANDWIDTH by Ratbert42 · · Score: 2, Funny

      ...it doesn't matter how many Crays they have running their webserver farm...


      You've obviously never worked with Java.

    2. Re:argh, server performance vs BANDWIDTH by shut_up_man · · Score: 3, Insightful

      The server being the bottleneck does sometimes happen, particularly with high-volume websites. If hits are coming in faster than the server can process them, they queue up. CPU usage skyrockets, free memory shrinks, the server starts to thrash, and it often spirals down into a state where it refuses new connections until it's processed the ones it has. This is why you often see HTTP 1.1 / Server Too Busy errors - the server has been swamped. Not the link.

      Tuning a web server is also a bit of an art - most default settings don't take full advantage of the hardware, they throw out Too Busy messages before the CPU/memory is full utilised. Parameters such as queues and worker threads need to be increased to accept more connections. Of course, this can lead to overtuning, where the parameters are set too ambitiously, the server bites off more than it can chew, and chokes.

      Modern web servers on modern hardware can serve a frightening number of flat html pages per second - the real problems stem from poorly optimised dynamic code, usually to do with databases. Sure it's cute to have the site navigation automatically generate from a database query, but it's insanely inefficient. It'll work great under normal light loads, but when you get linked from Slashdot, you're dead.

    3. Re:argh, server performance vs BANDWIDTH by SuiteSisterMary · · Score: 2

      Yup. And you'd be horrified to learn how many enterprise websites run with MS Access as the back end. As I used to tell clients, "Would you use Excel to do corporate accounting? No? Then why Access for corporate databases? They come in the same package....." Here's an example, real basic. You've got a table with a list of states. You have a dropdown on your webpage which lists those states. You'd be frightened (yet again) to know how many 'application programmers' will hit the database every time they want that dropdown to build. Do something more efficent. Depends on your app server of choice, but one example is to read the thing from a global variable. If the variable is a) empty or b) too old then you load the variable from the database. And that's just a real basic example.

      --
      Vintage computer games and RPG books available. Email me if you're interested.
    4. Re:argh, server performance vs BANDWIDTH by SuiteSisterMary · · Score: 2

      You need state for things like login models, shopping carts, and the like. And it can be efficient to keep it server side, not to mention more secure. But if you're that worried, then you're blowing the money to store state info in the database anyway, so it doesn't matter which server in the farm you wind up at. Either that, or you have a really intelligent load balancer, that will send new sessions to low-load servers and existing sessions to their original server.

      --
      Vintage computer games and RPG books available. Email me if you're interested.
  26. Re:OSDN: Please read this by dmelomed · · Score: 2, Informative

    Bah, speak for yourself. Java relies on the virtual machine, so that's your bottleneck (as in beer and performance). With proper software (like the new version of Apache still in beta) and tuning, or other threaded servers like aolserver or Xitami and PHP or modperl instead of Java I bet my money _that_ configuration will scale better.

    Also, don't confuse the CGI protocol with short-lived CGI binaries. Slashdot uses modperl, whcih is NOT a short-lived process, but Apache is still a forking server in the 1.3.x branch.

  27. "Real Multithreading" considered harmful by john@iastate.edu · · Score: 2
    True -- often it's simpler to 'roll your own' multithreading with select/poll/etc.

    It's pretty easy to just do:

    for (;;) {
    n = select(...);
    perConnStructPtr = getPerConnPtrByFd(anActiveFd);
    ...
    }

    after all.

    --
    Shut up, be happy. The conveniences you demanded are now mandatory. -- Jello Biafra
    1. Re:"Real Multithreading" considered harmful by Skapare · · Score: 2

      This is not really multithreading. The correct term is multiplexing. See W. Richard Stevens' books APUE and UNP.

      --
      now we need to go OSS in diesel cars
    2. Re:"Real Multithreading" considered harmful by statusbar · · Score: 2


      And then stick in a call to 'gethostbyname()' and watch all your multiplexed tasks freeze while the nameserver hangs trying to find a nonexistant hostname.

      --jeff

      --
      ipv6 is my vpn
  28. Compression for dialup connections??? by Lumpish+Scholar · · Score: 4, Informative

    Consider a user with a typical analog modem that has an average maximum downstream throughput of, say, 5 KB/s. If this user is trying to download the general message board index page, about 200 KB in size (rather small by today's standards), it will require a solid 40 seconds to complete this single download.... To maximize the efficiency of the network itself, we can compress the output stream and thus, compress the site. HTML is often very repetitive, so it's not impossible to reach a very high compression ratio. The 200 KB request mentioned above required 40 seconds of sustained transfer on a 5 KB/s link. If that 200 KB request can be compressed to 15 KB, it will require only 3 seconds of transfer time.

    Except that 56 Kbps modems get 5 KBps thoughput by compressing the data! If the client and server compress, the modems won't be able to; the net effect is lots of extra work on the server side, and probably no increased throughput for the modem user.

    The server might or might not see a decrease in latency, and in the number of sockets needed simultaneously; it depends on how much it can "stuff" the intermediate "pipes". The server will see an overall decrease in bandwidth needed to serve all the pages.

    Ironically, broadband customers (who presumably don't have any compression between their clients and Internet servers) will see pages load faster. (And the poor cable modem providers from the previous story will be happy.)

    --
    Stupid job ads, weird spam, occasional insight at
    1. Re:Compression for dialup connections??? by Betcour · · Score: 3, Informative

      I am affraid you are wrong, the modems get 5 KB/s of raw data, not counting compression. I can download zipped files at over 5 KB/s with a dialup modem...

      mod_gzip is your friend.

    2. Re:Compression for dialup connections??? by victim · · Score: 5, Informative

      One other factor to consider is that the gzip transfer encoding compresses much better than the algorithm in the modem. Part of this is the algorithm with its larger dictionary size, the other part is the `pure' data stream being fed to it. It is just the html, not the html interspersed with ppp, ip, and tcp headers.

    3. Re:Compression for dialup connections??? by Fjord · · Score: 2, Informative

      No he's right. You are right that the 5KB is raw data: that's what he is saying. But the difference between whether it's compressed by the server or compressed by the modem is abstract: there are cases where one is better than the other. But, for the most part, compressing it on the server is slightly better than letting it compress downstream, plus it can increase your bandwidth (which is what the article was talking about) and the speed of transit before it gets to the modem-to-modem link, so it is worth doing.

      --
      -no broken link
    4. Re:Compression for dialup connections??? by zerocool^ · · Score: 2

      You also have to consider that any amount of compression will help.

      Undernet coder-com was working on an idea to add to ircu.d that would (on multi proc machines) use one processor for the irc functions and the other, which was usually regulated to everyday mundane functions (running ssh server, typical processes) to compress data going from server to server to reduce the lag time in some of the long jumps like *.eu to *.us. This was in the wake of the 3Gbps DDoS attacks on the system, causing several servers to delink. (we miss you irc2.att.net)
      So compression server side has lots of uses, not just for modem lusers. When the vast majority of what you're transfering is conversational text, compression works wonders

      ~z

      --
      sig?
  29. Why Sun? by hughk · · Score: 3, Insightful
    Having a quick dig through the article at the far from lightning speed that a /.ed site runs at, I am still no absolutely clear why they stuck with SPARC architecture.


    SPARCs come from Sun, everybody makes a PC - so guess which is cheaper? We see some reasons why they went for the Blade (a nice machine, but rather more expensive than a couple of PCs).


    Please get this right, I'm no x86 fan, but I love the competition going through the line from the processors, chip-sets, mother-boards, etc. This has got to ensure that unless you really want the 2GHz Pentium 4, you have plenty of choice.


    As for reliability, I don't know the Blade, but the SPARC 20s used to give some headaches over their internal construction. It always seemed a little complicated with the daughter boards and they seemed to lose contact after machines were moved around.

    --
    See my journal, I write things there
    1. Re:Why Sun? by nuetrino · · Score: 5, Insightful
      Because you have absolutely no clue as why they chose the Blade, one must assume you did not do much digging before wasting bandwidth with your post. The article went into great depth explaining why they bought the Blade. The high points were power consumption, lack of a serious and fully supported OS, lack of a server class PC in their price range, the $1000 price tag, and the fact they already had the software written to run on Solaris. They admitted that could get an x86 for a little less, but it wasn?t enough to make good business sense.

      I am amazed at how people buy into the myth of cheap PC?s. Yes, if you are technically oriented and are not running critical applications, a cheap PC will be ok. On the other hand, I have been involved with several enterprises in which my employer insisted on going with cheap PC?s at the expense of short- and long-term productivity. One certainly cannot get a server class PC for $500, and there is few if any available for $1000. I would not say that a Blade would make a good office machine, but it seems to be a good choice for a server.

    2. Re:Why Sun? by Lumpish+Scholar · · Score: 2
      http://www.aceshardware.com/read.jsp?id=45000243
      On the x86 side of things, we found that much of the inexpensive x86 hardware is targetted towards the home market and, accordingly, was not really suitable to the task at hand. Intel-based servers offered by OEMs did not offer much of a price break over our SPARC options, if any at all. As for the DIY market, there was a premium associated with the more high-end motherboards and other components we desired. Commodity hardware prices aside, a platform change would incur its own costs in the form of investments in software that would have to be replaced.
      I think the software development costs (they'd already done a lot of work for a platform they knew, apparently with some specific third party tools not available for Solaris/x86) were their biggest consideration. (They also mention "sparse hardware support" for Solaris/x86.)

      Oddly, their OS choices for x86 seemed to be Windows 9x and Solaris; no mention of NT/2000/XP, let alone Linux or *BSD.
      --
      Stupid job ads, weird spam, occasional insight at
    3. Re:Why Sun? by Skuld-Chan · · Score: 2, Interesting

      I use two sun's at home - one is a SS10 (my firewall running 2.4.14) and the other is a SS20 (my file/web/webcam server) - it does samba, nfs and ftp for files - and it has a videopix digitizer for webcam stuff.

      Why did I chose sparc? Well its a tad quieter then a X86 box, smaller, and (and this is the point) it uses up a lot less power. The SS10 ships with a 65 watt ps (at least mine did). Considering you can get these things for less then 25~65 dollars they are a bargain (I paid 25$ for the SS10 and 65$ for the SS20). Anyhoo I kept my SS10 running for 30 minutes on a 300 va ups when the power went out last week - I doubt its drawing more then 25 watts peak. The software is still free since it runs debian linux well (and you can get sloaris for it too for free)

      Plus - I have the added advantage that for some reason sun equipment is like a geek's dream - they look kinda cool sitting on the table next to the cable connection. Everyone who has ever come by has to comment on them somehow - either "whats that" - or "wow - you have one of those?". Don't get me wrong - there slow, (the SS10 has a cacheless microsparc in it), but the SS10 seems to keep up with the 4 megabit cable connection okay.

    4. Re:Why Sun? by Billly+Gates · · Score: 2
      Remember that acehardware was first made in 1997. Gnu and Linux were viewed as too experimental and not proven for use in the server space. Also x86 server hardware was only a few years old and not real mature. Only Novell was used with it at the time. Many in IT viewed x86 as unreliable.


      So ace probably had to make a decision. Could we A.) Use this new WindowsNT with IIS 2.0 and make this work with questionable quality x86 hardware? or could we B.) Use a standard UNIX variant on standard UNIX hardware and purchase the software tools to make our site. or C.) have a third party company make the decision for us. (which they would obviously choose UNIX).



      Now in 2001 the x86 market has changed. Its now the opposite of the past. In the old days it was hard to find any UNIX for x86 besides skunkware. Anyway they have invested in solaris and I assume they do not own much of the software if a third party wrote it or it was sun specific. I assume it would be relatively easy to port it to linux but why go through the effort. This is why they went with sun. Also even in 1997 the old sun workstation was loaded with features you still could not get with a pc at the same price. I do agree that a dual processor x86 system might better sense then a single SPARC system. SMP machines appear to work so fluidly under heavy loads. But I guess they had there reasons. I would of spent more bucks for a dual SPARC system if I were them but they are alot more technical then I am.



      Also pentium4's are unreliable and have high latency rdram. The latency wouldn't affect regularly work performance running pc apps or games but on a server it will cripple it. Remember that is not just the speed of the ram but also the responsiveness when alot of users query it with requests. Also The pentium4's get really hot which is another reason why they chose a sun. If a fan dies and the board and cpu burn then shit hits the fan. . Also after a few days of downtime could cost ace most of its customers. Thats really bad and reliability is important.

    5. Re:Why Sun? by Zog · · Score: 2, Informative

      One of the great things about sparcs is their performance under load - they're a *lot* better at running under high loads than your typical pc.

      About pc's having more competition, it's not a hard argument that the competition isn't really what it seems to be - most of the competition is in price and how fast Quake will play. If Intel's processor is a little bit slower than AMD's, the fact that it still goes into most OEM computers will keep Intel alive. If Sun does not stand up to the competition with their processors, motherboards, and other components, people will leave them for something better, and Sun will be down the hole. They *have* to be better to survive - there's not much forcing people to stick with them.

      They're also a lot more solid in their roots (Sun servers have been around forever, so they've had a lot of time to work on tweaking things and getting processors to work well for their applications), and Sun's support generally ranges from fairly good to downright amazing, from what I've heard (not that I've needed it).

      But in the end, it's a lot different from PC hardware, and it can sometimes take a bit of getting used to.

    6. Re:Why Sun? by Anonymous Coward · · Score: 2, Informative
      I am amazed at how people buy into the myth of cheap PC?s...

      You mean people like Google who run their highly-regarded search engine/translator/image indexer/Usenet archive on a server farm of 8,000 inexpensive PCs with off-the-shelf Maxtor 80GB IDE HDs?

    7. Re:Why Sun? by ameoba · · Score: 2

      Well, one of the big arguments against placing a "cheap PC" into a server role is that the hardware isn't built to the same standards as higher-priced server-grade hardware. Now, it would seem to me that the Blade, by virtue of being the low-end desktop model in Sun's lineup, would be the victim of the same cost-cutting, and itself not be adequate for webserver duty.

      Of course, if you ask me, the article was just an x86 hardware-review site's attempt to justify using non-x86 hardware on their new server.

      --
      my sig's at the bottom of the page.
  30. Re:New Webserver? - not good by john@iastate.edu · · Score: 5, Informative
    Well, lots of big iron gets crushed by the slashdot effect too. This thing is running on a piddly little Sun, after all. And it was very responsive early.

    One thing that does seem to work against the onslaught is a throttling webserver. If you haven't got the bandwidth etc to serve a sudden onslaught of requests, probably the best thing to do is to just start 503'ing -- at least people get a quick message 'come back later' instead of just dead air.

    --
    Shut up, be happy. The conveniences you demanded are now mandatory. -- Jello Biafra
  31. ode to SPARCstation 20 by green+pizza · · Score: 4, Interesting

    The SPARCstation 20 was one heck of a great machine back in the day, especially for its size (a low profile pizzabox). The design was a lot like it's older brother (the SPARCstation 10 from 1992)... that is, two MBUS slots (for up to 4 CPUs) and 4 SBUS slots (Sun Expansion cards, 25 MHz x 64 bit = ~ 200 MB/sec each, but 400 MB/sec bus total).

    I remember using a Sun evaulation model at Rice many years ago... the machine had two 150 MHz HyperSPARC processors (though 4 were avilable for more $$), a wide SCSI + fast ethernet card, two gfx cards for two monitors, and some sort of strange high speed serial card (for some oddball scanner, I think). Not to mention 512 MB of ram, in 1994! The machine was a pretty decent powerhouse and sooo small! I sort of wish the concept would have caught on, given how large modern workstations are in comparison. Heck, back then an SBUS card was about 1/3 the size of a modern 7" PCI card.

    Then there's the other end of the spectrum... one department bought a Silicon Graphics Indigo2 Extrme in 1993. The gfx cardset was three full size GIO-64 cards (64 bit @ 100 MHz = about 800 MB/sec), one of which had 8 dedicated ASICs for doing geometry alone. 384 MB of RAM on that beast. Pretty wild stuff for the desktop.

    Ahh, technology. I love you!

  32. Re:OSDN: Please read this by Lumpish+Scholar · · Score: 3, Informative

    Ousterhout says threads are bad for apparent concurrency but good for taking advantage of multiple processors, and for building scalable servers.

    In other words, with the right hardware architecture, threads could be very useful for sites such as Ace's Hardware (though they happened to go with a uniprocessor) and Slashdot.

    Java threads are also easier to program than C and C++ threads, though not easy. (Manual memory management is hard; thread programming is hard; manual memory management in a threaded program is very hard. I'm not speaking hypothetically on the last point; I've really envied Java programmers the last few weeks.)-:

    --
    Stupid job ads, weird spam, occasional insight at
  33. Re:Quick page, good read by NerveGas · · Score: 5, Insightful



    Actually, that's a terribly wasteful way to go. If you work on an easily-scalable infrastructure, then you can pretty much purchase capacity as it's needed, which not only frees up capital for a longer time, you end up spending a lot less, as the price of computers is always dropping, and the performance is always going up.

    steve

    --
    Oh, you're not stuck, you're just unable to let go of the onion rings.
  34. Uh oh... by Fesh · · Score: 2

    Ace's Hardware? Why do I see a nasty trademark violation in some poor webmaster's future?

    *sigh* Probably because we've seen enough of it in the past...

    --
    --Fesh
    Kill -9 'em all, let root@localhost sort 'em out.
  35. Confusing the issues by Alex+Belits · · Score: 4, Informative

    In a part about databases and persistent connections they confuse the issues more than a bit. The real problem is not too many processes, what automatically makes threads look better, but the symmetry among processes -- any request should be possible to serve by every process, so all processes end up with database connections. This is a problem particular to Apache and Apachelike servers, not a fundamental issue with processes and threads.

    In my server (fhttpd I have used the completely different idea -- processes are still processes, however they can be specialized, and requests that don't run database-dependent scripts are directed to processes that don't have database connections, so reasonable performance is achieved if the webmaster defines different applications for different purposes. While I didn't post any updates to the server's source in two last years (was rather busy at work that I am leaving now), even the published version 0.4.3, despite its lack of clustering and process management mechanism that I am working on now, performed well in situations where "lightweight" and "heavyweight" tasks were separated.

    --
    Contrary to the popular belief, there indeed is no God.
    1. Re:Confusing the issues by Alex+Belits · · Score: 2

      PHP already does connections pooling -- it doesn't help at all, IIS still has to be multithreaded. On Windows multithreading is necessary because of poor system design (out of process COM servers suck), so Microsoft engineers had no better choice anyway, but on Unix multiple processes allow to make more clean and secure design without any noticeable overhead, so there is no need to use multithreading unless it's a developer's goal to use exclusively multithreaded monsters like Java.

      --
      Contrary to the popular belief, there indeed is no God.
    2. Re:Confusing the issues by TheLink · · Score: 2

      I use FastCGI and Apache. With FCGI the app itself actually persists and waits for connections. The webserver connects to the app and gets the stuff back.

      The webserver doesn't increase much in size having it serve static pages isn't a waste.

      Since the app itself persists it can do what it want with DB connections. The app can be threaded or nonthreaded.

      In these sort of circumstances looking to some sort of buffering would help a lot too - stuff that sucks the page from your servers at 100Mbps and trickle it down to some poor 9.6 dial up user. That way the number of persistent DB/app connections doesn't really go up at your server, even when the number of persistent users connecting to your site does.

      --
    3. Re:Confusing the issues by Alex+Belits · · Score: 3, Informative

      FastCGI is better than just a bunch of symmetric processes, however it has some serious flaws -- among them poor security model for processes that run on other hosts (fhttpd reverses the logins, backends' connect to the server, and those connections authenticate on the server), and a need to proxy the response through a server for processes that run locally (fhttpd passes a client's fd to the backend process).

      Other than that, FastCGI is a good idea.

      --
      Contrary to the popular belief, there indeed is no God.
  36. Great new webserver, but... by asn · · Score: 2, Interesting

    http://www.aceshardware.com/read.jsp?id=45000241

    500 Servlet Exception

    java.lang.NullPointerException
    at BenchView.SpecData.BuildCache.(BuildCache.java:96)
    at BenchView.SpecData.BuildCache.getCacheOb(BuildCach e.java:82)
    at BenchView.SpecData.BuildCache.getLastModified(Buil dCache.java:45)
    at BenchView.SpecData.BuildCache.getLastModifiedAgo(B uildCache.java:50)
    at _read__jsp._jspService(/site/sidebar_head.jsp:60)
    at com.caucho.jsp.JavaPage.service(JavaPage.java:87)
    at com.caucho.jsp.JavaPage.subservice(JavaPage.java:8 1)
    at com.caucho.jsp.Page.service(Page.java:474)
    at com.caucho.server.http.FilterChainPage.doFilter(Fi lterChainPage.java:166)
    at ToolKit.GZIPFilter.doFilter(GZIPFilter.java:22)
    at com.caucho.server.http.FilterChainFilter.doFilter( FilterChainFilter.java:87)
    at com.caucho.server.http.Invocation.service(Invocati on.java:277)
    at com.caucho.server.http.CacheInvocation.service(Cac heInvocation.java:129)
    at com.caucho.server.http.HttpRequest.handleRequest(H ttpRequest.java:216)
    at com.caucho.server.http.HttpRequest.handleConnectio n(HttpRequest.java:158)
    at com.caucho.server.TcpConnection.run(TcpConnection. java:140)
    at java.lang.Thread.run(Thread.java:484)

    Resin 2.0.2 (built Mon Aug 27 16:52:49 PDT 2001)

  37. Re:New Webserver? - absolutely by victim · · Score: 3, Informative

    Speaking as the maintainer of a site that is periodically slashdotted...

    Yes, a throttling server is a great idea. If you recognize that there will always be a load too high for you to handle (10 requests per minute for my site, yes minute, it is a physical device), then you must either decide to deal with the load or let the load crush your machine.

    Consider a typical web server. When it gets overloaded it slows down, each request takes longer to handle, there are more concurrent threads, overall efficiency drops, each request takes longer to handle.... welcome to the death spiral. (on my site-which-must-not-be-named-less-it-be-slashdotte d, everyone waiting in queue gets a periodic update, at a certain point the load of generating the updates swamps the machine. I have to limit the number of people in queue.)

    The key decision is to determine how many concurrent threads you can handle without sacrificing efficiency and then reject enough traffic to stay under that limit.

    This is where optimism comes in and bites you in the ass. You remember that every shunned connection is going to cost you money/fame/clicks whatever so you set the limit too high and melt down anyway.

  38. smoke test by anasophist · · Score: 2, Funny

    brag up new server
    kind soul links us from slashdot
    looks like we eat crow

    --
    anarchy rules
  39. other factors (such as the router) by green+pizza · · Score: 4, Interesting

    There are more factors than just CPU and Bandwidth... like what's between the two. A new coworker recently told me of his major learning experiences in the mid 1990s running several popular news websites durring the beginning of the web boom. One of the more popular sites he ran originally had a T1 routed through a Cisco 4000 router. Things worked great until he had an additional, load balancing T1 added for added thruput and redundancy. Things didn't feel much faster, in fact, they were almost slower. After much investigation he learned that the router didn't have enough RAM or CPU to handle the packet shuffling that intelligent multihoming routing requires. A similar instance happined with a friend's company when they tried to run a T3 through their existing router. While the old cisco had enough cpu and ram in theory, its switching hardware and thruput couldn't handle the full number of packets the T3 was providing thru the shiny new HSSI high speed serial card.

    Now, I realize modern hardware (Cisco 3660 and 7x00 series, and pretty much any Juniper) can route several T3s (at 45mbps each direction) worth of data, but older routers and minimally configed routers do exist.

    There are MANY bottlenecks in hosting a website. Server daemon, CPU, router, routing and filtering methods, latency and hops between server and internet backbones, overall bandwidth thruput, and much more.

    It's not as simple as "lame server, overloaded CPU, should have installed distro version x+1".

  40. Disk IO on the Blade 100 by Doktor+Memory · · Score: 3, Insightful

    ...is crap crap crap crap crap. The Blade 100 is one of Sun's IDE-based machines. Because Sun expects that such boxes are going to be used either as low-end workstations (the Blade 100) or disk-avoiding compute farm servers (the Netra X1), the disk subsystem of them is painfully below par: Sun routinely ships under-speced IDE disks (remember the 4800 RPM drive? Sun does, and they've got a whole warehouseful to refresh your memory with!) and compounds the problem with Solaris 8's ATA/IDE drivers, which are the worst in the known universe -- watch your entire system drag to a half as the OS attempt to write out a .5MB file! Whee!

    I don't know what Ace's traffic numbers are normally like, but using a Blade 100 for anything other than a small, personal website is flat-out folly. At a minimum, they should have been using a Netra T1/AC200 ($3k, nicely configured, and a 1U rackmount machine to boot), and I would probably have thought seriously about scrounging a used E250 or E220R off of Ebay.

    --

    News for Nerds. Stuff that Matters? Like hell.

  41. Argh: not such a good webserver.... by larien · · Score: 2
    Seems to running a tad slow ATM; getting timeouts on www.aceshardware.com...

    Mebbe they really needed a v880 or summat before they started getting posted on /. :)

  42. it's the BANDWIDTH by green+pizza · · Score: 5, Informative

    If you haven't noticed by now, Ace's Hardware has a neat little indicator on each page that shows time processing and queue time it spent getting to you (very bottom left-hand corner of each page). Most are about 74ms - 112ms for me. This, plus the result of some pings and traceroutes leads me to belive they're heavily BANDWIDTH bound right now, not CPU bound. I do hope Ace puts up a summary of the Slashdot effect as well as some other data for us to pour over. Some MRTG router graphs of the bandwidth usage would be *really* nice, too.

    1. Re:it's the BANDWIDTH by daviddennis · · Score: 2

      As I go through the article, I see 90843ms and 117882ms, so I fear your are mistaken. Darn.

      Almost every server I've ever seen using JSP is dog slow. They have what look like very nice reasons for using it, but it sure doesn't look like they quite work out in practice.

      Anyone know why?

      D

  43. Re:New Webserver? - not good by srvivn21 · · Score: 3, Interesting

    If you can't live without Apache, there's always mod_bandwidth.

    Not quite as elegant a solution, but it's nice for preventing your web server from taking all of your bandwidth (if, say, you run it off your cable modem, and wish to continue gaming...).

  44. Compression, Caching, GIFs/JPGs by billstewart · · Score: 2

    Occasionally you'll find a web page that's got several hundred KB of actual text, but it's usually not that way - most of the bits are decorative GIFs or JPGs which your modem won't compress. So you've got to pay attention to it upfront - use image formats that are already compressed (compare GIFs, JPGs, newer formats like DjVu, different resolutions), and pay attention to how much you want to clutter up the pages with them. Are they fundamental content? Nice but could be lighter weight? Unnecessary clutter when you could use a nice solid-color background instead? How often do you reuse them? Can you cache them effectively, either in the user's browser or ISP, or does the browser think each one of those customized bullets is a different dynamically generated file that it needs to download?

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
  45. Java Vs. PHP...multithreaded vs multiprocess? by closedpegasus · · Score: 2, Interesting
    The article mentions that it rebuilt all its web applications in Java as opposed to PHP, and it seems the main reason they did this was to go from multiprocess to multithreaded. However, PHP can be compiled as a shared object (for apache, or as an ISAPI extension for windows), and does do multithreading, database connection pooling, and all those other goodies. It seems they had been using PHP as a CGI...hrmmm. Not a good idea.

    Speed shouldn't be the reason you switch to Java. If anything, I've found that PHP has been faster for simple web applications and page serving (and loads faster to develop applications with), while Java stands out as being more robust and stable.

  46. fork'd childs use to much mem..... by shadoelord · · Score: 3, Interesting

    quote:
    This means an Apache web server using keepalives will need to have more child processes running than connections. Depending upon the configuration and the amount of traffic, this can result in a process pool that is significantly larger than the total number of concurrent connections. In fact, many large sites even go so far as to disable keepalives on Apache simply because all the blocked processes consume too much memory.

    ::end quote::

    lets see, anyone here hear of COW (copy on write) Linux uses this idea to save time on fork'd child processes, they get the ::same:: address space, and only get new memory when they try to touch a page that is write only (ie they can run and run and run, but once they try to access their memory they get new memory space with the contents copied). It saves time and memory.

    The only setback is when a process fork's a child, its current time slice is cut in half with half given to the child, so the main proc will run aground if to many requests come in and the server has more processes to worry about. :(

    -ShadoeLord

    --
    this is my sig, there are many like it, but this one is mine.
  47. Multithread Apache by Zeinfeld · · Score: 3, Informative
    The article preens itself over the use of multithreaded code over the multiprocess model of Apache. This is potentially a big win since the multiprocess model involves a lot of expensive process context swoitching and process to process communication which is expensive as opposed to thread switching.

    When I discussed this issue with Thau (or to be precise, he did most of the talking) he gave the reason for using processes over threads as the awful state of the then pthreads packages. If Apache was to be portable it could not use threads. He even spent some time writing a threads package of his own.

    I am tempted to suggest that rather than abandon apache for some java server (yeah lets compile all our code to an obsolete byte code and then try to JIT compile it for another architecture), it should not be a major task to replace the Apache hunt group of processes with a thread loop.

    The other reason Thau gave for using processes was that the scheduler on UNIX sux and using lots of threads was a good way to get more resources, err quite.

    Now that we have Linux I don't see why the design of applications like apache should be compromised to support obsolete and crippled legacy O/S. If someone wants to run on a BSD Vaxen then they can write their own Web server. One of the liabilities of open source is that once a platform is supported it can end up with the application supporting the platform long after the O/S vendor has ceased to. In the 1980s I had an unpleasant experience with a bunch of physicists attempting to use an old MVS machine, despite the fact that the vendor had obviously ceased giving meaningfull support for at least a decade. In particular they insisted that all function calls in the fortran programs be limited to 6 characters since they were still waiting for the new linker (when it came it turned out that for functions over 8 characters long it took the first four characters and the last four characters to build the linker label... lame, lame, lame)

    --
    Looking for an Information Security student project suggestion?
    Try http://dotcrimeManifesto.com/
  48. Re:Quick page, good read by TheLink · · Score: 2

    Trouble is if you have per user access controls on the content :(.

    More sophisticated caching needed.

    --
  49. we never need more than 2 GB......8) by leuk_he · · Score: 2

    They took a "powerfull" desktop and made it the new server. When i look at the sun site you can see this is a desktop that is not very upgradable, they already took it to almost the top.

    Memory: Max 2Gb, 2Gb used. (4x increase old memory) may sound a lot but "we will never need more than 640Kb" and already 50% is used and "not growing."
    Processor: 500 Mhz now 25% used. But no more extra processors are possible. (I know 1 sun Mhz != 1 athlon Mhz, but 25% load is far fro near idle)

    They can work arround this limitations by placing an extra server and placing some functions on the other server, but they started with that in their case an extra server would be an extra point of failure.

    In other words, if they keep developing their site we will see such an article agian in one or 2 year. gues this one will be about load balancin g on cheap (sun or x86) hardware.

    I am a little bit suprised they didn't use x86 hardware since that is waht they review all the time. They looked futher than what you would expect.

  50. Also dynamic vs static built dictionary by horza · · Score: 2

    It's not just the size of the dictionary, but with a data stream the dictionary has to be dynamically built and adapted. With a static file the whole of the data can be analysed at once for the optimum dictionary, which can then be appended to the compressed data.

    Phillip.

  51. Inefficient DB usage by horza · · Score: 2

    I agree. I have come across this many times, including a rather extreme example of where I reduced a stock import time for a book retailer from 12hrs to under 30 seconds by (a) re-doing the tables and throwing away useless joins and (b) rewriting the Perl in C using better algorithms eg pre-buildng and doing one insert instead of doing a two pass insert then update. Another example when displaying results about 20 books, instead of doing for (i=1...20) select and doing 20 queries, do select where in (list) which gets the same results in one query. Designing web applications requires more than just the ability to code, you really need to know the architecture of the whole system and how they interact.

    Phillip.