[erlang-questions] bcrypt message queues
Tue May 31 11:30:53 CEST 2016
I load tested with a vm (so the numbers are not relevant but the ratios).
Oliver's fork spawns as many bcrypt_port (as a pool of ports) as many
schedulers we have. Makes sense. The chef/erlang-bcrypt can spawn as many
as we want (pool_size config key).
I used round = 12, which took 42,000-60,000ms if we spawned 100 of workers
on a single core (ok, bad idea, but load testing is such).
With round = 4, it took 400-2100ms (median is 700ms) with the same number
@Sverker: 1 password from shell took 5ms to hash.
If I have time and possibility I embed bcrypt library into basho bench, and
load test bcrypt that way. Because right now I load test it via cowboy rest
api. So with round 4 we can say that other components will be the
bottleneck, not the bcrypt.
On Tue, May 31, 2016 at 10:56 AM, Sverker Eriksson <
> How heavy duty is this bcrypt?
> Does it take milliseconds to hash one little password?
> On 05/30/2016 04:38 PM, Richard Jonas wrote:
> Hey guys,
> we are implementing user registration and password checking functionality
> and using bcrypt for password hashing. During registration and also during
> login we need to compute the hashes of the passwords. The problem is that
> bcrypt is serializing requests even when I choose nif or port mechanism.
> With nif a message queue is instantly built when multiple users log in
> (compute hashes for match password). With a pool size+port implementation,
> the message queue building has just deferred a bit.
> Is there any alternative to creating bcrypt-like hashes? For me it seems
> that this library cannot be scaled well. Or have I missed something?
> erlang-questions mailing listerlang-questions@REDACTED://erlang.org/mailman/listinfo/erlang-questions
Erlang Solutions Hungary Kft
Riverpark Office K.32
Közraktár street 32. 3/1.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions