Chia-Network / bladebit

A high-performance k32-only, Chia (XCH) plotter supporting in-RAM and disk-based plotting
Apache License 2.0
337 stars 106 forks source link

Bladebit 2.0 Plotting on HDD hangs #247

Closed JimmyN0912 closed 1 year ago

JimmyN0912 commented 1 year ago

So I tried as a experiment to plot with Bladebit 2.0 on a Seagete 1TB 5400rpm external HDD, just to compare with Madmax times and for fun, but I notices that when it reaches Phase 1 Table 5, the process will hang for over 12 hours with no disk activity, only cpu usage for around 20-30%. Before when plotting on the same disk on same pc, it can generate a plot for around 2940min, but Phase 1 Table 5 should only take around 19500 sec. If any more info needed, I can comment it down below!

PC Specs:

-CPU: i5-7400T -RAM: 16GB DDR4 2400Mhz -OS: Windows 10 version 21H2 -Boot Disk: Samsung 980 1TB SSD -Plotting Disk: Seagate Backup+BL SCSI Disk Device(5400RPM, CDI shows disk health good, Windows CHKDSK shows no problem) -And three more 5400RPM HDDs for farming and storage

Log:

Bladebit Chia Plotter
Version      : 2.0.0
Git Commit   : d64791880af89edebb6f1126c953d4d98b8007db
Compiled With: msvc 19.29.30146

[Global Plotting Config]
 Will create 1 plots.
 Thread count          : 2
 Warm start enabled    : false
 NUMA disabled         : false
 CPU affinity disabled : false
 Farmer public key     : 8c86280c0da6fde69234025832c62ad06e59e34c843540254ebe9d542948575a0045acc5b9e18d38d5610f5316f08d11
 Pool contract address : xch1gszvetu8w0wwgfrx0ugm25uc3n7vsr6p5hju34qqh7ys8n9784pqtcre4w
 Output path           : F:\plots\Chia

[Bladebit Disk Plotter]
 Heap size      : 3.37 GiB ( 3447.82 MiB )
 Cache size     : 0.00 GiB ( 0.00 MiB )
 Bucket count   : 256
 Alternating I/O: false
 F1  threads    : 2
 FP  threads    : 2
 C   threads    : 2
 P2  threads    : 2
 P3  threads    : 2
 I/O threads    : 1
 Temp1 block sz : 4096
 Temp2 block sz : 4096
 Temp1 path     : G:\Temp\
 Temp2 path     : G:\Temp\
 I/O metrices enabled.
 Allocating memory
WARNING: Forcing warm start for testing.
Warm start: Pre-faulting memory pages...
Memory initialized.

Generating plot 1 / 1: dc9e7740ef44a6100d9df85984a0449f2d41e4a6ff2a17c1d817f6ef46457067

Started plot.
Running Phase 1
Table 1: F1 generation
Generating f1...
Finished f1 generation in 461.01 seconds.
Progress update: 0.01
Table 1 I/O wait time: 0.00 seconds.
 Table 1 Disk Write Metrics:
  Average write throughput 72.39 MiB ( 75.91 MB ) or 0.07 GiB ( 0.08 GB ).
  Total size written: 33278.51 MiB ( 34895.04 MB ) or 32.50 GiB ( 34.90 GB ).
  Total write commands: 513.

Table 2
 Sorting      : Completed in 86.71 seconds.
 Distribution : Completed in 702.02 seconds.
 Matching     : Completed in 230.63 seconds.
 Fx           : Completed in 312.97 seconds.
Completed table 2 in 4001.08 seconds with 4294850712 entries.
Progress update: 0.06
Table 2 I/O wait time: 2075.16 seconds.
 Table 2 I/O Metrics:
  Average read throughput 12.11 MiB ( 12.70 MB ) or 0.01 GiB ( 0.01 GB ).
  Total size read: 33278.51 MiB ( 34895.04 MB ) or 32.50 GiB ( 34.90 GB ).
  Total read commands: 131072.
  Average write throughput 79.90 MiB ( 83.78 MB ) or 0.08 GiB ( 0.08 GB ).
  Total size written: 100091.17 MiB ( 104953.20 MB ) or 97.75 GiB ( 104.95 GB ).
  Total write commands: 1281.

Table 3
 Sorting      : Completed in 152.16 seconds.
 Distribution : Completed in 1052.09 seconds.
 Matching     : Completed in 230.49 seconds.
 Fx           : Completed in 329.22 seconds.
Completed table 3 in 7502.90 seconds with 4294687493 entries.
Progress update: 0.12
Table 3 I/O wait time: 3554.82 seconds.
 Table 3 I/O Metrics:
  Average read throughput 16.24 MiB ( 17.03 MB ) or 0.02 GiB ( 0.02 GB ).
  Total size read: 66299.64 MiB ( 69520.21 MB ) or 64.75 GiB ( 69.52 GB ).
  Total read commands: 196608.
  Average write throughput 42.45 MiB ( 44.51 MB ) or 0.04 GiB ( 0.04 GB ).
  Total size written: 145140.84 MiB ( 152191.20 MB ) or 141.74 GiB ( 152.19 GB ).
  Total write commands: 66562.

