Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plotting to tmpfs fails on write #151

Open
rjasonadams opened this issue Nov 20, 2021 · 7 comments
Open

Plotting to tmpfs fails on write #151

rjasonadams opened this issue Nov 20, 2021 · 7 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@rjasonadams
Copy link

Hello,

I'd like to remove the need for nvme by using more ram.

Mounted a large tmpfs:

tmpfs   /mnt/tmpfs         tmpfs   rw,size=500G          0  0

Set <out_dir> to it and it's failing on the initial write:

Error: Failed to open plot output file at /mnt/tmpfs/plot....plot.tmp for writing after 16 tries.
Error: Plot ... failed... Trying next plot.

It does make a zero length file in the directory though. Any ideas on the cause?

@harold-b
Copy link
Contributor

This is due to the final plot file being written unbuffered (with direct I/O enabled), which tmpfs does not support. An upcoming version will allow you to disable this by setting a command line option.

@harold-b harold-b self-assigned this Nov 20, 2021
@harold-b harold-b added enhancement New feature or request good first issue Good for newcomers labels Nov 20, 2021
@Paradzzz
Copy link

Paradzzz commented Apr 8, 2022

I am also waiting for a solution to this issue.
But for now I'm using this:

insmod /lib/modules/5.4.0-107-generic/kernel/drivers/block/brd.ko rd_nr=1 rd_size=115343360
fdisk /dev/ram0
mkfs.xfs /dev/ram0p1
mount /dev/ram0p1 /mnt/RAM

and use this folder as the final folder for the plots.
p.s. Do not forget about the correct rights to the folder.

@Yamanipanuchi
Copy link

I got a similar error but I just have 4 SSD's in a raid.

@zivester
Copy link

zivester commented Dec 8, 2023

This is due to the final plot file being written unbuffered (with direct I/O enabled), which tmpfs does not support. An upcoming version will allow you to disable this by setting a command line option.

Was this feature ever added? Trying to plot directly to 256GB ramdisk on 2.1.1 with chia plotters bladebit ramplot -d /mnt/ramdisk/ but also getting an empty .tmp file.

Plot temporary file: /mnt/ramdisk/plot-k32-c07-2023-12-08-11-35-77bab4a511f14596f28cef564cafee7c8658f37e2545899ef0d0332b662c9b0e.plot.tmp

STDERR: 

STDERR: Fatal Error:  

STDERR: Failed to open plot file with error: 22

@harold-b
Copy link
Contributor

harold-b commented Dec 9, 2023

Yes you can use the --no-direct-io global option (specify it before the cudaplot command).

@zivester
Copy link

Yes you can use the --no-direct-io global option (specify it before the cudaplot command).

Hmm I've tried basically all positional args and it doesn't seem recognized. Is it not available with ramplot? 🤔

$ chia plotters bladebit --no-direct-io ramplot -d /mnt/ramdisk/ -f
chia plotters: error: unrecognized arguments: --no-direct-io

@harold-b
Copy link
Contributor

It's available only directly from the bladebit executable itself, not from chia plotters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants