专注Chia
分享与XCH有关的资讯

chia-plotter(多线程)P盘工具

chia-plotter(流水线多线程)

这是 chia 绘图仪的新实现,它被设计为处理管道,类似于 GPU 的工作方式,只有“核心”是普通的软件 CPU 线程。

因此,这款绘图仪能够充分利用任何存储设备的带宽,只需增加“核心”的数量,即。线程。

用法

For <poolkey> and <farmerkey> see output of `chia keys show`.
<tmpdir> needs about 220G space, it will handle about 25% of all writes. (Examples: './', '/mnt/tmp/')
<tmpdir2> needs about 110G space and ideally is a RAM drive, it will handle about 75% of all writes.

Usage:
  chia_plot [OPTION...]

  -n, --count arg      Number of plots to create (default = 1, -1 = infinite)
  -r, --threads arg    Number of threads (default = 4)
  -u, --buckets arg    Log2 number of buckets (default = 7 (ie. 2^7 = 128))
  -t, --tmpdir arg     Temporary directory, needs ~220G (default = $PWD)
  -2, --tmpdir2 arg    Temporary directory 2, needs ~110G [RAM] (default =
                       <tmpdir>)
  -d, --finaldir arg   Final directory (default = <tmpdir>)
  -p, --poolkey arg    Pool Public Key (48 bytes)
  -f, --farmerkey arg  Farmer Public Key (48 bytes)
      --help           Print help

<threads>如果您有足够的内核,请确保启动,默认值为 4。根据阶段将启动更多线程,该设置只是一个乘数。

RAM 使用量取决于<threads><buckets>。默认情况下<buckets>和 4 个线程总共约 2GB,16 个线程总共约 6GB。

如何支持

我自己开发了这个,即使我已经用官方(慢)绘图仪填满了我所有的硬盘(~50 TiB)。

结果

在具有 256GB RAM 和 3x800GB SATA SSD RAID0的双 Xeon(R) E5-2650v2@2.60GHz R720 上,使用 110G tmpfs 用于<tmpdir2>

Number of Threads: 16
Number of Sort Buckets: 2^7 (128)
Working Directory:   ./
Working Directory 2: ./ram/
[P1] Table 1 took 21.0467 sec
[P1] Table 2 took 152.6 sec, found 4295044959 matches
[P1] Lost 77279 matches due to 32-bit overflow.
[P1] Table 3 took 181.169 sec, found 4295030463 matches
[P1] Lost 62514 matches due to 32-bit overflow.
[P1] Table 4 took 223.303 sec, found 4295044715 matches
[P1] Lost 76928 matches due to 32-bit overflow.
[P1] Table 5 took 232.129 sec, found 4294967739 matches
[P1] Lost 235 matches due to 32-bit overflow.
[P1] Table 6 took 221.468 sec, found 4294932892 matches
[P1] Table 7 took 182.597 sec, found 4294838936 matches
Phase 1 took 1214.37 sec
[P2] max_table_size = 4295044959
[P2] Table 7 scan took 16.9198 sec
[P2] Table 7 rewrite took 44.796 sec, dropped 0 entries (0 %)
[P2] Table 6 scan took 47.5287 sec
[P2] Table 6 rewrite took 81.2195 sec, dropped 581301544 entries (13.5346 %)
[P2] Table 5 scan took 46.6094 sec
[P2] Table 5 rewrite took 77.9914 sec, dropped 761979000 entries (17.7412 %)
[P2] Table 4 scan took 52.427 sec
[P2] Table 4 rewrite took 75.7487 sec, dropped 828872625 entries (19.2983 %)
[P2] Table 3 scan took 54.0839 sec
[P2] Table 3 rewrite took 74.9016 sec, dropped 855088153 entries (19.9088 %)
[P2] Table 2 scan took 49.692 sec
[P2] Table 2 rewrite took 73.0273 sec, dropped 865610902 entries (20.1537 %)
Phase 2 took 721.638 sec
Wrote plot header with 268 bytes
[P3-1] Table 2 took 76.0894 sec, wrote 3429434057 right entries
[P3-2] Table 2 took 75.1076 sec, wrote 3429434057 left entries, 3429434057 final
[P3-1] Table 3 took 78.0162 sec, wrote 3439942310 right entries
[P3-2] Table 3 took 73.0284 sec, wrote 3439942310 left entries, 3439942310 final
[P3-1] Table 4 took 133.769 sec, wrote 3466172090 right entries
[P3-2] Table 4 took 76.1504 sec, wrote 3466172090 left entries, 3466172090 final
[P3-1] Table 5 took 127.125 sec, wrote 3532988739 right entries
[P3-2] Table 5 took 77.7182 sec, wrote 3532988739 left entries, 3532988739 final
[P3-1] Table 6 took 134.779 sec, wrote 3713631348 right entries
[P3-2] Table 6 took 81.9068 sec, wrote 3713631348 left entries, 3713631348 final
[P3-1] Table 7 took 69.066 sec, wrote 4294838936 right entries
[P3-2] Table 7 took 94.0157 sec, wrote 4294838936 left entries, 4294838936 final
Phase 3 took 1104.11 sec, wrote 21877007480 entries to final plot
[P4] Starting to write C1 and C3 tables
[P4] Finished writing C1 and C3 tables
[P4] Writing C2 table
[P4] Finished writing C2 table
Phase 4 took 89.0748 sec, final plot size is 108834390977 bytes
Total plot creation time was 3129.28 sec

如何验证

为确保绘图有效,您可以使用以下ProofOfSpace工具chiapos

git clone https://github.com/Chia-Network/chiapos.git
cd chiapos && mkdir build && cd build && cmake .. && make -j8
./ProofOfSpace check -f plot-k32-???.plot [num_iterations]

未来的计划

我确实有一些 GPU 挖矿的历史,早在 2014 年,我就第一个开源了 XPM GPU 矿机,它的效率比 CPU 矿机高出大约 40 倍。请参阅我的其他回购。

因此,我将添加 OpenCL 支持以进一步加快绘图仪的速度,从而减轻 CPU 的大部分负载,这只是时间问题。

依赖关系

  • cmake (>=3.14)
  • libgmp3-dev
  • libsodium-dev

安装

git submodule update --init
./make_devel.sh

二进制文件最终会在build/,您可以自由地将它们复制到其他地方(在同一台机器或类似的操作系统上)。

已知的问题

  • 不使用 gcc-11 编译,使用较低版本。
  • 至少需要 cmake 3.14(因为 bls-signatures)

下载地址:https://github.com/madMAx43v3r/chia-plotter

赞(0) 打赏
未经允许不得转载:Chia之家 » chia-plotter(多线程)P盘工具

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

DIY Chia矿机,更便宜,更有乐趣

进入DIY矿机配置单

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