Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More tests? #1

Open
halgari opened this issue Mar 3, 2014 · 6 comments
Open

More tests? #1

halgari opened this issue Mar 3, 2014 · 6 comments

Comments

@halgari
Copy link

halgari commented Mar 3, 2014

Can we get tests from other boxes? On my machine (4 core hyper-threaded OSX MBP circa 2012):

lein core.async:
Evaluation count :
120 in 60 samples of 2 calls.
Execution time mean : 615.162515 ms
Execution time std-deviation : 8.065130 ms
Execution time lower quantile : 606.073498 ms ( 2.5%)
Execution time upper quantile : 633.294586 ms (97.5%)
Overhead used : 2.123800 ns

lein pulsar:
Evaluation count : 120 in 60 samples of 2 calls.
Execution time mean : 631.772231 ms
Execution time std-deviation : 24.939520 ms
Execution time lower quantile : 582.649998 ms ( 2.5%)
Execution time upper quantile : 681.948148 ms (97.5%)
Overhead used : 2.126756 ns

@pmbauer
Copy link
Owner

pmbauer commented Mar 3, 2014

Sure.
And here's another data point, another machine.

$ sysinfo

============= CPUs =============
model name  : Intel(R) Core(TM) i7 CPU         980  @ 3.33GHz (x 12 cores)
============= MEM =============
24128 MiB
...

$ uname -a
Linux capsaicin 3.13.0-14-generic #34-Ubuntu SMP Thu Feb 27 22:32:54 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

$ java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

$ lein core.async
(thread-ring 503 500000) => 19
[...]
Evaluation count : 60 in 60 samples of 1 calls.
             Execution time mean : 2.626226 sec
    Execution time std-deviation : 157.820088 ms
   Execution time lower quantile : 2.177659 sec ( 2.5%)
   Execution time upper quantile : 2.739989 sec (97.5%)
                   Overhead used : 2.517213 ns

Found 5 outliers in 60 samples (8.3333 %)
    low-severe   4 (6.6667 %)
    low-mild     1 (1.6667 %)
 Variance from outliers : 45.0962 % Variance is moderately inflated by outlier

$ lein pulsar
(thread-ring 503 500000) => 19
[...]
Evaluation count : 120 in 60 samples of 2 calls.
             Execution time mean : 804.934861 ms
    Execution time std-deviation : 13.916416 ms
   Execution time lower quantile : 762.460052 ms ( 2.5%)
   Execution time upper quantile : 816.690026 ms (97.5%)
                   Overhead used : 2.522869 ns

Found 9 outliers in 60 samples (15.0000 %)
    low-severe   6 (10.0000 %)
    low-mild     3 (5.0000 %)
 Variance from outliers : 6.2795 % Variance is slightly inflated by outliers

@pmbauer
Copy link
Owner

pmbauer commented Mar 3, 2014

I'm consistently seeing pulsar take full advantage of multiple cpus with this benchmark while core.async does not.
Note the environment stats I posted and that this is a new machine installation.
The only obvious difference I see between our environments is you are on a Mac.

@pmbauer
Copy link
Owner

pmbauer commented Mar 3, 2014

P.S. @halgari
I hadn't seen your tweet earlier.
Of course no one goes around passing things in a ring for fun; this is just the classic erlang thread-ring benchmark and it measures communication overhead (pardon if you already know this).
Please forgive any perceived slight against core.async or your work; I use it and love it.

I am wondering if there is something specific to Linux/JVM that shows core.async poorly at least for this one contrived case.

@halgari
Copy link
Author

halgari commented Mar 3, 2014

No slight taken. This is a benchmark I've performed in the past, and it's good to see other datapoints. I know Pulsar uses FJ pools, so I'll dig into seeing how hard it would be to use those in core.async, and what difference it makes.

@halgari
Copy link
Author

halgari commented Mar 3, 2014

Also if I'm reading the code right, this is only sending a single message through the ring. This would mean that at most only 2 CPUs really should be in use, a one would be sending the int and the other would be receiving. All the rest should be blocked.

@pmbauer
Copy link
Owner

pmbauer commented Mar 3, 2014

correct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants