Hi Bas
On Fri, Oct 16, 2026 at 03:26:24PM +0200, Bas Westerbaan wrote:
> Nice.
> The OpenSSL implementation of ML-DSA-44 is not optimal yet. On an old
> i7-4790 I get on a single core mean for signing
>
> OpenSSL 3.5.5 1,415/s
> BoringSSL (oct 2026) 4,000/s
True :) there's improvement possible across implementations.
> Throughput of GPU is great, but latency is probably worse. That's ok for
> offline signing, but is of course less than ideal for verification. Did you
> record latency numbers?
The answer depends on various factors like the frame sizes being
submitted, the size of buffers transferred, the type of buffers used,
frame counts of queued frames, the queuing design, the implementation of
the shaders, optimizer, register pressure, etc. The turnaround time can
be kept in check. Current GPUs can deliver fast turnaround at least for
applications like DNSSEC validation and TLS. But it can degenerate
easily if any of the factors are out of control, as can be seen if you
try the RSA or P-384 shaders currently. :)
>From a high level, a stub could wait for 5s for a query to a resolver to
be responded to. Network RTT varies widely as you know and resolvers may
let a resolution take between 10-30s. If properly tuned, the overall
verification time for a trust chain on a GPU can be fine compared to
other things. Also the CPU would not be blocked during this time.
Here are some timings from a benchmark program for ML-DSA-44
verification which processes 4 frames of 4096 items each (total 16384
verifies with distinct keys) in the latest release of Loop:
stage=upload total=2.176 ms frames=4 avg=544.008 us
stage=compute total=14.039 ms frames=4 avg=3509.840 us
stage=download total=0.004 ms frames=4 avg=0.960 us
producer: wait=15.761 ms
With 4 frames of 1024 items each:
stage=upload total=0.548 ms frames=4 avg=136.888 us
stage=compute total=4.142 ms frames=4 avg=1035.552 us
stage=download total=0.002 ms frames=4 avg=0.384 us
producer: wait=5.671 ms
The producer wait is the overall turnaround time which includes some
miniscule polling too while the GPU is not idle. As can be seen in the
individual stage timings, it's the computation that takes most of the
time, not the GPU transfers and command submit overheads.
Loop's async DST API has bulk (dnssec-signzone) and interactive
(resolver validator) submission modes where even interactive submits are
batched for throughput performance. The turnaround time can be managed
for interactive work, but batching is necessary. A GPU will not offer
any performance gain over CPU unless it's kept fed in sumptuous batches.
A key point I wanted to make in my last email is the change in CPU usage
in the timings. With offload to a coprocessor, the CPU has far more time
for application processing in high-traffic network facing programs.
Mukund
_______________________________________________
DNSOP mailing list -- [email protected]
To unsubscribe send an email to [email protected]