Optimizing plotting on an AMD Ryzen 5950x (or any other 16c/32t CPU)

Here are my results with -u and -v = 512, -t = Corsair MP600 (non RAID), -2 = DDR4-2666 110G:

  1. Number of Threads: 30
Phase 1 took 601.129 sec
Phase 2 took 387.489 sec
Phase 3 took 319.588 sec
Phase 4 took 37.1284 sec
Total plot creation time was 1345.38 sec (22.423 min)
  1. Number of Threads: 20
Phase 1 took 585.479 sec
Phase 2 took 392.958 sec
Phase 3 took 306.668 sec
Phase 4 took 33.5924 sec
Total plot creation time was 1318.75 sec (21.9791 min)
  1. Number of Threads: 16
Phase 1 took 584.581 sec
Phase 2 took 401.289 sec
Phase 3 took 301.141 sec
Phase 4 took 32.9146 sec
Total plot creation time was 1319.98 sec (21.9996 min)

It seems the overall plotting times are almost identical between 16 and 20, while it’s the slowest when using 30 threads. This is because only in phase 2 that throwing as many threads as possible would actually help, while it would be better to limit the number of threads to the number of physical cores in the other phases.

Looks like -r option takes no effect. What is real CUP usage? :sweat_smile:

UPD:

Depending on the phase more threads will be launched, the setting is just a multiplier

Now I really interested for CPU usage.

Is 256 total system RAM really enough to use as both -t and -2 ? (would be great, I thought it would be just not enough to do that)

How would you set that up, just have one ramdisk and use it as both -t and -2 ?

edit: total Linux noob, starting this weekend with it

According to the official comment of the plotter, the peak disk usage of -t and -2 is less than 256 GiB. Therefore if you have 256 GB of RAM, which is equal to 238.42 GiB, at least you should be able to plot almost entirely on RAM. The small differences in number would go to Linux’s swapfile by default and should have no significant affect on your performance.

How would you set that up, just have one ramdisk and use it as both -t and -2 ?

It’s not about the ramdisk, as you can just mount the RAM as big as you can to a folder(directory in Linux), then point both -t and -2 to this folder.

I started learning Linux again recently when I started plotting Chia. So… I am a noob too :sweat_smile:

I think it actually helps if you have more cores. But it won’t help if you go above the physical cores number as only phase 2 would benefit from that, while the other phases get a negative affect on performance. It’s 1 up per 3 down so it’s not a good return.

Realistically, my plotting time increases by a minute starting from a second plot onward. Since my final directory is HDD which requires about 7-10 mins to complete the transfer, my plotting performance has a negative impact in this 7-10 mins period.

I am getting more plots per day (around 6 plots) just by changing the default bucket size from 256 to 512 and reducing the number of threads from 30 to 16.

2 Likes

VICTORY!! I AM NOW A LINUX USER :muscle:

Ok so installing Ubuntu wasn’t quite as painless as I hoped.
1st try: failed to install bootloader, this is a fatal error…
2nd try: no more boot after update failed to install.
3rd try: sub 1700sec plots :grinning:

I also made the mistake of choosing minimal installation, so i had to add some things manually to get “git” to work.

After that building the binaries was easy. Have to hand it to Max, instructions are super clear.

Will try full ramdisk plotting later, for now just running 110gb ramdisk and a 1TB nvme.

700 Euro system, could be doing 50+ plots/day.

Max, you rule!

1 Like

Congrats on conquering Linux.

Have you had a chance to try plotting only in RAM yet? I’m going to be trying this in the next few days (after I upgrade from 20.04 to 21.04). Have had the same question you asked earlier, about using 2 separate RAM disks vs. only 1. Would guess 1 might be a little better, but maybe not.

tnx :smiley:

yes, it works. I just tried with:
sudo mount -t tmpfs -o size=248G tmpfs /mnt/ram/
-u 256

worked just fine, only a slight speed upgrade (50 seconds) but still nice to not need a ssd at all anymore

edit: problem, copying takes to long so when running more plots in serie, there’s still a 100gb file on the ramdisk taking up space…

2 Likes

thinking of doing the same thing

This is very outdated

Would this be improved by writing it to staging SSD(s) instead of directly to HDDs?

Running Madmax in Ubuntu.

5950x, Intel P4610 3.2Tb temp 1, 128gb RAM 3200mhz temp 2, r32, u512, v512.

21.1 minutes/plot.

68 plots/day.

i want to try linux …failed twice …we should build a cheat sheet for those of us that dont know how to mount, set permissions, format as ext4 as well as the codes to run the plotter…spent a day yesterday and got mad formatted and went back to windows. cheat sheet for newbs should be nice. even tried mint…spent 3 hours just intalling the drivers to the wifi adapter later discovered it has an installer …

Installing Linux is as simple as installing Windows, especially if you use it on a PC (not a laptop). Just stick with the default setting if you are not familiar with it yet.

  1. Mounting the drive can be done by simply clicking on the drive icon. Or if you want the external drive to mount on startup, you can manage them through GNOME Disk GUI. However, please note that if you want to raid your drives, don’t do it in the BIOS settings. You can use Cockpit for that (no worry, it’s a GUI app).

  2. You don’t need to set any permission in any circumstance as long as all you’re going to do is plotting Chia. If you want to mount anything, for example, ramdisk, please don’t mount your RAM to the system folder (/mnt/ram/ as many guides seem to suggest) as this would require root permission. Therefore please bind it to one of the folders in your home directory instead. For example, you create a new folder called ram in your home directory, then mount your ramdisk there (/home/your_username/ram/). This will allow you to use the folder without any permission since you already logged in to your account.

  3. You don’t need to format anything to EXT4 as it already formatted to this by default. And for a non-system drive, for example, your temp drive, you can format it to EXT4 if you want using GNOME Disk. You don’t have to install anything to format EXT4 in GNOME Disk. And GNOME Disk itself is already preinstalled in the system by default (you can’t choose to not install it in the Ubuntu installer).

  4. The code to run the plotter should be the same between Windows and Linux. You download and install the plotter using the instruction from its repo, then go to /chia-plotter/build/ folder and right-click > open in the terminal, you can use the plotter from there.

Linux installation is very simple, even simpler than Windows 10 installation IMO :sweat_smile:

I see some people lost it in Linux due to many guides that lead people to unnecessary complexities. And as a bonus, they will jam new users with a lot of the command line codes. However, the fact is that most things can be done using the available GUI. For example, I see many guides that taught people how to install Chia using the command line even though you can install it with the (experimental) installer by just double-clicking it like you would on Windows. The only time you would install Chia using the command line method is when the installer doesn’t work (on the Pi).

I hope you can get around with Linux if you plan to plot Chia using MadMax. Plotting MadMax on Windows is like you’re trying to fight an uphill battle that would give you zero benefit. Look at this table, while many on Windows are struggling to break 50 plots or even 30 plots with their 5950X, on Linux with the right setup, it can go as far as 75 plots. It’s not the hardware differences that could do that since we’re using the same CPU. My set is quite minimal because I am plotting with a single SSD, slow RAMs (2666 MHz), a typical air cooling system, and I am sitting at 62 plots per day already. Please don’t waste your time on Windows.

2 Likes

Dude …you are amazing! Thank you soooooo much. Wow. Did not expect this … than you so much .

1 Like

worked! and the ram disk worked too. awesome

1 Like

Bro i try Ubuntu but my P2 n P3 time is way longer then windows 10 time so therefore the total plotting in Ubuntu is way long then windows 10 for my 5950x. I did a Dual booting so its not VM.

You should plot on the system that shows you the fastest result :+1:

1 Like

We are in the same boat , I also did a dual system with Ubuntu and win10,Plotting in UBUNTU is slower than plotting in WIN10, Can anyone solve this problem?