Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Hello world performance
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  14 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Roman Bataev  
View profile  
 More options Nov 8 2010, 9:08 pm
From: Roman Bataev <roman.bat...@gmail.com>
Date: Mon, 8 Nov 2010 18:08:06 -0800 (PST)
Local: Mon, Nov 8 2010 9:08 pm
Subject: Hello world performance
Hi.

I wanted to reproduce a test described here http://dosync.posterous.com/22397098
On my MacBook Pro node.js managed to handle ~6.9K req/s, while aleph
is only able to handle 1.3K req/s.
I am using the latest snapshot of aleph from github, and HTTP server
hello world snippet from  here https://github.com/ztellman/aleph

Am I doing something wrong or is it expected performance for the
latest snapshot?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Zach Tellman  
View profile  
 More options Nov 8 2010, 10:38 pm
From: Zach Tellman <ztell...@gmail.com>
Date: Mon, 8 Nov 2010 19:38:08 -0800
Local: Mon, Nov 8 2010 10:38 pm
Subject: Re: Hello world performance
I haven't tested the performance in a while, but that's a pretty
serious regression.  Are you giving the JVM time to warm up?

Zach


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Nolen  
View profile  
 More options Nov 8 2010, 10:52 pm
From: David Nolen <dnolen.li...@gmail.com>
Date: Mon, 8 Nov 2010 22:52:50 -0500
Local: Mon, Nov 8 2010 10:52 pm
Subject: Re: Hello world performance

I just ran the hello-world bench on my machine using the latest version of
Aleph w/ enough runs for the JVM to be warm and I'm seeing around 2900+
req/sec. That's quite a bit slower than what I used to see.

A quick run under VisualVM shows that a good chunk of time is eaten up in
reflection.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Zach Tellman  
View profile  
 More options Nov 9 2010, 3:11 am
From: Zach Tellman <ztell...@gmail.com>
Date: Tue, 9 Nov 2010 00:11:01 -0800
Local: Tues, Nov 9 2010 3:11 am
Subject: Re: Hello world performance
I've pushed a version that should be markedly faster, and I think
there's still some room for improvement.  Let me know if you're not
seeing any change.

Zach


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Nolen  
View profile  
 More options Nov 9 2010, 11:37 am
From: David Nolen <dnolen.li...@gmail.com>
Date: Tue, 9 Nov 2010 11:37:18 -0500
Local: Tues, Nov 9 2010 11:37 am
Subject: Re: Hello world performance

ab -n 10000 -c 5 -k http://localhost:8080/

Gives just above 5000 req/s now. Nice!

VisualVM stills shows 15% or so of the time being spent in reflection.
Eliminating that should get us competitive again w/ Node.js for The World's
Most Pointless Benchmark ;)

David


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roman Bataev  
View profile  
 More options Nov 10 2010, 9:48 pm
From: Roman Bataev <roman.bat...@gmail.com>
Date: Wed, 10 Nov 2010 18:48:26 -0800 (PST)
Local: Wed, Nov 10 2010 9:48 pm
Subject: Re: Hello world performance
Yesterday's version (up to "forgot an argument" commit) gave ~3.4K req/
seq on my machine. Big performance boost compared to previous version,
but node.js is still twice as fast.
With the last commit ("clean up optimizations") it gives ~1.9K req/
seq.

Also, every other time I run

ab -n 5000 -c 5 http://127.0.0.1:8080/

I get terrible result like this:

Percentage of the requests served within a certain time (ms)
  50%      2
  66%      2
  75%      3
  80%      3
  90%      4
  95%      8
  98%     11
  99%     12
 100%   6979 (longest request)

So basically it freezes for several seconds on some requests. Any
ideas what could be causing this?

On Nov 9, 11:37 am, David Nolen <dnolen.li...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Miller  
View profile  
 More options Nov 10 2010, 10:13 pm
From: Alex Miller <alexdmil...@yahoo.com>
Date: Wed, 10 Nov 2010 19:13:08 -0800 (PST)
Local: Wed, Nov 10 2010 10:13 pm
Subject: Re: Hello world performance

Sounds like GC to me.  Did you run with:

-verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails

These settings are designed to be run in production settings so shouldn't
significantly impact performance.  

I suspect you'll see a full gc cycle at some point (probably about oh 6-7
seconds long).  

________________________________
From: Roman Bataev <roman.bat...@gmail.com>
To: Aleph <aleph-lib@googlegroups.com>
Sent: Wed, November 10, 2010 8:48:26 PM
Subject: Re: Hello world performance

Yesterday's version (up to "forgot an argument" commit) gave ~3.4K req/
seq on my machine. Big performance boost compared to previous version,
but node.js is still twice as fast.
With the last commit ("clean up optimizations") it gives ~1.9K req/
seq.

Also, every other time I run

ab -n 5000 -c 5 http://127.0.0.1:8080/

I get terrible result like this:

Percentage of the requests served within a certain time (ms)
  50%      2
  66%      2
  75%      3
  80%      3
  90%      4
  95%      8
  98%     11
  99%     12
100%   6979 (longest request)

So basically it freezes for several seconds on some requests. Any
ideas what could be causing this?

On Nov 9, 11:37 am, David Nolen <dnolen.li...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roman Bataev  
View profile  
 More options Nov 10 2010, 10:18 pm
From: Roman Bataev <roman.bat...@gmail.com>
Date: Wed, 10 Nov 2010 19:18:21 -0800 (PST)
Local: Wed, Nov 10 2010 10:18 pm
Subject: Re: Hello world performance
Please disregard my complain about freezing. Apparently I have the
same issue with node.js, so it's not a JVM or aleph issue. Sorry about
that.

On Nov 10, 10:13 pm, Alex Miller <alexdmil...@yahoo.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Nolen  
View profile  
 More options Nov 10 2010, 10:19 pm
From: David Nolen <dnolen.li...@gmail.com>
Date: Wed, 10 Nov 2010 22:19:09 -0500
Local: Wed, Nov 10 2010 10:19 pm
Subject: Re: Hello world performance

On Wed, Nov 10, 2010 at 9:48 PM, Roman Bataev <roman.bat...@gmail.com>wrote:

Ephemeral port setting for your OS needs to be tweaked. node.js has this
problem as well.

I agree that it would be good to remove all reflection in a library like
Aleph. I don't think it's very important that we precisely match or beat
node.js for the hello world benchmark as on more realistic benchmarks
node.js tends suffer compared to Clojure. For one Clojure's function call
performance (the building block of any application) simply puts v8 to shame.

David


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Zach Tellman  
View profile  
 More options Nov 10 2010, 10:22 pm
From: Zach Tellman <ztell...@gmail.com>
Date: Wed, 10 Nov 2010 19:22:50 -0800
Local: Wed, Nov 10 2010 10:22 pm
Subject: Re: Hello world performance
Can you confirm that you have the latest version of Lamina?  Running lein clean and deleting ~/.m2 should suffice. There shouldn't have been a sizable regression between those commits.

On Nov 10, 2010, at 6:48 PM, Roman Bataev <roman.bat...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roman Bataev  
View profile  
 More options Nov 12 2010, 10:41 pm
From: Roman Bataev <roman.bat...@gmail.com>
Date: Fri, 12 Nov 2010 19:41:17 -0800 (PST)
Local: Fri, Nov 12 2010 10:41 pm
Subject: Re: Hello world performance
I have the latest snapshot of Lamina
lamina-0.3.1-20101010.033133-3.jar. I just double checked my tests:
current trunk: ~1.9K req/s
after reverting last commit ("clean up optimizations"): ~3.5K req/s

The same version of Lamina was used in both cases.

On Nov 10, 10:22 pm, Zach Tellman <ztell...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roman Bataev  
View profile  
 More options Nov 12 2010, 10:52 pm
From: Roman Bataev <roman.bat...@gmail.com>
Date: Fri, 12 Nov 2010 19:52:16 -0800 (PST)
Local: Fri, Nov 12 2010 10:52 pm
Subject: Re: Hello world performance
Thank you for the tip about ephemeral port setting. I got this fixed
now.

I think it's pretty important to match or be at least very close to
node.js on the hello world benchmark. I understand that it is not
realistic, but it is very easy to reproduce and it gives you a general
impression about the performance of a platform, a base line so to
speak. I am a newcomer to both platforms and I am still trying to
decide which one I would like to invest more time in. Basic hello
world benchmark can be one of the factor that will affect my decision.
So if aleph community wants to grow matching (or beating) competitors
in basic benchmark may help.

On Nov 10, 10:19 pm, David Nolen <dnolen.li...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Nolen  
View profile  
 More options Nov 12 2010, 11:16 pm
From: David Nolen <dnolen.li...@gmail.com>
Date: Fri, 12 Nov 2010 23:16:35 -0500
Local: Fri, Nov 12 2010 11:16 pm
Subject: Re: Hello world performance

On Fri, Nov 12, 2010 at 10:52 PM, Roman Bataev <roman.bat...@gmail.com>wrote:

> Thank you for the tip about ephemeral port setting. I got this fixed
> now.

> I think it's pretty important to match or be at least very close to
> node.js on the hello world benchmark. I understand that it is not
> realistic, but it is very easy to reproduce and it gives you a general
> impression about the performance of a platform, a base line so to
> speak. I am a newcomer to both platforms and I am still trying to
> decide which one I would like to invest more time in. Basic hello
> world benchmark can be one of the factor that will affect my decision.
> So if aleph community wants to grow matching (or beating) competitors
> in basic benchmark may help.

I don't see this regression in performance. I'm using the latest snapshots
of aleph 0.1.3 and lamina 0.3.1.

I think it's good to hear this kind of feedback from people interested in
Aleph. I agree that Aleph should at least be competitive w/ Node.js on this
baseline.

Zach, do you have any thoughts on this?

David


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Zach Tellman  
View profile  
 More options Nov 13 2010, 1:19 pm
From: Zach Tellman <ztell...@gmail.com>
Date: Sat, 13 Nov 2010 10:19:31 -0800
Local: Sat, Nov 13 2010 1:19 pm
Subject: Re: Hello world performance
I was able to reproduce the regression between the speed-up and
clean-up on a Core2Duo system, but not on an i5.  I don't know exactly
why this is, but the important thing is that there was a regression,
and it's fixed now.

With respect to the general question of performance, I'm of two minds.
 I agree speed is important, and ignoring performance issues that are
trivial to fix isn't constructive.  I'm glad that the regression in
performance was reported, and I should probably have some automated
benchmarks so that I'm not just testing correctness before committing
changes.

On the other hand, I don't know how meaningful the 'Hello World'
benchmark is when evaluating a library for real-world use.  As the
amount of work per request increases, the communication overhead
measured by the benchmark becomes increasingly insignificant.  I'd put
more weight on how simple it is to write the evented application
logic, as long as there aren't serious performance concerns.

I'll also note that Clojure code has a lot of variables, few of which
are well understood.  I'm told, but have not tested, that
-XX:MaxInlineSize=100 can greatly improve performance.  I suspect, but
have not confirmed, that 1.3 will improve performance quite a bit.
There are a hundred other JVM knobs to tweak, none of which I have any
expertise in.  Once this becomes more than just a theoretical issue, I
think that the community will adopt some best practices.

Hopefully that answers everyone's questions.  Let me know if it doesn't.

Zach


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »