cazala / coin-hive-stratum

use CoinHive's JavaScript miner on any stratum pool
http://npmjs.com/package/coin-hive-stratum
417 stars 462 forks source link

Load testing, #66

Closed Edgy1337 closed 6 years ago

Edgy1337 commented 6 years ago

Hi,

Here are some stats i have gatered and reported the outcome i had.

My first proxy held a 350 miners on a single connection but then the proxy just crashes randomly. Then i splitted them into 100 per connection and i held a nice 1800 miners, also with random crashes.

Any of you guys had better stats or?

Greetings, Mike

cazala commented 6 years ago

I still haven't figured out the right amount of miners per connection, that's why I made it configurable to do some trial and error, soon I'll have access to a larger amount of miners cos last weeks I've been testing with just a few (~10), any feedback or info about your experience with this will be very appreciated.

Edgy1337 commented 6 years ago

I am now updating from 1.4.1 to 2.x.x will let you know there, How to configure max miners per connection?

cazala commented 6 years ago

if you are using the CLI you can pass a flag like this --max-miners-per-connection=100 or if you are using it programatically, you can pass a maxMinersPerConnection property to the Proxy constructor, like:

const Proxy = require("coin-hive-stratum");
const proxy = new Proxy({
  host: "pool.supportxmr.com",
  port: 3333,
  maxMinersPerConnection: 100
});
proxy.listen(443);
Edgy1337 commented 6 years ago

Also what is the best difficulty to mine at? 256 like coinhive? I created a pool wich may be nice to use as a default pool for this proxy

cazala commented 6 years ago

The lower the difficulty the more often your miners will submit jobs, which is good for webminers since the time that a user spends on a certain page might be short, so if the difficulty is too high the miner might not be able to find a hash in the amount of time the user spent on the page. But sending more jobs means your pool will have to validate more hashes, which means bigger and more expensive servers. It's a trade of, but from what I've seen webminers mine on difficulties from 256 to 1000.