Skip to content

Commit 2c98bc8

Browse files
committed
preps for using new queue for SBCL and faster default one for rest.
The separate lparallel queue has been removed because the new default is as fast as it.
1 parent 69661b9 commit 2c98bc8

File tree

6 files changed

+273
-66
lines changed

6 files changed

+273
-66
lines changed

README.md

+12-7
Original file line numberDiff line numberDiff line change
@@ -633,12 +633,12 @@ This will tell log4cl to do any logging for sento in warn level.
633633

634634
Hardware specs (M1)):
635635

636-
- Mac M1 Ultra, 32 GB RAM
636+
- Mac M1 Ultra, 64 GB RAM
637637

638638
![](./docs/perf-M1Ultra.png)
639639
![](perf-M1Ultra.png)
640640

641-
Hardware specs (x86-64), bench of previous version, Sento 2:
641+
Hardware specs (x86-64):
642642

643643
- iMac Pro (2017), 8 Core Xeon, 32 GB RAM
644644

@@ -648,15 +648,15 @@ Hardware specs (x86-64), bench of previous version, Sento 2:
648648

649649
**All**
650650

651-
Version 3 of Sento uses the jpl-queues package which is slightly slower than the lparallel cons-queue. The lparallel cons-queue package is available as separate asdf system if needed and if the additional dependency is acceptable.
651+
Version 3.2.0 of Sento uses the sbcl `sb-concurrent:queue` whcih is very fast and works using CAS (compare-and-swap) where as the other implementations use a still fast double stack queue protected by locking.
652652

653-
The benchmark was created by having 8 threads throwing each 125k (1m altogether) messages at 1 actor. The timing was taken for when the actor did finish processing those 1m messages. The messages were sent by either all `tell`, `ask-s`, or `ask` to an actor whose message-box worked using a single thread (`:pinned`) or a dispatched message queue (`:shared` / `dispatched`) with 8 workers.
653+
The benchmark was created by having 8 threads throwing each 125k (1M altogether) messages at 1 actor. The timing was taken for when the actor did finish processing those 1M messages. The messages were sent by either all `tell`, `ask-s`, or `ask` to an actor whose message-box worked using a single thread (`:pinned`) or a dispatched message queue (`:shared` / `dispatched`) with 8 workers.
654654

655655
Of course a `tell` is in most cases the fastest one, because it's the least resource intensive and there is no place that is blocking in this workflow.
656656

657-
**SBCL (v2.3.0)**
657+
**SBCL (v2.4.1)**
658658

659-
Even though SBCL is by far the fastest one with `tell` on both `:pinned` and `dispatched`, it had massive problems on `dispatched - ask-s` where I had to lower the number of messages to 200k alltogether. Beyond that value SBCL didn't get it worked out.
659+
SBCL is very fast, but this tests uses SBCLs own queue implementation based on CAS instead of locking.
660660

661661
**LispWorks (8.0.1)**
662662

@@ -668,7 +668,12 @@ Unfortunately CCL doesn't work natively on M1 Apple CPU.
668668

669669
**ABCL (1.9)**
670670

671-
The pleasant surprise was ABCL. While not being the fastest it is the most robust. Where SBCL and CCL were struggling you could throw anything at ABCL and it'll cope with it. I'm assuming that this is because of the massively battle proven Java Runtime.
671+
The pleasant surprise was ABCL. While not being the fastest it is very robust.
672+
673+
**Clasp 2.5.0**
674+
675+
Very slow. Used default settings, as also for the other tests.
676+
Maybe something can be tweaked?
672677

673678
### Migration guide for moving from Sento 2 to Sento 3
674679

bench.lisp

-7
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
(declare (ignore queue-size))
2121
;; dispatchers used for the async-ask
2222
(setf *per-thread* 125000)
23-
#+ccl
24-
(setf *per-thread* (if asyncask 10000 125000))
2523
(setf *system* (asys:make-actor-system '(:dispatchers (:shared (:workers 8)))))
2624
(setf *actor* (ac:actor-of *system*
2725
:receive (lambda (msg)
@@ -56,11 +54,6 @@
5654

5755
(defun runner-dp (&optional (withreply-p nil) (asyncask nil) (queue-size 0))
5856
(declare (ignore queue-size))
59-
#+sbcl
60-
(setf *per-thread* 125000) ;(if (or withreply-p asyncask) 50000 125000))
61-
#+ccl
62-
(setf *per-thread* (if asyncask 10000 125000))
63-
#+(or abcl clasp allegro lispworks8)
6457
(setf *per-thread* 125000)
6558
(setf *system* (asys:make-actor-system '(:dispatchers (:shared (:workers 8)))))
6659
(setf *actor* (ac:actor-of *system*

docs/perf-M1Ultra.png

-71.9 KB
Loading

docs/perf-x86_64.png

-44.7 KB
Loading

docs/perf.numbers

-10.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)