chantools
chantools copied to clipboard
High-performance vanity gen
I was attempting to run chantools vanitygen on an AWS m5.24xlarge using this command:
chantools vanitygen --prefix 0212345678 --threads 255
and I only got about a 5x speed improvement over a quad-core laptop.
Any ideas?
This instance should have 96 cores. So was hoping for like a 10-15x improvement.
The parallelism in vanitygen uses runtime.GOMAXPROCS (https://pkg.go.dev/runtime). Maybe that doesn't scale very well to a high core count?
I don't have much experience with highly parallel code to be honest. But maybe you can tweak it a bit with trial and error?
Maybe the common "synchronization point" in the code here happens too often? Try increasing that number by factor 10 or 100. That will mean the stats printed every second will be less precise but the threads will be blocked less often.
I'm happily accepting PRs if you find something that can be optimized.