Table 4
 Sorting      : Completed in 174.01 seconds.
 Distribution : Completed in 1076.71 seconds.
 Matching     : Completed in 228.81 seconds.
 Fx           : Completed in 323.49 seconds.
Completed table 4 in 8146.82 seconds with 4294282755 entries.
Progress update: 0.2
Table 4 I/O wait time: 3565.00 seconds.
 Table 4 I/O Metrics:
  Average read throughput 21.79 MiB ( 22.85 MB ) or 0.02 GiB ( 0.02 GB ).
  Total size read: 99062.75 MiB ( 103874.82 MB ) or 96.74 GiB ( 103.87 GB ).
  Total read commands: 196608.
  Average write throughput 40.32 MiB ( 42.28 MB ) or 0.04 GiB ( 0.04 GB ).
  Total size written: 145128.62 MiB ( 152178.38 MB ) or 141.73 GiB ( 152.18 GB ).
  Total write commands: 66562.

Table 5
harold-b commented 1 year ago

Which shell are you using to plot?

JimmyN0912 commented 1 year ago

I used Windows powershell inside Windows Terminal App.

JimmyN0912 commented 1 year ago

Ok I think I found the culprit now. I thought the space requirements is same as RAM plotting, 416GiB, but it's 480GiB, which exceeded the HDD's available space. Now I'm moving some files off and testing again, if it goes with no problem I'll close the issue. Sorry for wasteing your time!

JimmyN0912 commented 1 year ago

Another question, why does Bladebit require more space than Madmax? Just curious, not answering is okay for me as it may be hard to explain, thanks again!

harold-b commented 1 year ago

No worries at all. I asked about the shell because some users have had freezes in powershell due to some powershell feature.

Another question, why does Bladebit require more space than Madmax? Just curious, not answering is okay for me as it may be hard to explain, thanks again!

We're that amount of space because we're using an extra buffer per table to keep writes (and reads) sequential. However, it might be removed in a subsequent update as another strategy might work better whilst still keeping I/O sequential.

These changes should lower temp1 requirements to around 152 GiB, but increase temp2 requirements by 8GiB.

JimmyN0912 commented 1 year ago

Upon restarting with sufficient disk space, it passed Table 5 noproblem, but exited itself when reached "Sorting F7& Writing C Tables". Logs:

Bladebit Chia Plotter
Version      : 2.0.0
Git Commit   : d64791880af89edebb6f1126c953d4d98b8007db
Compiled With: msvc 19.29.30146

[Global Plotting Config]
 Will create 1 plots.
 Thread count          : 2
 Warm start enabled    : false
 NUMA disabled         : false
 CPU affinity disabled : false
 Farmer public key     : 8c86280c0da6fde69234025832c62ad06e59e34c843540254ebe9d542948575a0045acc5b9e18d38d5610f5316f08d11
 Pool contract address : xch1gszvetu8w0wwgfrx0ugm25uc3n7vsr6p5hju34qqh7ys8n9784pqtcre4w
 Output path           : F:\plots\Chia

[Bladebit Disk Plotter]
 Heap size      : 3.37 GiB ( 3447.82 MiB )
 Cache size     : 0.00 GiB ( 0.00 MiB )
 Bucket count   : 256
 Alternating I/O: false
 F1  threads    : 2
 FP  threads    : 2
 C   threads    : 2
 P2  threads    : 2
 P3  threads    : 2
 I/O threads    : 1
 Temp1 block sz : 4096
 Temp2 block sz : 4096
 Temp1 path     : G:\Temp\
 Temp2 path     : G:\Temp\
 I/O metrices enabled.
 Allocating memory
WARNING: Forcing warm start for testing.
Warm start: Pre-faulting memory pages...
Memory initialized.

Generating plot 1 / 1: dd00d83240d2702dc3f8e41b091f5fff3454180f6742dce2e69b4e4e7472dcd3

Started plot.
Running Phase 1
Table 1: F1 generation
Generating f1...
Finished f1 generation in 472.50 seconds.
Progress update: 0.01
Table 1 I/O wait time: 0.00 seconds.
 Table 1 Disk Write Metrics:
  Average write throughput 70.51 MiB ( 73.93 MB ) or 0.07 GiB ( 0.07 GB ).
  Total size written: 33278.42 MiB ( 34894.95 MB ) or 32.50 GiB ( 34.89 GB ).
  Total write commands: 513.

Table 2
 Sorting      : Completed in 99.84 seconds.
 Distribution : Completed in 731.02 seconds.
 Matching     : Completed in 270.56 seconds.
 Fx           : Completed in 347.59 seconds.
Completed table 2 in 3912.56 seconds with 4294874812 entries.
Progress update: 0.06
Table 2 I/O wait time: 2007.44 seconds.
 Table 2 I/O Metrics:
  Average read throughput 12.82 MiB ( 13.44 MB ) or 0.01 GiB ( 0.01 GB ).
  Total size read: 33278.42 MiB ( 34894.95 MB ) or 32.50 GiB ( 34.89 GB ).
  Total read commands: 131072.
  Average write throughput 76.06 MiB ( 79.75 MB ) or 0.07 GiB ( 0.08 GB ).
  Total size written: 100091.72 MiB ( 104953.77 MB ) or 97.75 GiB ( 104.95 GB ).
  Total write commands: 1281.

