# 非激励双子座 II 期压力测试教程

## **压力测试启动派对**

日期：2022 年 9 月 6 日，星期二\
时间：太平洋标准时间上午 8 点/世界标准时间下午 3 点\
地点：[Subspace Network](https://discord.gg/WG3X5hhW?event=1014287689006194789) Discord

## 压力测试要求

| Hardware | Specs           |
| -------- | --------------- |
| CPU      | 2 Core+         |
| RAM      | 4GB+ (Rec. 8GB) |
| Storage  | 150GB           |

## 测试教程

### CLI运行教程

#### 安装必要组件

```shell
sudo apt-get install ocl-icd-opencl-dev curl -y
```

#### 下载node和farmer程序

<pre class="language-shell"><code class="lang-shell">sudo mkdir ~/subspace-cli &#x26;&#x26; cd ~/subspace-cli
<strong>wget https://github.com/subspace/subspace/releases/download/gemini-2a-2022-sep-06/subspace-node-ubuntu-x86_64-gemini-2a-2022-sep-06
</strong><strong>wget https://github.com/subspace/subspace/releases/download/gemini-2a-2022-sep-06/subspace-farmer-ubuntu-x86_64-gemini-2a-2022-sep-06
</strong></code></pre>

#### 运行程序

{% hint style="info" %}
先运行node程序，等待node程序显示出如下类似内容时，再运行farmer程序

2022-02-03 10:52:29 ⚙️ Syncing, target=#215883 (2 peers), best: #55 (0xafc7…bccf), finalized #0 (0x6ada…0d38), ⬇ 850.1kiB/s ⬆ 1.5kiB/s
{% endhint %}

<pre class="language-shell"><code class="lang-shell"><strong># 运行node
</strong>nohup ./subspace-node-ubuntu-x86_64-gemini-2a-2022-sep-06 \
  --chain gemini-2a \
  --execution wasm \
  --state-pruning archive \
  --validator \
  --name &#x3C;修改自己的节点名字> \
  > node.log 2>&#x26;1 &#x26;
  
# 运行farmer
nohup ./subspace-farmer-ubuntu-x86_64-gemini-2a-2022-sep-06 farm \
  --reward-address &#x3C;修改为自己的钱包地址> \
  --plot-size &#x3C;修改为想要绘图的大小，最大100G> \
  > farmer.log 2>&#x26;1 &#x26;
</code></pre>

#### 示例

<pre class="language-shell"><code class="lang-shell"><strong># 运行node
</strong>nohup ./subspace-node-ubuntu-x86_64-gemini-2a-2022-sep-06 \
  --chain gemini-2a \
  --execution wasm \
  --state-pruning archive \
  --validator \
  --name test \
  > node.log 2>&#x26;1 &#x26;
  
# 运行farmer
nohup ./subspace-farmer-ubuntu-x86_64-gemini-2a-2022-sep-06 farm \
  --reward-address stxxxxxxxxxxx \
  --plot-size 50G \
  > farmer.log 2>&#x26;1 &#x26;
</code></pre>

#### 查看运行日志

```shell
# 查看node运行日志 (退出查看日志界面，直接按键盘Ctrl + C)
cd ~/subspace-cli
tail -f node.log
#查看farmer运行日志
tail -f farmer.log
```

### Docker运行教程

#### 安装docker和docker-compose

```shell
# 安装 Docker
curl -fsSL get.docker.com -o get-docker.sh
sh get-docker.sh
systemctl enable docker
systemctl start docker

# 安装 Docker-compose
curl -L https://github.com/docker/compose/releases/download/v2.10.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
```

#### 创建目录

```shell
sudo mkdir ~/subspace-docker && cd ~/subspace-docker
```

#### 下载编排文件

```shell
sudo wget -O docker-compose.yml https://raw.githubusercontent.com/skyMetaverse/subspace-docker/main/dokcer-compose.yml
```

#### 修改配置文件

{% hint style="info" %}
name、rewardAddress、一定要修改为自己的地址。

plotSize字段要根据自己的实际硬盘大小来填写，此次压力测试绘图最大为100G。
{% endhint %}

```shell
nodeImage=node:gemini-2a-2022-sep-06
farmerImage=farmer:gemini-2a-2022-sep-06
name=<节点名字，建议用英文>
rewardAddress=<钱包地址>
plotSize=<绘图大小>

sed -i "s/node:snapshot-DATE/node:$nodeImage/g" docker-compose.yml
sed -i "s/farmer:snapshot-DATE/node:$farmerImage/g" docker-compose.yml
sed -i "s/INSERT_YOUR_ID/$name/g" docker-compose.yml
sed -i "s/WALLET_ADDRESS/$rewardAddress/g" docker-compose.yml
sed -i "s/PLOT_SIZE/$plotSize/g" docker-compose.yml
```

#### 示例

```shell
nodeImage=ghcr.io/subspace/node:gemini-2a-2022-sep-06
farmerImage=ghcr.io/subspace/farmer:gemini-2a-2022-sep-06
name=test
rewardAddress=stxxxxxxxxxx
plotSize=50G

sed -i "s/node:snapshot-DATE/node:$nodeImage/g" docker-compose.yml
sed -i "s/farmer:snapshot-DATE/node:$farmerImage/g" docker-compose.yml
sed -i "s/INSERT_YOUR_ID/$name/g" docker-compose.yml
sed -i "s/WALLET_ADDRESS/$rewardAddress/g" docker-compose.yml
sed -i "s/PLOT_SIZE/$plotSize/g" docker-compose.yml
```

#### 启动Node和Farmer

```shell
sudo docker-compose pull
sudo docker-compose up -d
```

#### 查看运行日志

```shell
cd ~/subspace-docker
sudo docker-compose logs -f --tail=1000

# 退出查看日志界面
# 按住键盘Ctrl + C
```

#### 在遥感浏览器中查询能否看到节点

打开[网站](https://telemetry.subspace.network/#list/0x43d10ffd50990380ffe6c9392145431d630ae67e89dbc9c014cac2a417759101)，Ctrl +F 搜索自己的节点名字

<figure><img src="/files/lAmm2cglgWGECfTWoMaG" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://syskey.gitbook.io/subspace-network/she-qu-jiao-cheng/fei-ji-li-shuang-zi-zuo-ii-qi-ya-li-ce-shi-jiao-cheng.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
