@@ -9,22 +9,29 @@ simply by increasing the number of "cores", ie. threads.
9
9
## Usage
10
10
11
11
```
12
- chia_plot <pool_key> <farmer_key> [tmp_dir] [tmp_dir2] [num_threads] [log_num_buckets]
13
-
14
- For <pool_key> and <farmer_key> see output of `chia keys show`.
15
- <tmp_dir> needs about 200G space, it will handle about 25% of all writes. (Examples: './', '/mnt/tmp/')
16
- <tmp_dir2> needs about 110G space and ideally is a RAM drive, it will handle about 75% of all writes.
17
- If <tmp_dir> is not specified it defaults to current directory.
18
- If <tmp_dir2> is not specified it defaults to <tmp_dir>.
19
- [num_threads] defaults to 4, it's recommended to use number of physical cores.
20
- [log_num_buckets] defaults to 7 (2^7 = 128)
12
+ For <poolkey> and <farmerkey> see output of `chia keys show`.
13
+ <tmpdir> needs about 220 GiB space, it will handle about 25% of all writes. (Examples: './', '/mnt/tmp/')
14
+ <tmpdir2> needs about 110 GiB space and ideally is a RAM drive, it will handle about 75% of all writes.
15
+
16
+ Usage:
17
+ chia_plot [OPTION...]
18
+
19
+ -n, --count arg Number of plots to create (default = 1, -1 = infinite)
20
+ -r, --threads arg Number of threads (default = 4)
21
+ -u, --buckets arg Number of buckets (default = 128)
22
+ -t, --tmpdir arg Temporary directory, needs ~220 GiB (default = $PWD)
23
+ -2, --tmpdir2 arg Temporary directory 2, needs ~110 GiB [RAM] (default = <tmpdir>)
24
+ -d, --finaldir arg Final directory (default = <tmpdir>)
25
+ -p, --poolkey arg Pool Public Key (48 bytes)
26
+ -f, --farmerkey arg Farmer Public Key (48 bytes)
27
+ --help Print help
21
28
```
22
29
23
- Make sure to crank up ` <num_threads > ` if you have plenty of cores, the default is 4.
30
+ Make sure to crank up ` <threads > ` if you have plenty of cores, the default is 4.
24
31
Depending on the phase more threads will be launched, the setting is just a multiplier.
25
32
26
- RAM usage depends on ` <num_threads > ` and ` <log_num_buckets > ` .
27
- With default ` <log_num_buckets > ` and 4 threads it's ~ 2GB total, with 16 threads it's ~ 6GB total.
33
+ RAM usage depends on ` <threads > ` and ` <buckets > ` .
34
+ With default ` <buckets > ` and 4 threads it's ~ 2GB total, with 16 threads it's ~ 6GB total.
28
35
29
36
## How to Support
30
37
@@ -34,67 +41,69 @@ I developed this on my own time, even though I already filled all my HDDs (~50 T
34
41
35
42
## Results
36
43
37
- On a dual Xeon(R)
[email protected] R720 with 256GB RAM and a 3x800GB SATA SSD RAID0, using a 110G tmpfs for
` <tmp_dir2 > ` :
44
+ On a dual Xeon(R)
[email protected] R720 with 256GB RAM and a 3x800GB SATA SSD RAID0, using a 110G tmpfs for
` <tmpdir2 > ` :
38
45
39
46
```
40
47
Number of Threads: 16
41
48
Number of Sort Buckets: 2^7 (128)
42
- Working Directory: . /
43
- Working Directory 2: . /ram/
44
- [P1] Table 1 took 21.0467 sec
45
- [P1] Table 2 took 152.6 sec, found 4295044959 matches
46
- [P1] Lost 77279 matches due to 32-bit overflow.
47
- [P1] Table 3 took 181.169 sec, found 4295030463 matches
48
- [P1] Lost 62514 matches due to 32-bit overflow.
49
- [P1] Table 4 took 223.303 sec, found 4295044715 matches
50
- [P1] Lost 76928 matches due to 32-bit overflow.
51
- [P1] Table 5 took 232.129 sec, found 4294967739 matches
52
- [P1] Lost 235 matches due to 32-bit overflow.
53
- [P1] Table 6 took 221.468 sec, found 4294932892 matches
54
- [P1] Table 7 took 182.597 sec, found 4294838936 matches
55
- Phase 1 took 1214.37 sec
56
- [P2] max_table_size = 4295044959
57
- [P2] Table 7 scan took 16.9198 sec
58
- [P2] Table 7 rewrite took 44.796 sec, dropped 0 entries (0 %)
59
- [P2] Table 6 scan took 47.5287 sec
60
- [P2] Table 6 rewrite took 81.2195 sec, dropped 581301544 entries (13.5346 %)
61
- [P2] Table 5 scan took 46.6094 sec
62
- [P2] Table 5 rewrite took 77.9914 sec, dropped 761979000 entries (17.7412 %)
63
- [P2] Table 4 scan took 52.427 sec
64
- [P2] Table 4 rewrite took 75.7487 sec, dropped 828872625 entries (19.2983 %)
65
- [P2] Table 3 scan took 54.0839 sec
66
- [P2] Table 3 rewrite took 74.9016 sec, dropped 855088153 entries (19.9088 %)
67
- [P2] Table 2 scan took 49.692 sec
68
- [P2] Table 2 rewrite took 73.0273 sec, dropped 865610902 entries (20.1537 %)
69
- Phase 2 took 721.638 sec
49
+ Working Directory: /mnt/tmp3/chia/tmp /
50
+ Working Directory 2: /mnt/tmp3/chia/tmp /ram/
51
+ [P1] Table 1 took 18.2322 sec
52
+ [P1] Table 2 took 152.806 sec, found 4294955136 matches
53
+ [P1] Table 3 took 181.893 sec, found 4295004058 matches
54
+ [P1] Lost 36189 matches due to 32-bit overflow.
55
+ [P1] Table 4 took 207.631 sec, found 4295076024 matches
56
+ [P1] Lost 108422 matches due to 32-bit overflow.
57
+ [P1] Table 5 took 210.324 sec, found 4295073698 matches
58
+ [P1] Lost 106662 matches due to 32-bit overflow.
59
+ [P1] Table 6 took 205.312 sec, found 4294986463 matches
60
+ [P1] Lost 19157 matches due to 32-bit overflow.
61
+ [P1] Table 7 took 166.982 sec, found 4294910985 matches
62
+ Phase 1 took 1143.2 sec
63
+ [P2] max_table_size = 4295076024
64
+ [P2] Table 7 scan took 16.6775 sec
65
+ [P2] Table 7 rewrite took 40.4863 sec, dropped 0 entries (0 %)
66
+ [P2] Table 6 scan took 47.6553 sec
67
+ [P2] Table 6 rewrite took 66.2653 sec, dropped 581270438 entries (13.5337 %)
68
+ [P2] Table 5 scan took 45.4674 sec
69
+ [P2] Table 5 rewrite took 67.3295 sec, dropped 762045018 entries (17.7423 %)
70
+ [P2] Table 4 scan took 44.4048 sec
71
+ [P2] Table 4 rewrite took 62.1307 sec, dropped 828943971 entries (19.2999 %)
72
+ [P2] Table 3 scan took 45.1361 sec
73
+ [P2] Table 3 rewrite took 61.2604 sec, dropped 855078559 entries (19.9087 %)
74
+ [P2] Table 2 scan took 46.5209 sec
75
+ [P2] Table 2 rewrite took 61.3043 sec, dropped 865523252 entries (20.1521 %)
76
+ Phase 2 took 635.101 sec
70
77
Wrote plot header with 268 bytes
71
- [P3-1] Table 2 took 76.0894 sec, wrote 3429434057 right entries
72
- [P3-2] Table 2 took 75.1076 sec, wrote 3429434057 left entries, 3429434057 final
73
- [P3-1] Table 3 took 78.0162 sec, wrote 3439942310 right entries
74
- [P3-2] Table 3 took 73.0284 sec, wrote 3439942310 left entries, 3439942310 final
75
- [P3-1] Table 4 took 133.769 sec, wrote 3466172090 right entries
76
- [P3-2] Table 4 took 76.1504 sec, wrote 3466172090 left entries, 3466172090 final
77
- [P3-1] Table 5 took 127.125 sec, wrote 3532988739 right entries
78
- [P3-2] Table 5 took 77.7182 sec, wrote 3532988739 left entries, 3532988739 final
79
- [P3-1] Table 6 took 134.779 sec, wrote 3713631348 right entries
80
- [P3-2] Table 6 took 81.9068 sec, wrote 3713631348 left entries, 3713631348 final
81
- [P3-1] Table 7 took 69.066 sec, wrote 4294838936 right entries
82
- [P3-2] Table 7 took 94.0157 sec, wrote 4294838936 left entries, 4294838936 final
83
- Phase 3 took 1104.11 sec, wrote 21877007480 entries to final plot
78
+ [P3-1] Table 2 took 80.6498 sec, wrote 3429431884 right entries
79
+ [P3-2] Table 2 took 74.787 sec, wrote 3429431884 left entries, 3429431884 final
80
+ [P3-1] Table 3 took 70.8236 sec, wrote 3439925499 right entries
81
+ [P3-2] Table 3 took 77.8787 sec, wrote 3439925499 left entries, 3439925499 final
82
+ [P3-1] Table 4 took 71.894 sec, wrote 3466132053 right entries
83
+ [P3-2] Table 4 took 76.3172 sec, wrote 3466132053 left entries, 3466132053 final
84
+ [P3-1] Table 5 took 72.6806 sec, wrote 3533028680 right entries
85
+ [P3-2] Table 5 took 81.5741 sec, wrote 3533028680 left entries, 3533028680 final
86
+ [P3-1] Table 6 took 77.1653 sec, wrote 3713716025 right entries
87
+ [P3-2] Table 6 took 85.9674 sec, wrote 3713716025 left entries, 3713716025 final
88
+ [P3-1] Table 7 took 75.5146 sec, wrote 4294910985 right entries
89
+ [P3-2] Table 7 took 93.9135 sec, wrote 4294910985 left entries, 4294910985 final
90
+ Phase 3 took 946.026 sec, wrote 21877145126 entries to final plot
84
91
[P4] Starting to write C1 and C3 tables
85
92
[P4] Finished writing C1 and C3 tables
86
93
[P4] Writing C2 table
87
94
[P4] Finished writing C2 table
88
- Phase 4 took 89.0748 sec, final plot size is 108834390977 bytes
89
- Total plot creation time was 3129.28 sec
95
+ Phase 4 took 79.6722 sec, final plot size is 108835267927 bytes
96
+ Total plot creation time was 2804.06 sec
90
97
```
91
98
92
99
## How to Verify
93
100
94
101
To make sure the plots are valid you can use the ` ProofOfSpace ` tool from ` chiapos ` :
95
102
96
103
```
97
- ProofOfSpace check -f plot-k32-???.plot [num_iterations]
104
+ git clone https://github.com/Chia-Network/chiapos.git
105
+ cd chiapos && mkdir build && cd build && cmake .. && make -j8
106
+ ./ProofOfSpace check -f plot-k32-???.plot [num_iterations]
98
107
```
99
108
100
109
## Future Plans
@@ -113,7 +122,11 @@ keeping most of the load off the CPUs.
113
122
114
123
## Install
115
124
125
+ Ubuntu 20.04
116
126
```
127
+ sudo apt install -y libsodium-dev libgmp3-dev cmake g++ git
128
+ git clone https://github.com/madMAx43v3r/chia-plotter.git
129
+ cd chia-plotter
117
130
git submodule update --init
118
131
./make_devel.sh
119
132
```
0 commit comments