Skip to content

Commit

Permalink
arktika example configs
Browse files Browse the repository at this point in the history
  • Loading branch information
fireduck64 committed Jul 5, 2018
1 parent bb32e15 commit d9e4e60
Show file tree
Hide file tree
Showing 9 changed files with 139 additions and 3 deletions.
15 changes: 15 additions & 0 deletions example/arktika/faker.conf
@@ -0,0 +1,15 @@

mine_to_address=addr_here

pool_host=snowday.fun

layer_count=2

layer_0_type=fake
layer_0_threads=256
layer_1_type=file
layer_1_path=/home/arktika/snow
layer_1_threads=0

selected_field=7

26 changes: 26 additions & 0 deletions example/arktika/node1.conf
@@ -0,0 +1,26 @@

mine_to_address=addr_here

pool_host=snowday.fun

layer_count=4
layer_0_type=mem
layer_0_range=0,43
layer_0_threads=6

layer_1_type=remote
layer_1_range=43,86
layer_1_threads=1
layer_1_host=10.138.0.3

layer_2_type=remote
layer_2_range=86,128
layer_2_threads=1
layer_2_host=10.138.0.4

layer_3_type=file
layer_3_path=/home/arktika/snow
layer_3_threads=0

selected_field=7

26 changes: 26 additions & 0 deletions example/arktika/node2.conf
@@ -0,0 +1,26 @@

mine_to_address=addr_here

pool_host=snowday.fun

layer_count=4
layer_0_type=remote
layer_0_range=0,43
layer_0_threads=1
layer_0_host=10.138.0.2

layer_1_type=mem
layer_1_range=43,86
layer_1_threads=6

layer_2_type=remote
layer_2_range=86,128
layer_2_threads=1
layer_2_host=10.138.0.4

layer_3_type=file
layer_3_path=/home/arktika/snow
layer_3_threads=0

selected_field=7

26 changes: 26 additions & 0 deletions example/arktika/node3.conf
@@ -0,0 +1,26 @@

mine_to_address=addr_here

pool_host=snowday.fun

layer_count=4
layer_0_type=remote
layer_0_range=0,43
layer_0_threads=1
layer_0_host=10.138.0.2

layer_1_type=remote
layer_1_range=43,86
layer_1_threads=1
layer_1_host=10.138.0.3

layer_2_type=mem
layer_2_range=86,128
layer_2_threads=6

layer_3_type=file
layer_3_path=/home/arktika/snow
layer_3_threads=0

selected_field=7

4 changes: 4 additions & 0 deletions example/arktika/run-small.sh
@@ -0,0 +1,4 @@
#!/bin/sh

java -Xmx10g -jar Arktika_deploy.jar $1

4 changes: 4 additions & 0 deletions example/arktika/run.sh
@@ -0,0 +1,4 @@
#!/bin/sh

java -Xmx50g -jar Arktika_deploy.jar $1

27 changes: 27 additions & 0 deletions example/arktika/worker.conf
@@ -0,0 +1,27 @@

mine_to_address=addr_here

pool_host=snowday.fun

layer_count=4
layer_0_type=remote
layer_0_range=0,43
layer_0_threads=30
layer_0_host=10.138.0.2

layer_1_type=remote
layer_1_range=43,86
layer_1_threads=30
layer_1_host=10.138.0.3

layer_2_type=remote
layer_2_range=86,128
layer_2_threads=30
layer_2_host=10.138.0.4

layer_3_type=file
layer_3_path=/home/arktika/snow
layer_3_threads=0

selected_field=7

5 changes: 4 additions & 1 deletion miner/src/BatchLayerWorkThread.java
Expand Up @@ -24,7 +24,10 @@
public class BatchLayerWorkThread extends LayerWorkThread
{
private static final Logger logger = Logger.getLogger("snowblossom.miner");
public static final int BATCH_SIZE=256;
// 256 = 590hk/s
// 512 = 635kh/s
// 1024 = 650kh/s
public static final int BATCH_SIZE=1024;

public BatchLayerWorkThread(Arktika arktika, FieldSource fs, FaQueue queue, long total_words)
{
Expand Down
9 changes: 7 additions & 2 deletions miner/src/FieldSourceRemote.java
Expand Up @@ -29,6 +29,7 @@
public class FieldSourceRemote extends FieldSource implements BatchSource
{
private ThreadLocal<SharedMiningServiceBlockingStub> stub_local=new ThreadLocal<>();
SharedMiningServiceBlockingStub stub_one;

public FieldSourceRemote(Config config, int layer)
{
Expand Down Expand Up @@ -56,15 +57,19 @@ public FieldSourceRemote(Config config, int layer)
stub_host = config.get("layer_" + layer + "_host");
stub_port = 2311;

//ManagedChannel channel = ManagedChannelBuilder.forAddress(host, port).usePlaintext(true).build();
//stub = SharedMiningServiceGrpc.newBlockingStub(channel);
// In cloud testing, using stub per thread got 611kh/s vs 575kh/s with a single stub
// otherwise same setup
//ManagedChannel channel = ManagedChannelBuilder.forAddress(stub_host, stub_port).usePlaintext(true).build();
//stub_one = SharedMiningServiceGrpc.newBlockingStub(channel);
}

private String stub_host;
private int stub_port;

protected SharedMiningServiceBlockingStub getStub()
{
if (stub_one != null) return stub_one;

SharedMiningServiceBlockingStub stub = stub_local.get();
if (stub == null)
{
Expand Down

0 comments on commit d9e4e60

Please sign in to comment.