mmaker / zkalc

A web tool that helps you compare and visualize the performance of cryptographic operations
https://zka.lc
BSD 3-Clause "New" or "Revised" License
71 stars 11 forks source link

Single-threaded performance #46

Open bkomuves opened 1 month ago

bkomuves commented 1 month ago

As I understand, most (?) of the benchmarks are multi-threaded.

However, I think it would be very useful to see single-threaded performance too. There are several reasons for that:

So a feature request: the ability to switch between single-threaded and multi-threaded benchmarks (and maybe also present some information about the number of physical / logical cores in the machines used for testing)

mmaker commented 6 days ago

Hi @bkomuves!

I am in favor of creating an advanced pane where users can select more operations and also select single vs multi-core operations. I would be happy to review a PR that addresses this issue, if you want to take a stab at it. Unfortunately, I don't have capacity for implementing it myself at the moment.

Replying more pedantically to your points: I think people can have an idea of how many cpu cores etc those amazon instances have easily, they can just hover on the machine name Screenshot 2024-07-04 at 10 52 38 I also think that the number of threads/the language support/parallelism of an algorithm/metric of comparison are not part of the core scope of zkalc. Zkalc's core business is answering the question of how much will it roughly take to run [public-key protocol] in [modern machine]? with a simple interface that non-experts can use. Towards this goal, I don't think having single-threaded performance as the default is a good idea, because nobody today will use single-threading in production. That said, I agree that it'd be really nice to have an interface for advanced users like you.

Thoughts?

bkomuves commented 6 days ago

I politely disagree.

I always use single-threaded performance when estimating the speeds of the different algorithms (and implementations), because that's what's actually comparable, and you can always just multiply by some ad-hoc parallel multipliers, say 6x-10x for a modern laptop, or 15-30x for a modern server (assuming very good parallelization), or whatever. But the point is that these multipliers change with the hardware.

Not all ZK applications are supposed to run on the latest bleeding edge hardware. And it's simple to estimate the multiplier for your target machine, but pretty much impossible to estimate it for whatever machines these benchmarks where run on, without getting access to the exact same machine and running some benchmarks on your own, which kind of defeats the purpose.

I don't think this service is useful for "non-experts" at all. I however think it can be very useful for experts.

Oh I somehow missed the hovering machine description! Still, to reiterate, I personally have zero idea what EC2 m6g.8xlarge etc means, and the only part of that description I can decipher is the number of cores (which arguably is the most important part) and size of the memory. And I would bet that their meaning 1) changes in time; 2) will become obscurity in a few years as Amazon replaces their server fleet. While single-threaded speeds change much more slowly these days, as we are close to the limits of what the current technology can achieve.

Unfortunately I don't have the capacity either , but maybe when finally I get access to more man-power I can try and delegate.

Thanks.

mmaker commented 6 days ago

Just replying to your paragraph:

Not all ZK applications are supposed to run on the latest bleeding edge hardware.

because I think my view is already in the previous message (in short: I am ok with an advanced interface).

About that, and trying to constructive, we try to support the widest range of hardware and CPU possible, including the cheapest available

Screenshot 2024-07-04 at 13 28 04

and (as mentioned in the about page) we are very welcoming for people to submit their new measurements :)

If you are able to find some man-power I'm happy to have a more extended discussion.