Skip to content

Commit

Permalink
add ebsconfiguration to cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
ycryptx committed Nov 26, 2023
1 parent e775596 commit 19080bf
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
4 changes: 1 addition & 3 deletions sequencer/src/map-reduce/client/client.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import * as path from 'path';
import * as fs from 'fs';
import {
EMRClient,
RunJobFlowCommand,
Expand All @@ -16,7 +14,7 @@ import {
import * as randString from 'randomstring';
import { Mode } from '../types';
import { Uploader } from '../uploader';
import { runShellCommand, preProcessRawTransactions } from '../utils';
import { runShellCommand } from '../utils';
import { RollupProofBase } from '@ycryptx/rollup';
import {
YARN_CONTAINER_MEMORY,
Expand Down
22 changes: 21 additions & 1 deletion sequencer/src/map-reduce/constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
import { EbsConfiguration, InstanceTypeConfig } from '@aws-sdk/client-emr';

const EbsConfiguration: EbsConfiguration = {
EbsBlockDeviceConfigs: [
{
VolumeSpecification: {
SizeInGB: 3,
VolumeType: 'gp2',
},
VolumesPerInstance: 1,
},
],
EbsOptimized: true,
};

/**
* The amount of memory to allocate to each Hadoop container generating the proof in the map-reduce operation
*/
Expand Down Expand Up @@ -30,25 +45,30 @@ export const REDUCER_SEQUENTIALISM = 2;
* The instance types the Hadoop cluster can use when it provisions / autoscales itself.
* For now we only support instances of different families but similar size.
*/
export const INSTANCE_TYPES = [
export const INSTANCE_TYPES: InstanceTypeConfig[] = [
{
InstanceType: 'm5.xlarge',
BidPrice: '0.5',
EbsConfiguration,
},
{
InstanceType: 'm5d.xlarge',
BidPrice: '0.5',
EbsConfiguration,
},
{
InstanceType: 'm6a.xlarge',
BidPrice: '0.5',
EbsConfiguration,
},
{
InstanceType: 'm6g.xlarge',
BidPrice: '0.5',
EbsConfiguration,
},
{
InstanceType: 'm6i.xlarge',
BidPrice: '0.5',
EbsConfiguration,
},
];

0 comments on commit 19080bf

Please sign in to comment.