- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Re: Is Scala binding slowing down the ZeroMQ throughput
Wed, 2011-12-21, 12:33
Hi Viktor,
Made changes as per recommendations i guess.
https://gist.github.com/1505697
Still getting around 10-12K MPS.
BTW if i run the same code with Java binding instead of Scala i get in the range of 17-19K MPS, however still not close to the perf examples.
Regards | Vikas
2011/12/20 √iktor Ҡlang <viktor.klang@gmail.com>Hi Vikas,
2011/12/20 Vikas Hazrati <vhazrati@inphina.com>Viktor
1) We are creating a new bytebuffer to get a somewhat realistic feel since all are messages are going to be different
But that's just completely false, it's not doing that. If you want to bench message sends you need to remove the other factors, or make sure that they are the same no matter the language used.
3) Do you recommend while or parallel for?
while or tail recursion.
2) Did you not quite understand what you meant by benching?
benching == slang for benchmarking
If you put pressure on the wrong component, you're effectively measuring the performance of that component.
Cheers,
√
We are using Akka 1.3-RC4 and Akka actors as of now.
Thanks | Vikas
2011/12/20 √iktor Ҡlang <viktor.klang@gmail.com>
1) Avoid creating a new bytebuffer for each iteration.
2) Avoid benching Scala Actors
3) Avoid for(...) for high-performance "loops" (will be faster in 2.10)
Cheers,
√
On Tue, Dec 20, 2011 at 8:16 AM, Vikas Hazrati <vhazrati@inphina.com> wrote:
We are using a pull push mechanism similar to the perf tests specified here for ZeroMQ.http://www.zeromq.org/results:perf-howtoFor the throughput test with a message size of 4.3KB and 100,000 messages i get a performance of 85K msg/sec
vikas@vikas-laptop:~/w/software/exploded/zeromq-2.1.10/perf$ local_thr tcp://127.0.0.1:5555 4300 100000
message size: 4300 [B]
message count: 100000
mean throughput: 85203 [msg/s]
mean throughput: 2930.983 [Mb/s]However with the code in Scala and using the Scala binding 0.0.3 i get less than 15K msg/sec.
Gist here https://gist.github.com/1496406
Could you please let me know what is going wrong or does the Scala code need some tweaking?
Regards | Vikas
--
Viktor Klang
Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts
Twitter: @viktorklang
--
Best Regards | Vikas
Inphina Technologies Co-Founder and Technical Architect
+91-9899174194
Check out our thoughts @ http://goo.gl/jrKfn
--
Viktor Klang
Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts
Twitter: @viktorklang
--
Best Regards | Vikas
Inphina Technologies Co-Founder and Technical Architect
+91-9899174194
Check out our thoughts @ http://goo.gl/jrKfn
--
Best Regards | Vikas
Inphina Technologies Co-Founder and Technical Architect
+91-9899174194
Check out our thoughts @ http://goo.gl/jrKfn
Wed, 2011-12-21, 13:01
#2
Re: Is Scala binding slowing down the ZeroMQ throughput
I could try with this http://repo.typesafe.com/typesafe/snapshots/org/zeromq/jzmq/2.1.0-SNAPSHOT/ if i understood you correctly?
2011/12/21 √iktor Ҡlang <viktor.klang@gmail.com>
--
Best Regards | Vikas
Inphina Technologies Co-Founder and Technical Architect
+91-9899174194
Check out our thoughts @ http://goo.gl/jrKfn
2011/12/21 √iktor Ҡlang <viktor.klang@gmail.com>
2011/12/21 Vikas Hazrati <vhazrati@inphina.com>Hi Viktor,
Made changes as per recommendations i guess.
https://gist.github.com/1505697
Still getting around 10-12K MPS.
BTW if i run the same code with Java binding instead of Scala i get in the range of 17-19K MPS, however still not close to the perf examples.
What if you use the Java binding from Scala?
Cheers,
√
Regards | Vikas
2011/12/20 √iktor Ҡlang <viktor.klang@gmail.com>Hi Vikas,
2011/12/20 Vikas Hazrati <vhazrati@inphina.com>Viktor
1) We are creating a new bytebuffer to get a somewhat realistic feel since all are messages are going to be different
But that's just completely false, it's not doing that. If you want to bench message sends you need to remove the other factors, or make sure that they are the same no matter the language used.
3) Do you recommend while or parallel for?
while or tail recursion.
2) Did you not quite understand what you meant by benching?
benching == slang for benchmarking
If you put pressure on the wrong component, you're effectively measuring the performance of that component.
Cheers,
√
We are using Akka 1.3-RC4 and Akka actors as of now.
Thanks | Vikas
2011/12/20 √iktor Ҡlang <viktor.klang@gmail.com>
1) Avoid creating a new bytebuffer for each iteration.
2) Avoid benching Scala Actors
3) Avoid for(...) for high-performance "loops" (will be faster in 2.10)
Cheers,
√
On Tue, Dec 20, 2011 at 8:16 AM, Vikas Hazrati <vhazrati@inphina.com> wrote:
We are using a pull push mechanism similar to the perf tests specified here for ZeroMQ.http://www.zeromq.org/results:perf-howtoFor the throughput test with a message size of 4.3KB and 100,000 messages i get a performance of 85K msg/sec
vikas@vikas-laptop:~/w/software/exploded/zeromq-2.1.10/perf$ local_thr tcp://127.0.0.1:5555 4300 100000
message size: 4300 [B]
message count: 100000
mean throughput: 85203 [msg/s]
mean throughput: 2930.983 [Mb/s]However with the code in Scala and using the Scala binding 0.0.3 i get less than 15K msg/sec.
Gist here https://gist.github.com/1496406
Could you please let me know what is going wrong or does the Scala code need some tweaking?
Regards | Vikas
--
Viktor Klang
Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts
Twitter: @viktorklang
--
Best Regards | Vikas
Inphina Technologies Co-Founder and Technical Architect
+91-9899174194
Check out our thoughts @ http://goo.gl/jrKfn
--
Viktor Klang
Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts
Twitter: @viktorklang
--
Best Regards | Vikas
Inphina Technologies Co-Founder and Technical Architect
+91-9899174194
Check out our thoughts @ http://goo.gl/jrKfn
--
Best Regards | Vikas
Inphina Technologies Co-Founder and Technical Architect
+91-9899174194
Check out our thoughts @ http://goo.gl/jrKfn
--
Viktor Klang
Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts
Twitter: @viktorklang
--
Best Regards | Vikas
Inphina Technologies Co-Founder and Technical Architect
+91-9899174194
Check out our thoughts @ http://goo.gl/jrKfn
Wed, 2011-12-21, 14:11
#3
Re: Is Scala binding slowing down the ZeroMQ throughput
2011/12/21 Vikas Hazrati <vhazrati@inphina.com>
I could try with this http://repo.typesafe.com/typesafe/snapshots/org/zeromq/jzmq/2.1.0-SNAPSHOT/ if i understood you correctly?
I was under the assumption that you were trying out the Java version in parallel of Scala?
2011/12/21 √iktor Ҡlang <viktor.klang@gmail.com>
2011/12/21 Vikas Hazrati <vhazrati@inphina.com>Hi Viktor,
Made changes as per recommendations i guess.
https://gist.github.com/1505697
Still getting around 10-12K MPS.
BTW if i run the same code with Java binding instead of Scala i get in the range of 17-19K MPS, however still not close to the perf examples.
What if you use the Java binding from Scala?
Cheers,
√
Regards | Vikas
2011/12/20 √iktor Ҡlang <viktor.klang@gmail.com>Hi Vikas,
2011/12/20 Vikas Hazrati <vhazrati@inphina.com>Viktor
1) We are creating a new bytebuffer to get a somewhat realistic feel since all are messages are going to be different
But that's just completely false, it's not doing that. If you want to bench message sends you need to remove the other factors, or make sure that they are the same no matter the language used.
3) Do you recommend while or parallel for?
while or tail recursion.
2) Did you not quite understand what you meant by benching?
benching == slang for benchmarking
If you put pressure on the wrong component, you're effectively measuring the performance of that component.
Cheers,
√
We are using Akka 1.3-RC4 and Akka actors as of now.
Thanks | Vikas
2011/12/20 √iktor Ҡlang <viktor.klang@gmail.com>
1) Avoid creating a new bytebuffer for each iteration.
2) Avoid benching Scala Actors
3) Avoid for(...) for high-performance "loops" (will be faster in 2.10)
Cheers,
√
On Tue, Dec 20, 2011 at 8:16 AM, Vikas Hazrati <vhazrati@inphina.com> wrote:
We are using a pull push mechanism similar to the perf tests specified here for ZeroMQ.http://www.zeromq.org/results:perf-howtoFor the throughput test with a message size of 4.3KB and 100,000 messages i get a performance of 85K msg/sec
vikas@vikas-laptop:~/w/software/exploded/zeromq-2.1.10/perf$ local_thr tcp://127.0.0.1:5555 4300 100000
message size: 4300 [B]
message count: 100000
mean throughput: 85203 [msg/s]
mean throughput: 2930.983 [Mb/s]However with the code in Scala and using the Scala binding 0.0.3 i get less than 15K msg/sec.
Gist here https://gist.github.com/1496406
Could you please let me know what is going wrong or does the Scala code need some tweaking?
Regards | Vikas
--
Viktor Klang
Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts
Twitter: @viktorklang
--
Best Regards | Vikas
Inphina Technologies Co-Founder and Technical Architect
+91-9899174194
Check out our thoughts @ http://goo.gl/jrKfn
--
Viktor Klang
Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts
Twitter: @viktorklang
--
Best Regards | Vikas
Inphina Technologies Co-Founder and Technical Architect
+91-9899174194
Check out our thoughts @ http://goo.gl/jrKfn
--
Best Regards | Vikas
Inphina Technologies Co-Founder and Technical Architect
+91-9899174194
Check out our thoughts @ http://goo.gl/jrKfn
--
Viktor Klang
Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts
Twitter: @viktorklang
--
Best Regards | Vikas
Inphina Technologies Co-Founder and Technical Architect
+91-9899174194
Check out our thoughts @ http://goo.gl/jrKfn
--
Viktor Klang
Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts
Twitter: @viktorklang
Thu, 2011-12-22, 12:21
#4
Re: Is Scala binding slowing down the ZeroMQ throughput
Yes your assumption is correct i was trying with both
with libraryDependencies += "org.zeromq" % "jzmq" % "2.1.0-SNAPSHOT" i get between 9-11K MPS
with libraryDependencies += "org.zeromq" %% "zeromq-scala-binding" % "0.0.3" i get between 10-12K MPS
with ZeroMQ java binding http://www.zeromq.org/bindings:java I get between 17-19K MPS
essentially for the same message size nowwhere near the 85K mark
vikas@vikas-laptop:~/w/software/exploded/zeromq-2.1.10/perf$ local_thr tcp://127.0.0.1:5555 4300 100000 message size: 4300 [B] message count: 100000 mean throughput: 85203 [msg/s] mean throughput: 2930.983 [Mb/s]
I was wondering if there was some issue in the code like the ones you pointed out about avoiding for etc but now it seems pretty straight forward. https://gist.github.com/1505697
Regards | Vikas
2011/12/21 √iktor Ҡlang <viktor.klang@gmail.com>
--
Best Regards | Vikas
Inphina Technologies Co-Founder and Technical Architect
+91-9899174194
Check out our thoughts @ http://goo.gl/jrKfn
with libraryDependencies += "org.zeromq" % "jzmq" % "2.1.0-SNAPSHOT" i get between 9-11K MPS
with libraryDependencies += "org.zeromq" %% "zeromq-scala-binding" % "0.0.3" i get between 10-12K MPS
with ZeroMQ java binding http://www.zeromq.org/bindings:java I get between 17-19K MPS
essentially for the same message size nowwhere near the 85K mark
vikas@vikas-laptop:~/w/software/exploded/zeromq-2.1.10/perf$ local_thr tcp://127.0.0.1:5555 4300 100000 message size: 4300 [B] message count: 100000 mean throughput: 85203 [msg/s] mean throughput: 2930.983 [Mb/s]
I was wondering if there was some issue in the code like the ones you pointed out about avoiding for etc but now it seems pretty straight forward. https://gist.github.com/1505697
Regards | Vikas
2011/12/21 √iktor Ҡlang <viktor.klang@gmail.com>
2011/12/21 Vikas Hazrati <vhazrati@inphina.com>
I could try with this http://repo.typesafe.com/typesafe/snapshots/org/zeromq/jzmq/2.1.0-SNAPSHOT/ if i understood you correctly?
I was under the assumption that you were trying out the Java version in parallel of Scala?
2011/12/21 √iktor Ҡlang <viktor.klang@gmail.com>
2011/12/21 Vikas Hazrati <vhazrati@inphina.com>Hi Viktor,
Made changes as per recommendations i guess.
https://gist.github.com/1505697
Still getting around 10-12K MPS.
BTW if i run the same code with Java binding instead of Scala i get in the range of 17-19K MPS, however still not close to the perf examples.
What if you use the Java binding from Scala?
Cheers,
√
Regards | Vikas
2011/12/20 √iktor Ҡlang <viktor.klang@gmail.com>Hi Vikas,
2011/12/20 Vikas Hazrati <vhazrati@inphina.com>Viktor
1) We are creating a new bytebuffer to get a somewhat realistic feel since all are messages are going to be different
But that's just completely false, it's not doing that. If you want to bench message sends you need to remove the other factors, or make sure that they are the same no matter the language used.
3) Do you recommend while or parallel for?
while or tail recursion.
2) Did you not quite understand what you meant by benching?
benching == slang for benchmarking
If you put pressure on the wrong component, you're effectively measuring the performance of that component.
Cheers,
√
We are using Akka 1.3-RC4 and Akka actors as of now.
Thanks | Vikas
2011/12/20 √iktor Ҡlang <viktor.klang@gmail.com>
1) Avoid creating a new bytebuffer for each iteration.
2) Avoid benching Scala Actors
3) Avoid for(...) for high-performance "loops" (will be faster in 2.10)
Cheers,
√
On Tue, Dec 20, 2011 at 8:16 AM, Vikas Hazrati <vhazrati@inphina.com> wrote:
We are using a pull push mechanism similar to the perf tests specified here for ZeroMQ.http://www.zeromq.org/results:perf-howtoFor the throughput test with a message size of 4.3KB and 100,000 messages i get a performance of 85K msg/sec
vikas@vikas-laptop:~/w/software/exploded/zeromq-2.1.10/perf$ local_thr tcp://127.0.0.1:5555 4300 100000
message size: 4300 [B]
message count: 100000
mean throughput: 85203 [msg/s]
mean throughput: 2930.983 [Mb/s]However with the code in Scala and using the Scala binding 0.0.3 i get less than 15K msg/sec.
Gist here https://gist.github.com/1496406
Could you please let me know what is going wrong or does the Scala code need some tweaking?
Regards | Vikas
--
Viktor Klang
Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts
Twitter: @viktorklang
--
Best Regards | Vikas
Inphina Technologies Co-Founder and Technical Architect
+91-9899174194
Check out our thoughts @ http://goo.gl/jrKfn
--
Viktor Klang
Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts
Twitter: @viktorklang
--
Best Regards | Vikas
Inphina Technologies Co-Founder and Technical Architect
+91-9899174194
Check out our thoughts @ http://goo.gl/jrKfn
--
Best Regards | Vikas
Inphina Technologies Co-Founder and Technical Architect
+91-9899174194
Check out our thoughts @ http://goo.gl/jrKfn
--
Viktor Klang
Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts
Twitter: @viktorklang
--
Best Regards | Vikas
Inphina Technologies Co-Founder and Technical Architect
+91-9899174194
Check out our thoughts @ http://goo.gl/jrKfn
--
Viktor Klang
Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts
Twitter: @viktorklang
--
Best Regards | Vikas
Inphina Technologies Co-Founder and Technical Architect
+91-9899174194
Check out our thoughts @ http://goo.gl/jrKfn
2011/12/21 Vikas Hazrati <vhazrati@inphina.com>
What if you use the Java binding from Scala?
Cheers,
√
--
Viktor Klang
Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts
Twitter: @viktorklang