Slashdot Mirror


Apache Hello World Benchmarks

Joshua Chamas writes "I have been running the Hello World benchmarks for years, and I have finally published the Apache Hello World Benchmarks site based on this data. Most people have a love-hate relationship with benchmark data, but I think its critical information to have whenever choosing what's right for your project. The beauty of these benchmarks is that they are open source, so one can run them easily on their Apache/UNIX system and pry them apart to see what makes them tick!"

40 comments

  1. Hello World by Anonymous Coward · · Score: 0

    #include

    main()
    {
    for(;;)
    {
    printf ("Hello World!\n");
    }
    }

    1. Re:Hello World by Anonymous Coward · · Score: 0

      BBC Computer 32K

      BASIC

      > 10 PRINT "Hello World!"
      > 20 GOTO 10
      > RUN
      Hello World!
      Hello World!
      Hello World! ...

    2. Re:Hello World by Anonymous Coward · · Score: 0

      Don't forget:

      while(1){fork()}

    3. Re:Hello World by Anonymous Coward · · Score: 0
    4. Re:Hello World by Anonymous Coward · · Score: 0

      % sicstus
      SICStus 3.8 (sparc-solaris-5.5.1): Mon Nov 22 10:54:50 MET 1999
      | ?- hello :-
      write('Hello World!'),
      nl.
      {SYNTAX ERROR: in line 3 (within 3-6)}
      ** operator expected after expression **
      ?- hello
      ** here ** :- write ( 'Hello World!' ) , nl .
      | ?- what the fuck?

      fdadfa.
      {SYNTAX ERROR: in line 11 (within 11-14)}
      ** operator expected after expression **
      ?- what
      ** here **
      the fuck ? fdadfa .
      | ?- :-
      .
      {EXISTENCE ERROR: :-: procedure user:(:-)/0 does not exist}
      | ?- quit.
      {EXISTENCE ERROR: quit: procedure user:quit/0 does not exist}
      | ?- bye.
      {EXISTENCE ERROR: bye: procedure user:bye/0 does not exist}
      | ?- exit.
      {EXISTENCE ERROR: exit: procedure user:exit/0 does not exist}
      | ?- aaargh.
      {EXISTENCE ERROR: aaargh: procedure user:aaargh/0 does not exist}
      | ?- ^C
      Prolog interruption (h for help)? h

      Prolog interrupt options:
      a abort - cause abort
      b break - cause break
      c continue - do nothing
      e exit - cause exit
      d debug - start leaping
      z zip - start zipping
      t trace - start creeping
      h help - get this list

      Prolog interruption (h for help)? e
      %

    5. Re:Hello World by Anonymous Coward · · Score: 0

      #!/usr/bin/perl

      print "Hello World!" while (1);

    6. Re:Hello World by Anonymous Coward · · Score: 0

      PASCAL:

      BEGIN
      writeln('Hello World');
      END.

      C++

      #include <iostream.h>

      void main(void){
      cout << "Hello World";
      }

      ; LISP
      (DEFUN HELLO-WORLD ()
      (PRINT (LIST 'HELLO 'WORLD)))
      DOS

      echo Hello World

      TI-85/86

      :Disp "Hello World"

    7. Re:Hello World by Anonymous Coward · · Score: 0

      iostream.h? void main? Come on...

    8. Re:Hello World by Anonymous Coward · · Score: 0

      #!/usr/bin/perl -w
      $nick = shift;
      bitch() if $nick eq 'Anonymous Coward';
      sub bitch { print "iostream.h? void main? Come on..."; }

    9. Re:Hello World by dmadole · · Score: 1

      Apache is not the fastest web server at all. Depending on how you define "one of" it's not even one of the fastest web servers. Any admins that think it is have not actually tried many other web servers.

      That said, I do think most admins would agree that Apache may have the best balance of flexibility, stability, configurability, support, and performance among general-purpose web servers. That's why I use it for most things.

      Oh yeah, the price is right, too.

      If you want something really fast (at least for static content), look at thttpd, mathopd, or Zeus. For simplicity and performance alone, mathopd is hard to beat. Only 17KB executable (on my machine anyway).

    10. Re:Hello World by md17 · · Score: 1

      title Hello World Program (hello.asm)
      ; This program displays "Hello, World!"

      dosseg
      .model small
      .stack 100h

      .data
      hello_message db 'Hello, World!',0dh,0ah,'$'

      .code
      main proc
      mov ax,@data
      mov ds,ax

      mov ah,9
      mov dx,offset hello_message
      int 21h

      mov ax,4C00h
      int 21h
      main endp
      end main

    11. Re:Hello World by psi-kat · · Score: 1

      and if your server is going to be very high-load, AOLServer is normally a really good choice.

      (no, that's not a joke, seriously, check it out)

    12. Re:Hello World by Anonymous Coward · · Score: 0

      # assuming target is a .com file and so ds=cs at launch, this can be optimized a lot

      hw db "hello world$"
      mov dx,offset hw
      mov ah,9
      int 21
      ret

    13. Re:Hello World by Anonymous Coward · · Score: 0

      You probably meant org 100h :)
      Putting stack in PSP area would kill your prog faster than a deer by a trawler.

  2. Censordot!! by poopbot by Anonymous Coward · · Score: -1, Offtopic

    Version 1.1.8 (last updated 19th July 2002 by Anonymous Coward)

    Note to moderators : Do not moderate this post down, if you do then you support the editors stance on censorship and you support the end of free speech and support evil organisations like Microsoft, RIAA, MPAA and laws like the CBTBA and DMCA

    Sign this petition, let your voice be heard!

    Slashdot is using censorship! It is trying to eridicate free and open discussion like we know slashdot to be, it has the following RESTRICTIONS in place to Censor you

    They claim they don't, but they do, wonder why their are so many trolls, crapflooders and lamers on slashdot, because they are fighting for their rights! Slashdot is trying to silence the trolls. Remove the filters, the trolls get bored, and slashdot will be troll free!
    • Lameness filters (It blocks a lot of legitmate posts)
    • Unnessary posting delays. Hasnt taco learned to touch type? A lot of posts are typed in less than 20 seconds and it is a ANNOYING DELAY! 2 minute ban? Come on, so some are faster then others, big deal, some people have more to say than others
    • Broken moderation system, The whole point is to sort the gems from the crap, yet a lot of posts designed to make a LIVELY DISCUSSION are MODERATED as flamebait! Come on, not everyone likes X, but just because some one bashes it dosent mean its Flamebait. Flame bait is more useful for DIRECT INSULTS and not legitmate discussions.
    The "troll" moderation reason is fragmented and broken, why? Because they are trying to use an obsolete usenet term on a realtime discussion, "trolls" can cover a huge blanket of ideas.
    • Crapfloods, a meaningless flood of random letters or text, which the lameness filter does a crappy job at trying to stop, besides trolls have written tools using the opensource slashcode to generate crapfloods which bypass the filter
    • Links to offensive websites, the most common one is known a http://www.goatse.cx, a awful site which shows a bleeding anus being stretched on the front page. Trolls sneak these links in by posting messages that look legitimate, but infact are sneaky redirects to the site. Common examples include rd.yahoo.com, www.linux-kernel.tk, goatsex.cjb.net, and googles "Im feeling lucky".
    • Trying to break slashdot, this is actually a good thing, as it helps test slashdot for bugs. Famous examples include the goatse.cx javascript pop-up, the pagewidening post and the browser crashing post!
    Subnet banning, this bans a user unless they email jamie macarthy with their mp5ed ipids. This is unfair, and banning a subnet BLOCKS A WHOLE ISP SOMETIMES, and not that individual user! This can cause chaos! But real trolls use annoymous proxys to get around this so THIS JUST BANS LEGITMATE USERS! Also, they are trying to censor some anoymous proxies, mainly from countrys like africa, so this yet more DISCRIMINATION!

    But, the issue that concerens us the most, is the COMMENT QUOTA. A discrimatory system that stiffles discussion, cripples the community and will ultimateley destroy slashdot unless it is removed! Annoymous cowards are allowed only 10 posts a day! This is unethical! Users with negative karma only get two! That is DISCRIMINATION! How would you like to only be able to speak once a day, just because of the color of your skin. That would be racism, and slashdot is discrimitating on people just because of a negative number in a database! BOYCOTT SLASHDOT! LET THEM DIE!

    We wan't these stupid useless restrictions REMOVED! This comment will be posted again and again until it does!

    Inportant imformation for users
    Boycott slashdot, they are pissing over their community, they are becoming like the RIAA and MICROSOFT! Do NOT TOLERATE THIS SHIT! Here are some real news for nerds sites. We don't need slashdot, slashdot deserves to die!

    MSNBC
    BBC NEWS
    News.com
    Linux online
    Linux daily news network [linuxdailynews.net]
    Weird news from dailyrotten.com
    Trollaxor, news for trolls, they are real people too!
    CNN.com
    New york times (free registration required)
    LINUX.com
    News forge
    K5
    Mandrake forum
    Toms hardware
    The register
    Kde dot news
    The linux kernel Archives
    Adequecy

    There are hundreds more, But this is where slashdot STEALS THE MAJORITY OF its "news" from.

    Punish them, here are their emails, spam them, flame them goatse them!
    Rob malda
    Jamie Macarthy
    ChrisD
    Hemos
    Micheal
    Pudge

    The others ones apperantly dont have an e-mail, probably because ROB MALDA IS PRETENDING HE IS JOHN KATZ.

    Thank you for reading this, please feel free to repost this information, please reply to add your comments, fight slashdot and its CENSORSHIP

    Don't forget to sign the petition!

    - posted by poopbot: lovely snot! wonderful snot!

    6o33Jws0Ms Post #308
  3. welll,,,,, by DopeThrone · · Score: 0

    yes benchmarks are cool, guess Joshua covered that one pretty much,

    --

    Righteousness postpones the inevitable
    http://burningaureole.caveism.net
  4. Mason: Very suprising by LunaticLeo · · Score: 2

    I am very suprised about the "slowness" of Mason and it's memory consumption. Mason's advantage is the cacheing of pseudo-compiled components. I wonder if this Benchmark suite is reasonably testing Mason's scalability (does it scale linearly or logrithmicly, or what).

    --
    -- I am not a fanatic, I am a true believer.
    1. Re:Mason: Very suprising by Anonymous Coward · · Score: 1, Informative

      This is the author of the benchmarks. I sent the benchmarks to the Mason authors before publishing because I too was surprised by the results.

      In particular, performance seemed to be much worse from version 1.03 to 1.10 on the hits per sec, but it seems that the internals of the module have changed substantially since then. What did come of it however, is that it looks like they fixed a memory leak in 1.11 where memory consumption was a lot worse before on the benchmarks. They will be working on the speed issues I believe, and I will update the benchmarks when they have a new release.

      Note that none of the benchmarks take advantage of Mason's component output caching, and an output caching benchmark would be good for that. Some other environments like Apache::ASP and Resin have output caching ability, so we could have a good comparison.

  5. I've got an idea... by tetuth · · Score: -1, Offtopic

    Cry me a river....

    then build a bridge over it to hide under, TROLL!!!!! BAHHH!!!!!!!

  6. PHP Speed Improvements by x-empt · · Score: 4, Informative

    PHP scripts are compiled in run-time. You can speed up PHP significantly by using a "Cache" module that stores precompiled php scripts (compiled ONLY the first time they are requested) in memory that is shared among requests. APC is a great one and is available at: http://apc.communityconnect.com/

    Zend (http://zend.com) Also has a number of PHP goodies! Expect some significant speed improvements when using a cache! I highly recommend them!

    x

    --
    Ever need an online dictionary?
    1. Re:PHP Speed Improvements by ayafm · · Score: 2, Informative

      I had installed Zend Cache recently while benchmarking but it seemed to offer no speedup, but I am not sure I actually had it installed correctly because of the lack of apparent difference. Because the amount of code is so small on these tests, I would not be surprised if the caching didn't help, as it seems that it is more geared to larger code bases that would really benefit from this. It may be that a better benchmark in the future for this would create some 10K lines of code and then run that for its output.

      I will however give the zend cache another chance in the future, or might wait for the zend engine to become part of the standard PHP release, as they are in alpha for that now.

  7. Results. by cant_get_a_good_nick · · Score: 2, Insightful

    Wow, we use some tomcat at work, and I'm surprised as hell by those. I always assumed mod_perl was a memory hog.

    I wonder why they didn't include JBoss or WebLogic? WebLogic, I can understand - expen$ive... but JBoss is free, it's on sourceforge.

    BTW: This comment is echoing in a very empty room...

    1. Re:Results. by The+Mayor · · Score: 3, Informative

      JBoss typically uses Tomcat (v3 or v4 Catalina) or Resin for serving dynamic web pages. Both Tomcat Catalina (v4) and Resin are included in the benchmark.

      --
      --Be human.
    2. Re:Results. by SkullRape · · Score: -1

      'cause JBoss is a soggy shit sandwitch. JBoss must be one of the worst open source packages that I've ever seen.

    3. Re:Results. by ayafm · · Score: 2, Informative

      mod_perl can be not too bad on memory, but it depends what you are doing with it. If you look at the environments that run on mod_perl like Embperl, Apache::ASP, Template Toolkit, HTML::Mason, AxKit, etc, you will see more memory usage than using raw mod_perl itself, because the amount of actual code running is much greater, but then people use these environments because of the greater application services they provide than raw mod_perl handlers, so its a trade off. I have known web sites with 20K to 50K lines of perl/mod_perl code and it scales fine as long as one is proficient with tuning mod_perl applications.

      As far as benchmarking other java application environments, I will do so as long as they are easy to set up, and benchmarking is allowed in their evaluation license. For example, I did not benchmark Chilisoft ASP because they have a clause in their license that excludes benchmarking, whereas Resin/Caucho did not. I'll check out JBoss and see if I can get it working.

    4. Re:Results. by md17 · · Score: 1

      Actually they prefer Jetty, which seems to be a bit faster (Just expierence, not benchmarks). The default JBoss Releases come with Jetty.

  8. I kinda suspected.... by atcurtis · · Score: 1


    My mod_perl stuff usually works very fast when compared to the other stuff...

    Guess I shall keep kludging in perl.

    --
    -- The universe began. Life started on a billion worlds...
    -- Except on one where stupidity was there first.
  9. Information you need _NOW_ by Anonymous Coward · · Score: -1, Flamebait

    Attention Slashdot subscribers: As you probably know VA Software, the company that runs Slashdot, is in financial trouble. Their stock price has been in the doldrums for months and they will soon be removed from the NASDAQ. We have it on good information that VA's board have now given up hope of saving the company and will declare it bankrupt in mid-August. At that point the company's remaining cash will either go to paying its debts or returned to shareholders, that includes YOUR subscription money.

    Our recommendation: If you are thinking of taking out a subscription to slashdot, don't bother. If you already have a subscription then it may be possible to save some of your money, email CmdrTaco or one of the other site janitors and ask to cancel it. Do this as soon as possible.

    a04

  10. last post by Anonymous Coward · · Score: -1, Offtopic

    Goodbye world!

  11. Hello World by sglane81 · · Score: 1

    Using hello world as a benchmark? This doesn't make much sense since "hello world" is a learning / testing application for developers and no technical merits can be properly tested using this method except initial load time, initial memory usage, etc.

    Regardless, I think most admins understand apache is one of (I would say the fastest) the fastest web servers in the market.

    --
    This is the Internet. You can say "fuck" here. - AC
  12. XSLT Results by arthurs_sidekick · · Score: 1

    I know it's not the Apache httpd, but I would have thought that if you were going to benchmark an XSLT suite, you'd be trying out Cocoon, which is an Apache project.

    Any story on why you didn't get around to that? If you're going to run more of these, that would be a good one to use.

    --
    "Oh, I hope he doesn't give us halyatchkies," said Heinrich.
    1. Re:XSLT Results by ayafm · · Score: 1

      I have benchmarked Cocoon before back in 1.x, but could not get 2.x installed this time around on my new development server. I'll try again later, and do feel like it would be an important contribution to the XSLT benchmarks.

  13. I runn Apchae cuz M'i elte by Anonymous Coward · · Score: 0

    Me run APahce and Mozlla

  14. New Apache port... by Anonymous Coward · · Score: 0

    As an elite Apache haxor I'm proud to announce I got Apache compiled and running on an analog Victrola. No, not a VIC20, a wind-up Wictrola gramapone. Right now it's hosting CmdrTaco favorite tentacle rape porn along with the best tips on spelling the Slashdot crew can offer. Oh, and chrisd has an article on the new spellcheckig feature of Mozlla.

  15. You won't believe this!!! by Anonymous Coward · · Score: -1, Offtopic

    I got Apache running on a bag of Doritos. This is the best port ever.

  16. d00d Im so 1337 by Anonymous Coward · · Score: 0

    I just compiled Apache 2.0 with gcc3 on an Atari 2600 running Debian 3.0

  17. Oh man I'm kewl ... by Anonymous Coward · · Score: 0

    I just installed Apache on a 55 gallon oil drum. Let's see Windows do that!

  18. Re:Oh man I'm kewl ... and lame by Anonymous Coward · · Score: 0

    I forgot to mention that the barrel is running Debian 3.0

  19. WHERE ARE YOUR MOD POINTS? by Anonymous Coward · · Score: 0

    Moderators suck ass

  20. Question reguarding db hello test by f00zbll · · Score: 1
    Did you use connection pooling in the db hello test? If not, I would be curious to see if using connection pooling for resin and tomcat improve the performance. Depending on the driver, there may be a 0-5ms wait time. I know that this was true of ODBC back in the sql server 5 days. thanks for posting your results. Even though it doesn't provide answers as to which server is more scalable, it does provide a baseline control for others to compare to.

    In my own benchmarks of web applications, I try to include a super simple test to establish a baseline, so that there is a point of reference for comparing the real application.