Skip to content

Commit 6719cd8

Browse files
authored
Merge pull request #41 from aws-samples/solana
Solana updates after testing Extended RPC node in different regions
2 parents 718f50a + e03f459 commit 6719cd8

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

lib/solana/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,31 @@ The result should be like this (the actual balance might change):
265265
#Delete key pair from the local file system
266266
rm -rf /tmp/keypair.json
267267

268+
```
269+
5. How can I add swap space to the instance if my Solana node runs out of RAM during the initial sync?
270+
271+
There are two ways. Using the existing volume or using a new one. If your instance has Instance Store volume attached, it is better to keep your swap on it.
272+
273+
- Option 1: Dedicated Instance Store volume
274+
275+
```bash
276+
sudo mkswap /dev/nvme3n1
277+
sudo swapon /dev/nvme3n1
278+
# Check the memory space is updated
279+
free -g
280+
```
281+
282+
- Option 2: Existing volume (using Data directory as example):
283+
284+
```bash
285+
sudo mkdir /var/solana/data/swapfile
286+
sudo dd if=/dev/zero of=/var/solana/data/swapfile bs=1MiB count=250KiB
287+
sudo chmod 0600 /var/solana/data/swapfile
288+
sudo mkswap /var/solana/data/swapfile
289+
sudo swapon /var/solana/data/swapfile
290+
free -g
291+
sudo sysctl vm.swappiness=10
292+
268293
```
269294

270295
## Upgrades

lib/solana/lib/assets/user-data/node.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ apt install unzip
2828
cd /opt
2929

3030
echo "Downloading assets zip file"
31-
aws s3 cp $ASSETS_S3_PATH ./assets.zip
31+
aws s3 cp $ASSETS_S3_PATH ./assets.zip --region $AWS_REGION
3232
unzip -q assets.zip
3333

3434
echo "Install and configure CloudWatch agent"

lib/solana/lib/single-node-stack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export class SolanaSingleNodeStack extends cdk.Stack {
132132
})
133133

134134
new cw.CfnDashboard(this, 'solana-cw-dashboard', {
135-
dashboardName: STACK_NAME,
135+
dashboardName: `${STACK_NAME}-${node.instanceId}`,
136136
dashboardBody: dashboardString,
137137
});
138138

0 commit comments

Comments
 (0)