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."

286 comments

  1. How quick by Anonymous Coward · · Score: 0

    Is quick enough ?

  2. good read by Anonymous Coward · · Score: 0

    good read

  3. Re:Building a Better Squicker... by Anonymous Coward · · Score: 0

    That was beautiful, man.

  4. 5 min and a can of soda by Anonymous Coward · · Score: 0

    No posts yet. Looks like most are taking the advice.

    1. Re:5 min and a can of soda by Anonymous Coward · · Score: 0

      I had to dash off to the can, Dr. Pepper gives me the runs. Caffeine and prune juice, what a great idea!

  5. 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!

    1. Re:What all companies should do by Anonymous Coward · · Score: 1, Interesting

      But they didn't really go through a validation process. They appear to make numerous assumptions, but they don't have any test data to prove them.

      Our company has worked similarly, but what we've begun to do recently is test our assumptions. We throw a test load against the server and then watch each component to see how it performs in reality.

      I would have liked to see a real comparison between the two machines serving live web content. They don't do that. :(

    2. Re:What all companies should do by Delrin · · Score: 1

      Another thing that usually is overlooked is browsing habits. Were the habits of your users to change unexpectedly, likely it would affect performance in unpredictable ways. I suppose there is a framework needed to define thresholds far in advance.

  6. 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 Iamthefallen · · Score: 1

      *bork* Looks like they should have gotten a bigger machine afterall, got halfway through it here...

      --
      Wax-Museum Fire Results In Hundreds Of New Danny DeVito Statues
    2. Re:New Webserver? by Archie+Binnie · · Score: 1

      That's funny, I only have the one account. And I only say something when I have anything mildly interesting to mention. So.. well, I think it's a case of karma evny doctor...

    3. Re:New Webserver? by Anonymous Coward · · Score: 0

      It didn't, but what does one expect from a server bogging itself down with .jsp pages?

    4. Re:New Webserver? by mummers · · Score: 1

      Unfortunately it doesn't seem to have stood up long enough to read the article. I suppose I'd better put my can back in the fridge...

      Sigh, and I was hoping I could use it to justify a quad Xeon server with 4GB of RAM as the next web app's server on our 8 user LAN....

      --
      --This isn't a man who is leaving with his head between his legs.
    5. Re:New Webserver? by Iamthefallen · · Score: 1

      doh, I wish I learned how to copy and paste properly

      Regarding load on their server
      Here you can see how the total number of threads varies with the workload throughout the day. The maximum number of concurrent threads shown here is 117. The average is around 90 to 100 until later on in the day when the thread count drops down into the 80s and then finally around 75 by midnight. Resident memory size for the web application (the entire Java process) remained at 260 MB for the entire day. In fact, it has never really grown far beyond this size. The size remains relatively static because the caches are a fixed size and the applications do not grow over time (i.e. no memory leaks). The database acquires a fixed amount of memory upon initialization, and it is configured to use 512 MB. Currently, the server reports a total of roughly 1 GB of free, unallocated memory. So, we have quite a bit of room to grow with our new system.

      I really wanna see todays numbers...

      --
      Wax-Museum Fire Results In Hundreds Of New Danny DeVito Statues
    6. 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
    7. Re:New Webserver? by ivanandre · · Score: 1

      its already slashdotted...

      sweet and bitter irony, isnt it?

    8. Re:New Webserver? by pimpinmonk · · Score: 1

      No, I don't think they are that intelligent. Their server uses java server pages!

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

      No, I haven't seen it yet, it's totally slashdotted. ;o)

    9. Re:New Webserver? by micromoog · · Score: 1, Flamebait

      It's been an hour now, and it's still down (root URL too). If I ever read this article, I'll be sure not to do whatever they recommend.

    10. Re:New Webserver? by Null_Packet · · Score: 1

      Blammo.

      java.lang.NullPointerException
      at com.caucho.server.http.Application.getAttribute(Ap plication.java:2779)
      at AcesHardware.tags.DiscussionTag.doStartTag(Discuss ionTag.java:47)
      at _site._sidebar_0articles__jsp._jspService(/site/si debar_articles.jsp:17)
      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 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.QRequestDispatcher.include( QRequestDispatcher.java:338)
      at com.caucho.server.http.QRequestDispatcher.include( QRequestDispatcher.java:247)
      at com.caucho.jsp.QPageContext.include(QPageContext.j ava:467)
      at _read__jsp._jspService(_read__jsp.java:84)
      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)

    11. Re:New Webserver? by Anonymous Coward · · Score: 0

      can you say BLOAT

    12. 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]

    13. Re:New Webserver? by rbeattie · · Score: 1

      I'm AMAZED at how fast this site comes up. On a 33 kbps modem in freakin' Spain and these pages popped up on my screen like I had them cached. Faster, actually. It probably had a lot to do with the compression he was talking about in the article. I've got to look at doing that on my home page, it's just So NICE when that pages snaps up like that. (And it's being /.ed... impressive.)

      This is a great article. I only use Java for my server development and now I've got some really great amunition for the non-converted.

      -Russ

      --
      Me
    14. Re:New Webserver? by Anonymous Coward · · Score: 0

      Can you say CLUE?

  7. 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. . .
    2. Re:Best webserver to generate traffic by josquint · · Score: 1

      LOL

      But, Officer, I swear i didnt write code red as a virus, just a web server load tester!

    3. Re:Best webserver to generate traffic by Anonymous Coward · · Score: 0

      You are an idiot. LOL

  8. looks good so far... by turbine216 · · Score: 1, Redundant

    going on 5 minutes after the initial posting, and still no slashdotting...

    Seems to me that these guys might be onto something here...or maybe they just really know what they're talking about...

    1. 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.

    2. Re:looks good so far... by Anonymous Coward · · Score: 0

      It is about 5:22pm EST and I don't have any access. Let the SLASHDOT begin

    3. Re:looks good so far... by Anonymous Coward · · Score: 0



      He's dead Jim!

    4. Re:looks good so far... by naskovz · · Score: 1

      I'm givin' ya all she's got kap'n!
      Whoe'r glued this one together
      was surely fooled by S*n marketing.
      I may be able to salvage her, but
      I can not promise anything. Do you
      pe'pl have any C or PHP on yer planet?

  9. Quick page, good read by guinness_duck · · Score: 1

    Well it did load quickly.

    It was a good read and I wish we could do something vaguely similar with our web servers here. Not that we get the server load to demand such improvements at the moment, but I figure it's best to spend the money early on, get a good setup going that can handle high volumes, that way you're not caught with your pants down when things take off for you. It's unfortunate bean counters never think this way.

    Of course I don't think I'll be taking this approach at home - even if it would be fun to have a Sun Blade sitting in the living room purring along answering the 1 or 2 web hits we get a day.

    --
    In a row???
    1. 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.

    2. 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.
    3. 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.

      --
  10. 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 SilentChris · · Score: 1, Offtopic
      Uh, that's meant to say shorting the debug pins on the *motherboard*. Although, if you find a keyboard with debug pins, let me know. I'd be curious to see what happens...

      *Congratulations screen: you can now type in Swedish Chef! Bork, Bork, Bork!

    2. Re:Offtopic XBox server by Anonymous Coward · · Score: 0

      The ATA33 hard drive cable...connected to the SCSI Hard drive? I'd like some of what you're smoking, please.

    3. Re:Offtopic XBox server by IIOIOOIOO · · Score: 1

      You know it's bad when the link to the offtopic post is ALSO /.ed!

    4. Re:Offtopic XBox server by Anonymous Coward · · Score: 0

      tee hee perhaps your off topic article should read this on topic article that you reply to! i can't get to that site! good thing that my experience is always the experience of everyone, thanks to the power of inductive reasoning! uhhhhh, wait, i have to go escape or something....see ya!

    5. Re:Offtopic XBox server by Anonymous Coward · · Score: 0

      Where did you get SCSI? Everything I've seen says that it is either a Seagate 10Gb or WD 8Gb IDE drive in there. All the pictures I've seen would agree with that. Why would they put the expense of SCSI into the Xbox when it isn't needed? They are trying to keep it competitively priced with PS2, Game Cube, etc.

    6. 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.

  11. Quick Guide to Building a Web Server by jd · · Score: 1, Troll
    • 1. Start off with deciding what you want on it.
    • 2. Delete, destroy, burn, remove, obliterate anything and everything that isn't on that list.
    • 3. Since the information is likely already on the Internet already, save yourself the time and effort, and burn the list, too.
    • 4. If you insist on going ahead, the order of precidence is: Speed of response, usability, readability, quality, accuracy, honesty, believability. People will believe anything that's delivered to them quickly. Just ask the Afghans.
    • 5. Trust nobody and nothing. Distribute widely. Keep your laser handy. Alpha Complex will be completed shortly. Please wait.
    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    1. Re:Quick Guide to Building a Web Server by Guy+Innagorillasuit · · Score: 0

      Sounds like someone's been playing Paranoia.

  12. For nails, hammers and light bulbs maybe, but by Anonymous Coward · · Score: 0

    is a hardware store really the right place to shop for a server?

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

    1. Re:talking about better web server. by Anonymous Coward · · Score: 0

      No, that would be a webserver provided with more internet bandwidth. Has nothing to do with the server itself.

    2. Re:talking about better web server. by Anonymous Coward · · Score: 0

      That really depends.

      Right before it went down, every page I requested came back as a nasty looking Java stack trace. Obviously, this tends to suggest a software problem, not a bandwidth problem.

  14. What a load of ...you know. by Anonymous Coward · · Score: 0

    They should have used Zope.

  15. 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
    1. Re:Good article, but... by Anonymous Coward · · Score: 0

      The topic of the article is "How to Build a Better Web Server". The pages you link to describe how to setup a web server using IIS. You're OffTopic.

    2. Re:Good article, but... by Anonymous Coward · · Score: 0

      Anyone else notice they have a performance stamp on the bottom left hand corner of the page? when I first start reading this article, it was a 2-4 ms, then it got /.ed, then I was lucky enought to connect again and it grow to 62218 ms then the last successful connection I got a 139784 ms! Is it me or is it Java is too resource intensive?

    3. Re:Good article, but... by Anonymous Coward · · Score: 0

      It is you.

  16. 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 Penis_Envy · · Score: 1

      The main reason why I did not get the X1 is that it does not have an optical (cdrom/dvdrom) drive. Yes, jumpstart rules, but it's more of a pain that popping a cd/dvd into the drive and booting off that.

    2. 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

    3. 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.

    4. 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.
    5. Re:Why not get the server version - Netra X1? by Anonymous Coward · · Score: 0

      Odd . There seem to be smartcard readers on the batch of X1s I got here.

      And drivers are definitely there in Solaris 8 (7 isn't supported on X1)

    6. Re:Why not get the server version - Netra X1? by Anonymous Coward · · Score: 0

      Three letters: I-D-E

  17. /.ed by Anonymous Coward · · Score: 0

    Already /.ed. Next.......

    1. Re:/.ed by Anonymous Coward · · Score: 0

      Hmm... The 5 minutes is to wait for their new super fast server to respond?

    2. Re:/.ed by Anonymous Coward · · Score: 0

      That's right, because its connection is saturated. Doesn't matter what kind of webserver is running, if there's not enough bandwidth.

  18. Re:OSDN: Please read this by fatboy · · Score: 1

    Considering Slashdot is one of the slowest sites on the Net, and crashes frequently, I think that the Slashdot owners should really read this.

    aceshardware.com _JUST_ fell over. I guess it couldnt keep up with /.

    --
    --fatboy
  19. /.ed by terradyn · · Score: 0, Redundant

    Well, it looks like the new server was unable to handle the load from us. It's not responding at all...

  20. 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.

    1. Re:I usually... by NerveGas · · Score: 1

      Meself, I never hesitate to use multi-processor machines. While the increase in capacity is always nice, it's the increase in responsiveness under load that really makes them shine.

      steve

      --
      Oh, you're not stuck, you're just unable to let go of the onion rings.
  21. 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.

  22. 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?

    1. Re:Am I the only one... by Anonymous Coward · · Score: 0

      Yes, you are.

      Learn to read, then come back.

    2. Re:Am I the only one... by MrDolby · · Score: 1

      Yep if you read the article they explain why on the first page. (or maybe it was the second page)

    3. Re:Am I the only one... by Schwamm · · Score: 1

      Maybe you should check my link. ;-)

    4. Re:Am I the only one... by Anonymous Coward · · Score: 0

      it was a joke. tough to figure out, i know, since there was no smiley... damn sublte fuckers...

    5. Re:Am I the only one... by Cheese+Metal+Rulez!! · · Score: 1

      It was not a joke, it was word association so blindingly obvious that everyone else filtered it out as being irrelevant when they read it.

      Hint: Jokes involve "wit"

  23. 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
    1. Re:Update by ericdano · · Score: 1

      Slowing down? It's Dead Jim!

      --
      It's either on the beat or off the beat, it's that easy.
      I moderate therefore I rule!
      --
    2. Re:Update by Anonymous Coward · · Score: 0

      Some of the graphs didn't show up at all for me, even after several tries to re-load them.

  24. Suprise, Suprise! by Poppageorgio · · Score: 0, Redundant

    Hmm.... New server huh? Can't connnect, so apparantly it can't take being slashdotted....

    --
    Me fail English? That's unpossible!
    1. Re:Suprise, Suprise! by Anonymous Coward · · Score: 0

      Has nothing to do with the server, you ignorant sack of puss. The /. effect saturates the server's internet connection.

    2. Re:Suprise, Suprise! by Anonymous Coward · · Score: 0

      You should be more careful calling people ignorant.

      $ telnet www.aceshardware.com 80
      Trying 216.87.214.213...
      telnet: connect to address 216.87.214.213: Connection refused
      telnet: Unable to connect to remote host

      Since you seem to be none too bright, I'll point out that I got the Connection refused message instantly, which means that they have plenty of bandwidth, their OS is fine, and their webserver has crashed (or otherwised unbound port 80).

  25. Re:OSDN: Please read this by Anonymous Coward · · Score: 0

    While I can hardly argue with the MySQL bit, but if you think a site this big does (or possibly could) run via CGI, you're incredibly inexperienced.

    Weblogic, complete with native performance pack (since the stock java one-thread-per-connection model could never scale) is still slower than a well tuned Apache server..

    Apache is fairly slow, but Java is slower. What it comes down to is that Apache is always fast enough to saturate whatever bandwidth you have. If you have a large amount of bandwidth, you've already clustered for relability.

    If you're worried about truely high performance on a single CPU (by far the most common case for webservers) an event driven single process model will destroy both a multithreaded and a multiprocess model.

    Optimizing your webserver for SMP machines is stupid, since webserving is trivially paralellizable, and clustering gets you better reliability and is usually cheaper in these days of inexpensive 1U servers...

  26. 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.
  27. 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?

    1. Re:Down already? by Anonymous Coward · · Score: 0

      It didn't crash, you idiot. Bandwidth is saturated. The /. effect isn't about knocking out a machine, it's about saturating its connection.

    2. Re:Down already? by Anonymous Coward · · Score: 0

      I could ping the box, and SYNs to port 80 got a RST instead of a SYN+ack.

      This means that the OS was up and running, there was plenty of bandwidth available, but no process was listening on port 80.

      So, in closing: It did crash, you idiot.

  28. 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!
    1. Re:Devote my time? by wljones · · Score: 1

      Response was slow, but other /.ed sites won't even work on my slow K6-2 system. These people have a winner, and the /. community is proving it.

    2. Re:Devote my time? by Anonymous Coward · · Score: 0

      Winner my ass, their webserver software was down for over an hour! The bandwidth and the OS were fine.

      I'd think twice about using Resin (a quick glance shows that they don't even use a JNI based native networking layer, which is the only reason websphere and weblogic are even remotely usable).

  29. 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."
    1. Re:the Ultimate Webserver is... by Anonymous Coward · · Score: 0

      Funny, but practical. Load balance at the DNS.
      Have 50 /.ers serve mirrored pages with virtual hosting
      in Apache off their home PCs (Win2000 and Linux) over their cable modems or DSL. You add their
      CPU AND extra bandwidth. How about we make the worlds largest web serving cluster?
      (btw Apache 1.3.23 on Windows 2000 Professional SP2 does not suck)

  30. 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).

  31. 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.
    1. Re:good but... they discounted x86 to fast by NerveGas · · Score: 1

      If you compare the straight performance of an X86 CPU to a different architecture, it can come out very good, average, or very poor, depending on what you're doing with it. However, when you compare the cost vs. performance, they really do start to shine. I, myself, pitted a $13,000 quad-Xeon against a $25,000 dual-Alpha for database work, and the Xeon handily bested the Alpha. Had the work been pure number crunching, though, the results probably would have been backwards.

      A lot of the extra money that you spend on "big iron" hardware is spend getting tremendous amounts of I/O to the various CPU's. For something like a database server, where your app pretty much has to run on a single machine, that's great. For something as simple as web-serving, which is extremely easy to cluster, you're wasting your money. Ten $2,000 Intel-based machines will deal out far more than one $20,000 Sun/IBM/Alpha.

      In fact, when one company was doing an embedded solution based on the Strong-ARM chips, just for fun, they used ten of them to dish out over a million web pages per *minute* - and that was with StrongARMs.

      steve

      --
      Oh, you're not stuck, you're just unable to let go of the onion rings.
  32. 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...

    1. Re:Just a can by sasha328 · · Score: 1

      I don't like pepper that much. It makes one sneeze. I prefer coke myself. Is that why I can't read the article?

  33. 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
    1. Re:True by Anonymous Coward · · Score: 0

      If you're just doing it for fun and some experience, go make your bastard half-breed.

      But if you're just interested in better performance you could get 95% of the way there just by switching to fast-cgi.

      And if you want absolute balls to the wall performance, rewrite as a user-space TUX module (writing kernel space modules gets you next to no speedup, and its much harder to debug).

    2. Re:True by john@iastate.edu · · Score: 1
      If you're just doing it for fun and some experience, go make your bastard half-breed.

      I wouldn't say an application that directly implements the HTTP protocol but isn't a general purpose web-server is a half-breed. SWAT is one well-known example.

      But if you're just interested in better performance you could get 95% of the way there just by switching to fast-cgi.

      A reasonable course of action for a general-purpose web-server, but when you've got a CGI that is doing everything anyway, I don't see the value in keeping the first tier.

      And if you want absolute balls to the wall performance, rewrite as a user-space TUX module...

      That's an incorrect platform assumption...

      --
      Shut up, be happy. The conveniences you demanded are now mandatory. -- Jello Biafra
  34. New Webserver For 21st Century Goes Down by SloppyElvis · · Score: 1

    I was enjoying the article until it /.'ed, and I couldn't get anymore pages to load.

    Therein, a stress test to the folks at Ace's Hardware.

    1. Re:New Webserver For 21st Century Goes Down by Anonymous Coward · · Score: 0

      No, the server didn't go down. Its internet connection was saturated. It's fucking pathetic how people can't understand such a simple concept. But then again, this is Slashdot, where a little knowledge is stretched a long way. Kinda like the CISC vs. RISC comments.

    2. Re:New Webserver For 21st Century Goes Down by Anonymous Coward · · Score: 0

      It crashed. It was serving Java stack traces instead of pages right before it went down.

      Slashdottings are almost always bandwidth related, but this was a Java appserver, and not clustered either.

      Its fucking pathetic how quickly you jump to incorrect conclusions though. Perhaps you should take your own advice and start expanding your knowledge instead of stretching it.

    3. Re:New Webserver For 21st Century Goes Down by SloppyElvis · · Score: 1

      Who are you, the fucking grammar police? Half of the fucking article is about software techniques for handling requests expeditiously to avoid network saturation, dickhead. Apparantly, these techniques were not sufficient. The article indicates a need to serve "millions of requests a day"; it fell short. If you think I meant the server ceased functioning, then you're thinking too hard, genius.

    4. Re:New Webserver For 21st Century Goes Down by Anonymous Coward · · Score: 0

      ooooooh, okay! I assumed from your title that you implied the server went kaput. I'd refer to it as Semantics Police rather than Grammar Police. And besides, software techniques can only go so far. You know that.

    5. Re:New Webserver For 21st Century Goes Down by Anonymous Coward · · Score: 0

      Shush, fellow AC. The Ace's folks throttled their server (Resin) to a number of threads they considered suitable for their bandwidth. Those stacktraces people saw weren't caused by the server crashing. In javaese, we call those uncaught exceptions. The fact that most everyone stopped seeing those after a point indicates that the bandwidth was exceeded, regardless of what some people say about telnet connections refused. After what happened, the Ace's folks educated everyone about the thread limit of 200 they had originally set (which was responsible for stack traces), why they increased it to 500 after seeing their server was able to handle more, and how they would need more bandwidth if they were to survive more /.ings. (and presumably, they would need to set the thread limit accordingly)

      So you are so totally correct that the thread limit throttled the number of hits it could handle prior to their connection getting clogged -- remember that's what caused the traces (we think). I shall endeavour to learn more about java threading in app servers rather than stretching my knowledge to cover that period right before the bandwidth really is exceeded!

      Cheers!

      Thanks for the thrashing, btw. It's good to have a little sense beaten into me when I start bitching too quickly.

    6. Re:New Webserver For 21st Century Goes Down by SloppyElvis · · Score: 1

      Obviously, but I stand that it is my Grammar that was wrong. What I meant to say was

      "New Webserver For 21st Century" Goes Down

      in reference to the website going down, not the server itself. Sorry about the tirade, I am easily offended.

      We must end this destructive conflict and bring order to the galaxy [Darth Vader]

    7. Re:New Webserver For 21st Century Goes Down by Anonymous Coward · · Score: 0

      Aha! Missing quotes! For shame, SloppyElvis, FOR SHAME!

      Don't apologize for the tirade. I originally set out to get your goat, while at the same time trying to make a point. And now that THAT'S settled --- have a nice day!

  35. 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.
  36. 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 indigo78 · · Score: 1

      My (around) $999 box at University has been slashdotted (on FTP, not on HTTP) and it hasn't been able to stand for more than 3 hours. The effect passed in a couple of days. The network administrator just went to my desk asking why it had served around 20Gb of data in less than 24 hours... Maybe linking your site to Slashdot is a good crash-test benchmark...

      --
      I'm fat, you're ugly. I can get slimmer, and you?
    2. Re:What have we learned? by Anonymous Coward · · Score: 0

      Incorrect, a single $999 box could stand up to /. if it had enough bandwidth.

    3. 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.
  37. about 'that' long by Anonymous Coward · · Score: 0

    Well, they seem to be slashdotted, now. Great webserver. *snicker*. Oh man.

  38. Re:OSDN: Please read this by Eloquence · · Score: 1
    Considering Slashdot is one of the slowest sites on the Net,

    Actually Slashdot is usually one of the fastest site on the Net for me. I frequently use it to test if my DSL connection works properly. Their scripts/database often get hosed at high loads, though, I wonder what the bottleneck is. But Java as a replacement? Puhleeaze..

  39. 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!!"
    1. Re:building a web server??? by Steve+Hamlin · · Score: 1

      Although...,

      I would image to some web-heads, assembling a complex, heavily loaded, discussion-based magazine/community forum is the actual building of the website.

      They just buy what server works, hardware details are for wrench monkeys :)

  40. A can of Dr. Pepper by Anonymous Coward · · Score: 0
    Sounds like blatant advertising to me!

    Dr. Pepper's website. Check it out, yOU!

    While you're at it, why not purchase a Dell computer?

  41. Slashdotted by ptrourke · · Score: 1

    /.ed Well, so much for THAT idea . . .

    1. Re:Slashdotted by Anonymous Coward · · Score: 0

      So much for Java, I got this:

      500 Servlet Exception
      java.lang.NullPointerException
      at ToolKit.DbConnection.(DbConnection.java:15)
      at AcesHardware.tags.ArticlesTag.doStartTag(ArticlesT ag.java:48)
      at _site._sidebar_0articles__jsp._jspService(/site/si debar_articles.jsp:15)
      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 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.QRequestDispatcher.include( QRequestDispatcher.java:338)
      at com.caucho.server.http.QRequestDispatcher.include( QRequestDispatcher.java:247)
      at com.caucho.jsp.QPageContext.include(QPageContext.j ava:467)
      at _read__jsp._jspService(_read__jsp.java:82)
      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)

  42. Dr. Pepper by CrazyDwarf · · Score: 0

    I devoted a can of Dr. Pepper to this article... had to replace my keyboard. I guess that wasn't a good idea, huh?

    --
    It's easy to stand out when the general level of competence is so low.
  43. Re:New Webserver? ooh, ooh, it's up again!!! by mummers · · Score: 1

    Aha! Realtime load dependant hardware upgrades! That's gotta be the plan!

    Now let's just see...

    --
    --This isn't a man who is leaving with his head between his legs.
  44. 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 dmelomed · · Score: 1

      That's because they're not trafic shaping their link. They should limit web traffic to a few mbps. Also they should only allow such a number of clients as to always return a reply from the server to the client (i.e., The maximum number of clients is reached, come back later).

    2. Re:argh, server performance vs BANDWIDTH by Anonymous Coward · · Score: 0

      See, that's what I'm saying. Thank you for not being ignorant! Most /.ers have just enough knowledge that they think they can speak intelligently ("enough knowledge to be dangerous").

    3. 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.

    4. 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.

    5. 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.
    6. Re:argh, server performance vs BANDWIDTH by Anonymous Coward · · Score: 0

      Uhh... global variable implies you are holding some sort of state on the server. That's certainly not scalable.

    7. Re:argh, server performance vs BANDWIDTH by Anonymous Coward · · Score: 0

      i don't know what you're talking about, blowhard, java servlets are fast as hell

    8. 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.
    9. Re:argh, server performance vs BANDWIDTH by Anonymous Coward · · Score: 0

      Repeating something often enough still doesn't make it true, although Sun's marketing department has used that technique to good effect on unsophisticated java programmers.

      the only appservers that aren't slower than fuck (I mean the ones that are just pokey, like weblogic (with the Native Performance Pack) or websphere) are the ones that have their entire network layer written in native code.

    10. Re:argh, server performance vs BANDWIDTH by Anonymous Coward · · Score: 0

      Sun Box, has a proc that RUNS java byte code!

    11. Re:argh, server performance vs BANDWIDTH by Computer+suck! · · Score: 1

      I'd have it in a db (as it's easier toupdate) (or a .properties file), but i'd cashe it.... ohh follow the link, and what does it basicly tell you to do.

    12. Re:argh, server performance vs BANDWIDTH by 3am · · Score: 1

      once i load tested a java based content server - 5 clients over a LAN couldn't max it out.

      granted, even IIS servering up static files is a hundred times faster... but 3 of these java servers each serviced 100-300K requests in a given day with a 20 page/sec peak load. and they were greatly underutilized (cpu's (2) only reach 10% of capacity). granted, the lead developer was a hell of a programmer.

      blah, in any case, point taken. but nobody uses java for the performance ... the big advantage is that .java files are a lot easier to read than .asm ones and that it leaves a smaller hole when you shoot yourself in the foot.

      --

      A: None. The Universe spins the bulb, and the Zen master merely stays out of the way.
  45. 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.

  46. "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
    3. Re:"Real Multithreading" considered harmful by oogoody · · Score: 1

      Without profiling where time is being spent
      people are just pissing in the wind.
      Library calls are a common bottleneck, especially
      memory allocation.

      And you are not a real programmer if you
      can't handle multithreading. Jeesh.

  47. Re:OSDN: Please read this by Anonymous Coward · · Score: 0

    I read through those slides, and the biggest drawback to threads given was that people are too dumb to use them properly. While I certainly agree with that sentiment, it doesn't make using threads bad in and of itself.

    I also disagree with the assertion that concurrent execution is an exceptional case rather than a typical case. It may be exceptional in terms of individual steps being performed, but it's been my experience that it's a common occurence on an application level. Simplistic GUIs work well with event-driven approaches. Most tasks could be 90% handled by event-driven approaches. But a lot of operations have some subtasks that would be better handled by concurrent execution.

  48. 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 theantix · · Score: 1

      Of course, servers are also paying for their bandwidth, so any savings there would likely be helpful to them. It would be a tradeoff though, between increased server processing and decreased bandwidth costs.

      --
      501 Not Implemented
    4. Re:Compression for dialup connections??? by Pussy+Is+Money · · Score: 0
      Except that 56 Kbps modems get 5 KBps thoughput by compressing the data!
      No, ~50000 baud is actually the nominal connection speed. With compression that can lead up to perhaps ~15K effective transfer speed.
      --
      Pushin' 'n dealin', shovin' 'n stealin'
    5. 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
    6. Re:Compression for dialup connections??? by Anonymous Coward · · Score: 0
      yeahbut.

      Few ISPs "do" header compression or anything, so that modem compression with the small window etc will actually give you better throughput overall than no modem compression / with server compression. ... However; the negative effect of uncompressable (gzip'd) data in the stream the modem is working is lessened because of the protocol redundancy... So I'd guess ARQ/gzip will benchmark the best.

      Yes, this is an (educated) guess. So is anything anyone else says, until they show test numbers fer a particular application. "web serving" will work as an app fer me; and who has some numbers?

      ...entropy always increases; and that's OK

    7. 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?
  49. How disappointing by borud · · Score: 1
    the title lead me to believe that it might be an
    article discussing how to design better webserver
    software -- something which would have been
    very interesting since it has been ages since I
    saw a fresh take on that.


    instead: another article on piecing together hardware. *sigh*

    1. Re:How disappointing by mummers · · Score: 1

      Sigh, just more Sun drenched propaganda.

      What a waste of a good can of sugary gut-rot.

      --
      --This isn't a man who is leaving with his head between his legs.
  50. Yep its slashdotted. by Anonymous Coward · · Score: 0

    Yep I can't get to the site, its slashdotted. Hmm, I wonder if some people try to get sites posted just to have them taken down. It would be kind of like a poor mans DOS attack.

  51. 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 Christian+Smith · · Score: 1

      One reason, stated in the article, is that the UltraSPARC IIe uses only 13W of power for the CPU and intergrated memory controller and PCI controller. Apart from the main CPU, then, there'll be no chips requiring heat sinks, and very little heat to disperse. Less heat means generally more reliable if any other cooling fails (like A/C.)

    2. 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.

    3. 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
    4. Re:Why Sun? by klaun · · Score: 1
      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).

      SPARC does not come from Sun. See the SPARC organizations homepage. I believe Sun actually purchases many of its chips from another company. SPARC is a standard. Of course other people have addressed why you are wrong about everything else you've said.

    5. 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.

    6. 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.

    7. Re:Why Sun? by Mister_Rogers · · Score: 1


      I deal with these issues pretty frequently and I agree totaly with you. Development costs are much higher than server costs in most cases. I am developing a site right now that will cost about $150,000 to design, code, test and launch. The hardware will initially consist of Linux with Apache, PHP, and Mysql running on a $2500 machine. Later it may need a few machines, a load balancer and an Oracle database on a $5000 machine. The hardware cost will never get anywhere close to the software cost though.

    8. 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.

    9. Re:Why Sun? by Anonymous Coward · · Score: 0

      HAHAHA, funny one, fanboy.

      SPARC is open like Java is open.

    10. Re:Why Sun? by Anonymous Coward · · Score: 0

      "One of the great things about sparcs is their performance under load"

      I see this claim a lot, usually from people who know absolutely nothing about hardware or even low level software.

      By what mechanism do you propose SPARC's being superior under load? Lets analyze this:

      The best definition of load from a CPU's perspective is the amount of time not spent HALTed. So how do you propose that x86 CPUs perform more slowly when they spend less time HALTed? You won't say 'heat' if you've ever used a UltraSPARC III box.

      The only remotely rational explanation I can come up with is that higher end SPARC chips have large caches, and people who don't know better confuse performance under load with performance with a large working set.

      Of course, this arguement is pretty ridiculous, because you're comparing high end expensive SPARCs with low end x86 chips. Xeon's can have huge caches too, and the SPARC in the Blade 100 used in this article has a cache comparable to commodity x86s (256Kb of offboard L2, compared to 256Kb of onboard L2 for the PIII). RISC code tends to be larger, which means the SPARC needs more icache just to keep up.

      And no one (not even Sun itself) tries to claim that a 500Mhz SPARC IIe, like the one in the Blade 100 compares to even a relatively old x86 chip like a 1Ghz PIII.

    11. 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?

    12. Re:Why Sun? by Anonymous Coward · · Score: 0

      Bought barebones: 1.3 tbird, 2 ide drives.
      installed linux:software raid and lvm.
      Apache 1.3.19-mostly static material.

      Scales fine, no problems.
      Cost: $600

    13. Re:Why Sun? by Anonymous Coward · · Score: 0

      How much more open do you want it?
      1) Funded by Sun, Controled by a Sun/Developer colalision(sp)
      2) Aviable Source
      3) GPL version (Kaffe)

      why do you take a look at java before talking crap.

    14. 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.
    15. Re:Why Sun? by Anonymous Coward · · Score: 0

      Though there were several factors involved in their choice of SPARC over x86, they seemed to emphasize two things: they didn't want to change their software, and they didn't feel like changing platforms.

      From the perspective of the software, I got the impression that they were dumping their old software; they moved from Apache/PHP to Java. And, given that Java is supposed to run unmodified on all platforms, it would seem that the software wouldn't necessitate staying with the same platform. There may be other software compatability issues, but they certainly didn't cover them in the article, so who knows.

      My guess is that they simply didn't care to change platforms. Their admin probably has a long history/love affair with Solaris and he pushed for that platform. This is how it tends to work in the real world.

    16. Re:Why Sun? by pravel · · Score: 1

      The server they are using is far more expensive than $1000. For $1000 you get 256MB memory, and terribly slow IDE hard drive. Was it more like $2000?

    17. Re:Why Sun? by hughk · · Score: 1
      Tha ks, that was on one of the pages that I couldn't find due to the /. effect.


      The only real reason that I see is the platform migration penalty for software. For DIY, I have plenty of options on the x86 side that I would be happy with for long-term server use. On the OEM side, PC Servers come in two classes: 1-2U high designs for rack-mounting (typically at ISPs) and monsters with space for oodles of disks. Either way you pay a penalty. If you don't want either evry small systems or very large systems then it is easier to get a relatively cheap commodity midi machine and maybe stick an extra fan into it.

      --
      See my journal, I write things there
    18. Re:Why Sun? by hughk · · Score: 1
      In answer:
      1)If Java was open, they should give it to ANSII, ECMA or ISO.
      2)The source is available but under a very restrictive license.
      3)The GPL version is incomplete and fails to run many aplications.

      In short SPARC is slightly less open than Java, but neither are truely open.

      --
      See my journal, I write things there
    19. Re:Why Sun? by hughk · · Score: 1

      I would count a tad more (say $800) for this especially with ECC memmory, but you make my point. A lot cheaper then $1000 or more likely $1500.

      --
      See my journal, I write things there
  52. 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
  53. aha... by Anonymous Coward · · Score: 0

    Now I see why Ace's crapped out while I was reading the article --- I witnessed the /. effect live. In fact, I was a victim of it. Boo hiss.

  54. 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!

    1. Re:ode to SPARCstation 20 by Animixer · · Score: 1
      Actually, the Extreme graphics set came with (1) Geometry pre-processor, (2) Raster Engines, and (3) OpenGL processors. I'm currently using an Indigo^2 Extreme (R4400 200mhz, 256mb RAM) as my webserver, and it has absolutely no problem maxing out my pitiful 384kbaud upstream). :)

      As a side note, Indigo^2 owners had to wait until the later purple-box High/MaxImpact grapcics sets to get hardware texturing support and texture RAM.

      A truly cool machine is the Crimson Reality Engine. By far, the most sexy deskside box EVER.

      --
      man tunefs | grep fish
  55. better server :)? by sintetika · · Score: 1, Flamebait

    500 Servlet Exception
    java.lang.NullPointerException
    at com.caucho.server.http.Application.getAttribute(Ap plication.java:2779)
    at AcesHardware.tags.DiscussionTag.doStartTag(Discuss ionTag.java:47)
    at _site._sidebar_0articles__jsp._jspService(/site/si debar_articles.jsp:17)
    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 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.QRequestDispatcher.include( QRequestDispatcher.java:338)
    at com.caucho.server.http.QRequestDispatcher.include( QRequestDispatcher.java:247)
    at com.caucho.jsp.QPageContext.include(QPageContext.j ava:467)
    at _read__jsp._jspService(_read__jsp.java:84)
    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)

    1. Re:better server :)? by imrdkl · · Score: 1
      at com.caucho.server.TcpConnection.run(TcpConnection. java:140)

      Hello Resin!

    2. Re:better server :)? by Anonymous Coward · · Score: 0

      Looks like a typical null pointer exception bug in the application software. Definitely *not* the server's fault.

  56. 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
  57. null pointer exception! by icejai · · Score: 0

    Looks like their article was their server's achille's heel....

    very ironic.

  58. 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.
  59. Dont care about integrated video? by josquint · · Score: 1

    Of course, the integrated video and sound is not very important to us, as the system runs headless mounted in a rack.

    Just a thought, but video would be really handy for the install, i'm guessing!

    So... anyway, in short it looks like they took a workstation and dropped a shitload of ram into it... big deal

    1. Re:Dont care about integrated video? by gclef · · Score: 1
      Just a thought, but video would be really handy for the install, i'm guessing!


      For Solaris? Not likely. I've installed Solaris on a few dozen Solaris boxes, and never needed a monitor on a one of them. They'll dump console out ttya if they don't find a monitor or keyboard, and you can build them from the network with jumpstart.

      Monitors? Bah, they're for wimps.

    2. Re:Dont care about integrated video? by Computer+suck! · · Score: 1

      bah, install thats what the com port is for.

  60. 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 Anonymous Coward · · Score: 0

      Or you could just do connection pooling like Microsoft does in their server.

    2. 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.
    3. 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.

      --
    4. 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.
  61. Irony by Anonymous Coward · · Score: 0

    I find it kind of ironic that I cant see read and artilce on building a better server because of server problems ("The page cannot be displayed") :oP

  62. SunBlade 100? by dead+sun · · Score: 1

    I found it somewhat funny that here I am working on a SunBlade 100 in my university's computer lab and they consider this enough to be their webserver. While it's a nice box, I certainly wouldn't use the thing as a mainstream server.

    --
    If not now, when?
  63. It's dead, Jim! by Anonymous Coward · · Score: 0

    It sure didn't last very long.

  64. Re:Dont care about integrated video? nope. serial. by Penis_Envy · · Score: 1

    the best thing about working with sun vs. working with x86 is that you don't need a monitor/video card. The serial console works just fine.

    If you managed to get the first page (sounds like you did) you could see they were doing it headless, most likely (hopefully) with some sort of console server. Of course, I don't know if you've ever worked with anything but x86.

    So, no, they really don't care about the integrated video.

  65. Re:A can of Dr Pepper ? by Anonymous Coward · · Score: 0

    But it's a wonderful chaser for Seagram's 7...

  66. 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)

  67. 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.

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

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

    --
    anarchy rules
  69. still slashdotted an hour later? by swimfastom · · Score: 0
    It's been a whole hour since the link was first posted on /. and http://www.aceshardware.com/ still doesn't work!

    What a great webserver... I think an increase in bandwidth is in order.

    Linux is like a wigwam - no windows, no gates, apache inside!

    --
    http://tomgould.com/
  70. Irony by humungusfungus · · Score: 1

    5:45pm EST.

    Site is toast. Can't wait to read the article.

    --
    No sig.
  71. Slashdotted by Vantage · · Score: 1

    I find it very funny that this article in about a better web server and the site is unreachable. Slachdot effect??

  72. A better webserver... by Anonymous Coward · · Score: 0
    ...doesn't do this

    500 Servlet Exception

    java.lang.NullPointerException at BenchView.SpecData.BuildCache.<init>(BuildCa che.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...

    Sorry guys, you fail the /. test
  73. what could be more ironic by smp-enabled · · Score: 1

    man oh man,
    its gotta hurt their pride to write a good article like that just to succomb to /. 's wrath...
    Good article but i didn't see any pictures because their server buckled....

  74. Excuse me?!? by Anonymous Coward · · Score: 0

    This presentation is barely junior level CS work. I'm horrified that this is even being referred to as the support for an argument concerning threading vs. non-threading. Ousterhout sees threading everything as a problem, but that should be obvious to anyone who has looked at the drawbacks of threading in the first place. As an alternative, he proposes THE EXACT PROBLEM THAT THREADING TRIES TO SOLVE.

    Event-driven software is a dead-obvious design for anyone who has spent any time looking at code, and threading is a godsend to solve the problems that event-driven design can't handle. But I don't think anyone really involved in the science of computer science sees the two ideas at odds with each other so much as they are complimentary programming techniques.

    Since you are obviously a non-programmer, let me put it into these terms: Event-driven computing is like addition. After a while, you realize that saying 2 + 2 + 2 + 2... is a pain in the ass so someone teaches you multiplication (threading in our analogy). So now it's easier to do certain types of addition, but that DOESN'T mean that everything you do should be multiplication. Sometimes it's easier to simply say 2 + 3 instead of (2 * 1) + (3 * 1). Just like these two math functions, threading/events are just programming techiques, one harder than the other, but not mutually exclusive.

    My brain is still reeling that this guy actually bothered to put together a powerpoint presentation on the subject (provided he's not a programming teacher).

  75. telnet: Unable to connect to remote host by neo2k · · Score: 1

    How ironic is it that the site authoring a guide to 'Building a Bettwe Webserver' is apparantly 'slashdotted'?

    neophyte@tumeke:~$ telnet www.aceshardware.com 80
    Trying 216.87.214.213...
    telnet: connect to address 216.87.214.213: Connection refused
    telnet: Unable to connect to remote host

  76. My 56K modem... by alder · · Score: 1
    usually gets 5.2 KB/sec transferring DEBs. Those are quite compressed files. On the other hand, while downloading webpages it is not uncommon to see 7-10KB/sec.

    Hence beyond conserving some/a lot (depending on the nature of a web site) bandwidth, gzip actually improves perceived download speed for modem users. Just compare modems 2-3x compression, and possible huge numbers gzip may get on big files with a lot of similar patterns. To highlight my point I just compressed a specific web page (an atypical case, but... :-) from inittial size of 117,340 to 4,466 bytes :-D

  77. We should ask for a followup re: Slashdot Loadtest by aphor · · Score: 1

    At first glance, I would say a 500MHz Sun BL100 might be a tad on the underpowered side for a web server with broad user appeal, but I'm really interested in a deep and meaningful way to hear the followup on their design article with all of the Slashdot Effect taken into account.

    Why 64bit? Is there a lot of big integer math going on here? Does the web server/jvm do a lot of memory-copy operations on data that is 64 or more bits large? What kind of stuff does ldd(1) tell you about the 64bit implications of the web server?

    How *is* the disk IO on the blade? That's the traditional bottleneck for any system design to tackle first. How about their Internet provider's network? That's the first culprit in low-cost systems' ability to handle more concurrent users. What is the CPU spending most of its time doing?

    --
    --- Nothing clever here: move along now...
  78. Would have read it but.... by The_THOMAS · · Score: 1

    ... it took almost five minutes to load the splash page.

    --
    Ya Sure! You Betcha!, The_THOMAS
    1. Re:Would have read it but.... by eltriggo · · Score: 1

      fast now. didn't expect to find you here. Interesting comparison of apache/php and java/jsp

  79. Re:Dont care about integrated video? nope. serial. by josquint · · Score: 1

    Gotcha, makes sense not to have a video/sound card then. If with the Sun system you can use a serial console, you can save the resources that an unused video/sounds system takes.

    I've used mostly x86, and get too used to having a monitor hooked up to any machine 'cuz if i need to do anything major(i.e. reinstall), a remote terminal just dont work.

  80. Hell yeah! by Anonymous Coward · · Score: 0

    Looks like the server about building a better server is actually a really crap server.

    Slashdot - Beating the living shit out of servers, everyday.

  81. slashdotted? by sootman · · Score: 1

    At the bottom of the page are load times. I visited while this was still the top story here. First page load time was 3 ms. Page 2 was 59,000 and change. Page 3 timed out. :-)

    --
    Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
  82. Jokers by Anonymous Coward · · Score: 0
    These guys are using a workstation system, with no redundancy, and are claiming this as a masterclass in building a webserver*. Give me a break. I've built Linux x86 systems that are more resilient, faster and cost a lot less money.

    * I assume that's what they're claiming -- I couldn't read beyond the second page because all I got was errors

  83. Re:We should ask for a followup re: Slashdot Loadt by Anonymous Coward · · Score: 0

    The server apparently is spending alot of time dealing with the .jsp!

    I've seen pentium 166's cope better than this site.

  84. It is alive by Supa+Mentat · · Score: 1

    It's back it already recovered from the load. That seems like a pretty good recovery time after a /.ing to me.

    --
    "A witty saying proves nothing." - Voltaire
  85. Stress-test by Fuzzums · · Score: 1

    Wow! New server, new configuration. Hey George, let's find a way to stress-test the configuration.

    Good plan, Stan. Let's write an interesting article and post it on Slashdot. I bet it can handle all them readers!

    Yup, so do I, George. So do I!

    [And the rest is history...]

    --
    Privacy is terrorism.
  86. 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".

    1. Re:other factors (such as the router) by Anonymous Coward · · Score: 0

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

      You make a lot of good points, but in this case, it is actually that simple. If you HAVE to use a Java appserver, use one like Weblogic or Websphere that has a native code networking layer. The default Java networking package forces one thread (at absolute minimum, sometimes two or more) per open socket.

      You can try to work around this with a thread pool, and this works for your simple LAN tests, but once you throw a few hundred modem users at it, it'll fall over, just as Aces's appserver did.

      Commercial appservers like weblogic and websphere have an event-driven (usually based on select(), completion ports or /dev/poll) layer written in C that handles all networking, and merely upcall into the JVM for the user's servlet code.

  87. HTTP Requests vs. Pages by sparkz · · Score: 1
    In the case of a web server, the users are the people reading the site and the workload is measured in terms of requests.



    This one always seems to confuse people.


    An HTTP request is a request for a single "document" from a web server. But it normally results in many subsequent requests. For example, on the "Post Comment" page here at /., I've loaded the page itself, then the banner ad, 5 icons, a /. logo, and a curvy thing round the page title. That's 9 requests and replies, for a single "page".


    So counting the number of hits on an HTML document gives no real indication of the server load, since my one "hit" is using 9x the resources of loading a .txt file from the server.


    To get your metrics wrong by a factor of 9 (probably worse, the HTML I downloaded was, say, 20k, the 8 GIFs I've downloaded are presumably much more), means that if you've done your maths correctly, then you're going to get 8/9 users failing to load a page - and then retrying, causing more load on the server.


    Thankfully, all these pseudo-equations are meaningless.

    --
    Author, Shell Scripting : Expert Re
  88. 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.

    1. Re:Disk IO on the Blade 100 by briansmith · · Score: 1

      Maybe fast disk I/O is not so necessary seeing that they seem to be doing significant in-memory caching?

    2. Re:Disk IO on the Blade 100 by acidblood · · Score: 1

      I'm 101% positive you didn't read the article, since they mention (in the third paragraph of the first page) that their drive is an IBM UltraStar 36LP. Although I'm not familiar with this specific unit, UltraStars are IBM's SCSI offerings.

      --

      Join the NFSNET. Our prime goal is making little numbers out of big ones. http://www.nfsnet.org/

    3. Re:Disk IO on the Blade 100 by AlexCV · · Score: 1

      Since you didn't read the article, I'll refresh your memory, they're running an IBM 36GB SCSI disk with a Fast/Wide SCSI adapter. Somehow, I fail to see IDE in there.

      Alex

    4. Re:Disk IO on the Blade 100 by Anonymous Coward · · Score: 0

      someone mod the parent post down since it is inaccurate

    5. Re:Disk IO on the Blade 100 by Lord+of+Caustic+Soda · · Score: 1

      Well, they have a message area don't they? Then you have your web server log, your database server log.... they all need to go somewhere sometime.

      I'm surprised they're running on just one hard drive, I'd thought a 3 drive RAID-5 would be the minimum you'd need for a server, especially since they're running a database on it.

      --
      Kill'em! Kill'em all!
    6. Re:Disk IO on the Blade 100 by RedHat+Rocky · · Score: 1

      As others have said, the machine is running SCSI and UltraSCSI at that. However, they are still only running one drive, which limits the throughput and certainly doesn't take advantage of that nice fat SCSI pipe.

      The Ultrastar 36lp is also a 7200 rpm drive with a 6.8 access time. Can you say ssslllloww? Gimmie a Seagate 15K ST336752LC any day.

      --
      Anything is possible given time and money.
    7. Re:Disk IO on the Blade 100 by GravySkin · · Score: 1

      I own a SunBlade. The standard hd is a Seagate Baracuda, not a bad drive if you ask me, for pci.

      --
      "never met a Microsoft zealot"
  89. Re:OSDN: Please read this by theMAGE · · Score: 1

    You should not envy them.

    In java if I have an array "arr" and
    for (int i = 0; i arr.length; i++)
    then the arr.length will be evaluated once for each loop because of the _possible_ concurrent access. The compiler cannot be sure nobody else is modifying your array so it cannot optimize it by taking it out of the loop.

    Contrast this with C/C++/whatever when you know what is shared and guard it and the compiler is free to optimize the rest.

  90. 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 /. :)

  91. 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

    2. Re:it's the BANDWIDTH by Anonymous Coward · · Score: 0

      Java forces a one (or more) thread per connection model on you, which simply can't scale to large servers.

      Commercial appservers like weblogic and websphere have their network layer coded entirely in C, for performance.

      Also-rans like Resin (which Ace's uses) fall over.

      Its not like state machines are especially difficult, but some people insist on misusing threads.

  92. One box or two? by sparkz · · Score: 1

    They discuss on xxx the possibility of adding a new machine as a database server, leaving the current as a webserver, but say that this adds an additional point of failure.

    Au contrere, with two servers in a Cluster, the worst-case scenario is that the newer (more powerful) machine goes down, in which case the database flips over to the old SS20 - giving them their original config. back automatically, while they deal with the problem on the database server.

    The other scenario, that the SS20 fails, gives them the current configuration, of apache and database running on the SunBlade100.

    I'm sure they'll get nothing for the old SS20, so there's no additional cost involved (apart from the Cluster software, and configuring it), they get better performance than either their previous or current configuration, with the worst-case scenario being their old config for a while until they fix the other server.

    Oh - and they get network failover, disk mirroring (which they hopefully have already), and such like bundled too.

    (note: I work for Sun, but would be *very* surprised to see such a crude web server)

    --
    Author, Shell Scripting : Expert Re
    1. Re:One box or two? by sparkz · · Score: 1

      Oops -for "xxx", read http://www.aceshardware.com/read.jsp?id=45000242

      I was just using "xxx" as a marker until the page reloaded... it took a *long* time now that it's been /.'ed... Maybe an E220R? http://www.sun.com/servers/workgroup/220r/

      --
      Author, Shell Scripting : Expert Re
    2. Re:One box or two? by Anonymous Coward · · Score: 0

      eat crow you bloody beeyaych!!!
      eat crow you bloody mastivs!!!

  93. Re:OSDN: Please read this by briansmith · · Score: 1

    Steve, are you saying that your $40,000 server platform is better than their multi-million dollar platform? I doubt that is true. I think that it is more likely that their developers just didn't know how to effectively use the tools they were given. As an analogy, a Dodge Viper is a fast car but you have to be able to use a stick shift to drive it effectively.

  94. Re:OSDN: Please read this by briansmith · · Score: 1

    That is one reason you should write it this way:
    for (int i = arr.length; i > 1; --i) { ... }
    Or like this:
    int l = arr.length;
    for (int i = 0; i < l; ++i) { ...}

    In fact, I think your post really illustrates why Java is good at multithreading: Java defaults to to being safe but lets you be unsafe if you want. In C++, for comparison, everything is unsafe unless you make it so.

  95. Great article by eagl · · Score: 1

    Score this -1 redundant, but...

    I've been out of "the business" of programming for the last 7 years but this article was the single most practically useful article I've read in that time as far as explaining the whys and hows of web server operation. Kudos to the Ace's Hardware guys for this post.

    Gushing praise and all that...

  96. Funny by Pussy+Is+Money · · Score: 0

    These guys truly bought the farm, didn't they. Sheesh. I wish them luck with their setup.

    --
    Pushin' 'n dealin', shovin' 'n stealin'
  97. Re:OSDN: Please read this by briansmith · · Score: 1

    In a server a great deal of the Java will be translated into native processor instructions for you automatically, as well as doing significant dynamic code optimizations (such as inlining). In addition, you have true database connection pooling and easy access to shared memory between threads. A high end application server will dynamically configure itself into a hybrid multi-process, multi-threaded server and will scale out your application as necessary.

    AFAIK, that doesn't happen with PHP or Perl.

    Finally, some application servers (e.g. Oracle9i AS) actually use Apache as the web server.

  98. 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...).

  99. Re:OSDN: Please read this by Anonymous Coward · · Score: 0

    You're completely wrong, you can't resize arrays in Java and arr.length is an integer constant not a method so the compiler *can* optimize it out.

  100. It's *NOT* a Server! by Anonymous Coward · · Score: 0

    It's clear you really don't know what a "Server" is.

    "lack of a server class PC in their price range, the $1000 price tag"

    Interesting, because the Sun Blade is *NOT* a server class machine. It uses IDE and non-ECC SDRAM, has no redundant power, not even mirrored harddrives.

    It's a cheap desktop computer from Sun. They also take the same internals and put it into a rack mount case and call it the Netra.

  101. Succhiare su un rubinetto! by Anonymous Coward · · Score: 0

    Succhiare su un rubinetto!

  102. But it's Java! by Anonymous Coward · · Score: 0

    It's Java... It's supposed to be cross-platform!

  103. Sucez sur un robinet! by Anonymous Coward · · Score: 0

    Sucez sur un robinet!

  104. 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
  105. My interpretation by jonearth · · Score: 1

    I think I read:

    Building a Butter Webserver ...

  106. They are not using IDE by yivi · · Score: 1
    Finally, the disk interface has been improved considerably as well. In place of the old 10 MB/s FastSCSI interface is a 40 MB/s UltraSCSI interface. Attached to this interface is an IBM UltraStar 36LP with six times the storage capacity of the old server's set of disks (2 GB and 4 GB, respectively).


    Maybe you should read the article before babbling.
  107. Re:OSDN: Please read this by dmelomed · · Score: 1

    It's still Java, with the VM and JIT compiler overhead. What if I do not want to use Java? What choices of application servers do I have in such a case? Furthermore, that application server will probably cost you an arm and a leg more than a bunch of clustered x86s running open software.

    As for the connection pooling, it might not even be a requirement for a site. If it's really needed, it will be implemented either in PHP or somewhere else. Also, it's nice to know that the new version of Apache is a hybrid threaded and multi-process, and it even has state threads module from SGI.

  108. Re: I goofed on the previous post! by Animixer · · Score: 1

    The Extreme boardset has (8) GL processors, not three.

    Must have got carried away! :)

    --
    man tunefs | grep fish
  109. 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.

  110. Re:OSDN: Please read this by Computer+suck! · · Score: 1

    > VM and JIT compiler overhead and interperting a perl/php/asp... script has no overhead? > What if I do not want to use Java? Then use a converter (Woo, JCC :) or class ICantBeBuggeredToRedoThisBitInJava { ... perlIn = System.exec("/bin/perl /wwwroot/MyIttlePerlApp.pl"); out = perlIn; ... } But hey, at the end of the day just use what you feel does the job best, then write an artical, and have your website 'load tested' ;-) CS!

  111. 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.
  112. Re:OSDN: Please read this by Anonymous Coward · · Score: 0

    Bzzt, while array length is constant, the array itself need not be! You can't optimize the length check away unless you know that the array reference can't change (pretty hard unless the array is stack local).

  113. Re:OSDN: Please read this by Anonymous Coward · · Score: 0

    Actually, you should make your test >=0 if you want to do it faster. Going backwards and testing for >1 actually runs slower than going through the array forwards on some machines! This somewhat depends on your processor (platform efficient branch tests are your friends). It's true on the Athlon I'm typing this on, though.

  114. 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/
  115. Re:OSDN: Please read this by briansmith · · Score: 1

    Once a server has handled its initial requests there is very little overhead from the JIT compiler because everything has already been compiled. So, as long as you keep good uptime (you don't restart the server), the JIT won't be a factor.

    Since almost everything will be compiled to native processor instructions, there is very little VM overhead. I bet the VM overhead is very competitive than the oeverhead of a Perl or PHP interpreter.

    There are free applications servers (e.g. Apache Tomcat). There are low-cost Application Servers (e.g. Orion). And there are expensive, but well-supported applications servers (e.g. Websphere, iPlanet). So I don't think absolute software price should be an issue.

    I don't have anything bad to say about Apache or PHP or Perl. I'm just trying to reduce the spread of anti-Java FUD.

  116. I think its a good server setup by Anonymous Coward · · Score: 0

    "lots of big iron gets crushed by the slashdot effect too. This thing is running on a piddly little Sun."

    first post at 4:46pm
    /.'ed at 5:05pm

  117. Asynchronous I/O by bigbird · · Score: 1

    There seems to be no discussion about the use of asynchronous I/O. I'm no Apache expert, but I would think that a single Apache process using a select() loop could serve many clients simultaneously. Current implementations of Java have to allocate a thread per connection, which is extremely inefficient. Granted, Java 1.4 introduces asynch I/O, but it is not a production release yet. But this will be a significant enhancement to Java once it is.

  118. the best server ive seen by Anonymous Coward · · Score: 0

    well the best server (foreign) that i have seen so far is www.eperolehan.com.my, i bet they must've beefed it up with a large array of sun pizza boxes.

  119. Persistent Web Applications by nwetters · · Score: 1
    The cache is shared amongst all threads and it is only updated when a write operation is made to the database for a new posting, en edit, or a deletion. Such a cache would be very difficult to implement in something like PHP or PERL because it's not possible to share persistent objects among different instances of an interpreted script.

    I don't know about PHP, so I won't make any comment about that language, but Perl has an adequate interface for sharing persistent objects in the form of the CPAN module IPC::Shareable:

    IPC::Shareable allows you to tie a variable to shared memory making it easy to share the contents of that variable with other Perl processes. Scalars, arrays, and hashes can be tied. The variable being tied may contain arbitrarily complex data structures - including references to arrays, hashes of hashes, etc.
    IPC::Shareable implements tie()ing objects to shared memory too. Since an object is just a reference, the same principles (and caveats) apply to tie()ing objects as other reference types.
  120. Dr. Pepper /. effect. by Anonymous Coward · · Score: 0

    I think this day trading weasel has just bought Dr. Pepper stock and he is trying to use the /. effect to bring up the stock price!!

    Hmmmmmm.

  121. more bonus. Re:Good article, but... by leuk_he · · Score: 1

    You did it correct.

    Links and a short description what you link.

    And it helps if you say... this costs me karma but...

  122. Look what I've discovered! by Anonymous Coward · · Score: 0
    "...and a can of Dr Pepper to this article."

    Slashdot's new advertising scheme!

    -J

  123. Re:OSDN: Please read this by dmelomed · · Score: 1

    Sure, but I feel Java VM still has a higher overhead, as in the case of Perl and PHP they lack a VM, and are straight interpreted languages.

    What if I do not want to use Java at _all_. Never! Ever! What application servers can I choose from? Not that many, eh?

  124. Re:OSDN: Please read this by dmelomed · · Score: 1

    Ok, so I may be FUDding. The only way to really compare is to compare real-life application running on both implementations on the same hardware. It sucks, however, that most if not all application servers (not tied to a web ser ver) are Java-based.

  125. 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.

  126. 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.

  127. Re:OSDN: Please read this by Syberghost · · Score: 1

    A classic example of idiot moderation. I just took two karma away from two idiots.

    This isn't a troll, and it isn't flamebait; you may disagree with it, but it's a legitimate technical opinion.

    It's arguable (I don't think Slashdot is anywhere near the slowest site on the net), but it does crash frequently, and MySQL is probably a contributing factor in this.

    It's got abrasively-presented technical opinions in it (Apache garbage? That's a bit extreme) but they're all defensible positions.

    Learn to moderate, or stop doing it, children.

  128. 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.

  129. Re:OSDN: Please read this by Computer+suck! · · Score: 1

    If you don't want to use Java at all, then use Apache/Tomcat solution.

  130. Re:OSDN: Please read this by briansmith · · Score: 1

    The only way to really compare is to compare real-life application running on both implementations on the same hardware.

    This is a difficult copmarison. First of all, the architecture of a Perl-based application is certainly going to be different than that of a Perl-based one. Furthermore, many vendors have high-performance (sometimes transparent) J2EE add-ons for their application servers. This makes comparisons amongst Java App Servers nearly impossible; you might get great performance on Oracle9iAS do to all the automatic optimizations (e.g. ESI, DBCache,), but the same exactly application might run very poorly on another vendor's product.

    There is not a standard benchmark application for J2EE called ECPERF. Perhaps somebody could write a Perl application with the same functionality. Then you could have some head-to-head comparison. You'd probably also have to take a Perl-specific benchmark application and port it over to Java and to validate the ECPERF scores.

  131. Re:OSDN: Please read this by dmelomed · · Score: 1

    Tomcat is still Java.

  132. Re:SPARC belongs to SUN. by hughk · · Score: 1

    There is a SPARC organisation but attempts to produce non SUN SPARC systems have had a number of problems. The x86 architecture is crude/rude compared with the newer UltraSPARC designs but, so what, there is competition!!

    --
    See my journal, I write things there