Redis cluster is hosted on separate machines. Say, I create a pool, and each actor populates a redis set with members. To do so I call future on a pool. Each time I go over 400 keys, (and pool size is also 400) actors begin to crash with ExitEvent or not enough memory (OS X, 8Gb RAM). But in real life I'll have to operate with millions and millions of keys and do it as fast as it possible.For example how I'm trying to populate sets in Reids https://github.com/yankov/redis-migrator/blob/master/migrator_benchmark.rb Am I doing anything wrong? Or maybe I picked the wrong tool for this job?
Thanks a lot for your response! I split code into two classes and now creating a pool for MigratorBenchmark from a Populator class. I simplified an example also https://github.com/yankov/redis-migrator/blob/master/migrator_benchmark.rb.The same problem persists though - it starts failing if I'm trying to create more than 400 actors. But I think that might be that ulimit is not set properly on redis nodes, I'll try to play with it too.
Also, even with the pool size set to 400 and number of populating keys set to 400, I'm seeing that it spawns about 1.5k threads. Is it normal?