Table 3
 Sorting      : Completed in 161.51 seconds.
 Distribution : Completed in 942.86 seconds.
 Matching     : Completed in 255.55 seconds.
 Fx           : Completed in 347.81 seconds.
Completed table 3 in 6960.04 seconds with 4294732762 entries.
Progress update: 0.12
Table 3 I/O wait time: 3239.83 seconds.
 Table 3 I/O Metrics:
  Average read throughput 17.57 MiB ( 18.42 MB ) or 0.02 GiB ( 0.02 GB ).
  Total size read: 66300.09 MiB ( 69520.68 MB ) or 64.75 GiB ( 69.52 GB ).
  Total read commands: 196608.
  Average write throughput 45.56 MiB ( 47.78 MB ) or 0.04 GiB ( 0.05 GB ).
  Total size written: 145142.31 MiB ( 152192.74 MB ) or 141.74 GiB ( 152.19 GB ).
  Total write commands: 66562.

Table 4
 Sorting      : Completed in 184.10 seconds.
 Distribution : Completed in 1055.62 seconds.
 Matching     : Completed in 238.49 seconds.
 Fx           : Completed in 336.75 seconds.
Completed table 4 in 7264.66 seconds with 4294502734 entries.
Progress update: 0.2
Table 4 I/O wait time: 3301.97 seconds.
 Table 4 I/O Metrics:
  Average read throughput 23.71 MiB ( 24.86 MB ) or 0.02 GiB ( 0.02 GB ).
  Total size read: 99063.88 MiB ( 103876.00 MB ) or 96.74 GiB ( 103.88 GB ).
  Total read commands: 196608.
  Average write throughput 47.04 MiB ( 49.33 MB ) or 0.05 GiB ( 0.05 GB ).
  Total size written: 145135.00 MiB ( 152185.08 MB ) or 141.73 GiB ( 152.19 GB ).
  Total write commands: 66562.

Table 5
 Sorting      : Completed in 183.74 seconds.
 Distribution : Completed in 879.12 seconds.
 Matching     : Completed in 234.15 seconds.
 Fx           : Completed in 331.84 seconds.
Completed table 5 in 7027.67 seconds with 4294081779 entries.
Progress update: 0.28
Table 5 I/O wait time: 3201.85 seconds.
 Table 5 I/O Metrics:
  Average read throughput 22.92 MiB ( 24.03 MB ) or 0.02 GiB ( 0.02 GB ).
  Total size read: 99058.45 MiB ( 103870.31 MB ) or 96.74 GiB ( 103.87 GB ).
  Total read commands: 196608.
  Average write throughput 53.64 MiB ( 56.25 MB ) or 0.05 GiB ( 0.06 GB ).
  Total size written: 145122.20 MiB ( 152171.66 MB ) or 141.72 GiB ( 152.17 GB ).
  Total write commands: 66562.

Table 6
 Sorting      : Completed in 181.04 seconds.
 Distribution : Completed in 450.21 seconds.
 Matching     : Completed in 236.46 seconds.
 Fx           : Completed in 333.46 seconds.
Completed table 6 in 6133.99 seconds with 4293070437 entries.
Progress update: 0.36
Table 6 I/O wait time: 2715.64 seconds.
 Table 6 I/O Metrics:
  Average read throughput 23.74 MiB ( 24.89 MB ) or 0.02 GiB ( 0.02 GB ).
  Total size read: 99048.89 MiB ( 103860.29 MB ) or 96.73 GiB ( 103.86 GB ).
  Total read commands: 196608.
  Average write throughput 57.27 MiB ( 60.06 MB ) or 0.06 GiB ( 0.06 GB ).
  Total size written: 112339.06 MiB ( 117796.04 MB ) or 109.71 GiB ( 117.80 GB ).
  Total write commands: 66562.

Table 7
 Sorting      : Completed in 156.48 seconds.
 Distribution : Completed in 63.22 seconds.
 Matching     : Completed in 241.42 seconds.
 Fx           : Completed in 321.41 seconds.
Completed table 7 in 5836.51 seconds with 4291098697 entries.
Progress update: 0.42
Table 7 I/O wait time: 2416.27 seconds.
 Table 7 I/O Metrics:
  Average read throughput 17.45 MiB ( 18.29 MB ) or 0.02 GiB ( 0.02 GB ).
  Total size read: 66272.66 MiB ( 69491.92 MB ) or 64.72 GiB ( 69.49 GB ).
  Total read commands: 196608.
  Average write throughput 39.28 MiB ( 41.19 MB ) or 0.04 GiB ( 0.04 GB ).
  Total size written: 79300.68 MiB ( 83152.79 MB ) or 77.44 GiB ( 83.15 GB ).
  Total write commands: 66306.

Sorting F7 & Writing C Tables
PS C:\Chia\resources\app.asar.unpacked\daemon>

What happened?