Slow plotting on linux vs Windows

Hi,
I read the forum and I saw that most of the people here are saying that plotting overall is faster on linux. So I went the linux way (It’s my first contact with linux) and installed Ubuntu.
On windows I could get nearly consistent about 32min for plot on madmax.
I installed ubuntu and maybe once I get 28 minut for plot, the rest of the time it could get even 50-60 minutes.
My PC spec:
5950x amd
64 gb ram 3600mh
1 tb samsung for system.
Plotting on: 2tb nvme pny PCIe 3.0, 1tb nvme spcc PCIe 3.0 - both on ASUS hyper adapter PCIe 4.0 and they are ext4 formatted (other formats didnt’t work on madmax).
I tried 512 bucket with worse effect.
I use -r 32
I think the problem with the ssd’s but I can’t figure out where exactly.

That’s how it looked like on the last plot:
"
Crafting plot 1 out of 35
Process ID: 5306
Number of Threads: 32
Number of Buckets P1: 2^8 (256)
Number of Buckets P3+P4: 2^8 (256)
Pool Puzzle Hash: -
Farmer Public Key: -
Working Directory: /media/madayad/plottingone/
Working Directory 2: /media/madayad/plottingtwo/
Plot Name: plot-k32-2021-07-23-17-36-be97ab45ac11d3d7b914d5995fd0b0155f60bdab83da055a08fbedffcb257855
[P1] Table 1 took 12.1032 sec
[P1] Table 2 took 73.0276 sec, found 4294935396 matches
[P1] Table 3 took 97.2106 sec, found 4294968113 matches
[P1] Table 4 took 118.941 sec, found 4294982442 matches
[P1] Table 5 took 115.793 sec, found 4294835840 matches
[P1] Table 6 took 108.708 sec, found 4294758263 matches
[P1] Table 7 took 100.663 sec, found 4294647134 matches
Phase 1 took 626.465 sec
[P2] max_table_size = 4294982442
[P2] Table 7 scan took 46.8153 sec
[P2] Table 7 rewrite took 179.285 sec, dropped 0 entries (0 %)
[P2] Table 6 scan took 24.2326 sec
[P2] Table 6 rewrite took 40.499 sec, dropped 581234793 entries (13.5336 %)
[P2] Table 5 scan took 24.3686 sec
[P2] Table 5 rewrite took 41.0703 sec, dropped 761929815 entries (17.7406 %)
[P2] Table 4 scan took 26.1163 sec
[P2] Table 4 rewrite took 39.6599 sec, dropped 828858647 entries (19.2983 %)
[P2] Table 3 scan took 25.4852 sec
[P2] Table 3 rewrite took 38.9117 sec, dropped 855016924 entries (19.9074 %)
[P2] Table 2 scan took 27.8673 sec
[P2] Table 2 rewrite took 129.64 sec, dropped 865524703 entries (20.1522 %)
Phase 2 took 652.123 sec
Wrote plot header with 252 bytes
[P3-1] Table 2 took 213.067 sec, wrote 3429410693 right entries
[P3-2] Table 2 took 142.279 sec, wrote 3429410693 left entries, 3429410693 final
[P3-1] Table 3 took 213.951 sec, wrote 3439951189 right entries
[P3-2] Table 3 took 140.361 sec, wrote 3439951189 left entries, 3439951189 final
[P3-1] Table 4 took 209.822 sec, wrote 3466123795 right entries
[P3-2] Table 4 took 133.478 sec, wrote 3466123795 left entries, 3466123795 final
[P3-1] Table 5 took 223.677 sec, wrote 3532906025 right entries
[P3-2] Table 5 took 144.75 sec, wrote 3532906025 left entries, 3532906025 final
[P3-1] Table 6 took 233.843 sec, wrote 3713523470 right entries
[P3-2] Table 6 took 173.041 sec, wrote 3713523470 left entries, 3713523470 final
[P3-1] Table 7 took 284.703 sec, wrote 4294647134 right entries
[P3-2] Table 7 took 179.677 sec, wrote 4294647134 left entries, 4294647134 final
Phase 3 took 2297.53 sec, wrote 21876562306 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 33.4758 sec, final plot size is 108831710154 bytes
Total plot creation time was 3609.64 sec (60.1606 min)
"
Any help would be appreciated, cuz I started to look here for help after 20 days of struggling and total formatting of my discs after boot failure (luckily I recovered my files).
Ubuntu is freshly installed.
Chia GUI is opened all the time.
I have other discs with plots farming on hpool.

Sounds like trim issue on the nvme.

Windows its standard, ubunto not.
You should enable trim or mount with discard.

Or maybe easier, format the drives with f2fs file system. Install f2fs:

sudo apt install f2fs-tools

Then in disk manager you can select other options and then f2fs

3 Likes

F2FS is the way. It’s fast and doesn’t require trim(it has hybrid trim by default). I have plotted on an F2FS drive for more than 2,000 plots now without trimming, but I have never seen any performance declining yet.

3 Likes

Thanks guys for the fast reply. I’ll try what you said and I’ll give back the results.

Guys! I don’t know how to thank you! Now I have 23 minut! Thank you thank you and thank you :pray::pray::pray::pray::pray::pray:

3 Likes

Edit: after 3 plots phase 1 started to take about 40 minutes! I’m directly copying to the hard disk (at speeds about 150mb/sec). Is that causing the problem?

Copying the plot to the final destination will definitely causes some performance hit (at the end of your plotting, your final plot will reside in temp1 while being copy to your final destination). But not something like 10 mins ++. In my case, it only adds 1 min to my plotting time.

I am suspecting the heat on your SSD. But it is still too much for that. What Ubuntu version are you using? With 5950X, you should use Ubuntu 21.04 as there’s a performance boost for AMD Zen 3 with kernel 5.11 +.

1 Like

I use Ubuntu 20.04 - I’ll try to update it. I’ll try also to check the temps cuz i also suspect them. Giving back the results tomorrow :wink: thanks!

You don’t need to install ubuntu 21.04, you can install any kernel on any linux distribution, so just install kernel 5.11 then select it from your bootloader during boot.

1 Like

I believe this is only true if you disable UEFI (secure boot) in your BIOS. You can’t use unsigned kernel with secure boot enabled.

Moreover, if you’re going to use kernel 5.11, which is not supported in Ubuntu 20.04 (yet), why not just install Ubuntu 21.04 and getting all the supports without any complexities.

Basically, kernel 5.11 is still having a testing status in the current 20.04 and is expected to arrive on 20.04.3.

You can install any kernel you want, you don’t need to wait for daddy Ubuntu to give you permission. Hell, you can install 5.13.4 if you so desire. The LTS kernel will still be there to fall back on.

Yes, I know that. However, I don’t think it will worth the effort. And I just don’t think that it will be a good advice to give to someone who just tried out Ubuntu (maybe for the first time) and still having another issue at hands :sweat_smile:

1 Like

Good point @kreaninw , because @Dudu said at the beginning:

1 Like

Here’s what I tried:

  • I added the -G option to switch tmpdir, and it gave about 28-33 minutes/plot tested on about 6 plots.
  • Since this result is not satisfactory ( on Windows times were similar with ZERO optimization) I updated to Ubuntu 21.04 and pumped the fans to max and that all gave me 23 min for the first plot and 60 minutes for the next 10 plots (Without the -G option); Phase 1 takes about 40 to 50 minutes.

So the problem persists as in my previous post. I’ll try to exclude the copy proces by trying to move plots to my System nvme then independently and automatically move them to the hard disk ( I need to learn to type a script for that firstly).

Any other suggestions what might be the problem?

I have no more suggestions since you already got the first plot finished in 23 mins, which is what you should get with this spec (I have the same CPU), but for some reason, the following plots are extremely slow.

If the temp of your SSDs or the performance hit while copping the plot to the final destination is the issue, you would not get a consistent plotting time on Windows also, but that’s not the case.

However, you get a more consistent plotting time by using -G. Therefore it clearly shows that the issue lies within your SSDs.

My setup on Ubuntu is quite simple. I use Ubuntu 21.04, format the temp drive to F2FS. That’s all. I am getting a consistent plotting time even on a single SSD with -2 as ramdisk (DDR-4 2666).

I wonder if it could have something to do with the type/brand of ssd and maybe something with drivers.

I also didn’t do anything special.
Installed Ubuntu, thats it. Even with the ssd’s formatted with bog standard ex4, i had no issue.
Also I saw little to no difference with the performance under win10.
( I have 2x 1TB wd black sn750)

But other ppl have trouble with trim or other slowdowns, very odd.