Navigation Menu

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

Feature: Docker Image #102

Merged
merged 6 commits into from Jun 10, 2021
Merged

Feature: Docker Image #102

merged 6 commits into from Jun 10, 2021

Conversation

delucca
Copy link
Collaborator

@delucca delucca commented Jun 10, 2021

This PR adds a Docker Image to improve portability. We can use that image for both Windows and Linux machines.

How it works

You can test a preview generated image with the following command on your machine:

docker run \
  -v <path-to-your-tmp-dir>:/mnt/harvester \
  -v <path-to-your-final-dir>:/mnt/farm \
  odelucca/chia-plotter \
    -t /mnt/harvester/ \
    -d /mnt/farm/ \
    -p <pool-key> \
    -f <farm-key>

Of course, you can provide whatever arguments you want after the image name.

Also, you can make an alias, like:

alias chia-plotter="docker run \
  -v <path-to-your-tmp-dir>:/mnt/harvester \
  -v <path-to-your-final-dir>:/mnt/farm \
  odelucca/chia-plotter"

And call it with:

chia-plotter <args>

I've run a few tests, and it seems that it has a small performance cost. I was not able to define the exact percentage of the performance decrease yet, but still I think that is a pretty good alternative for running the plotter in Windows machines.

Future improvements

I see two important future improvements, they are:

  1. We need to host this image in a proper Docker repository
  2. We could create a simple script (maybe inside the plotter itself?) where it could identify the remaining farm disk storage and automatically work to fill it up. By doing so, we could simply launch new containers for each harvester memory / rig

@delucca
Copy link
Collaborator Author

delucca commented Jun 10, 2021

I did a few tests here, it seems that running in Docker is 5% slower.

I think that is a pretty good trade-off for anyone that cannot compile for whatever reason (Windows machines, for example)

@madMAx43v3r
Copy link
Owner

5% slower is quite good

@madMAx43v3r
Copy link
Owner

compared to WSL

@madMAx43v3r
Copy link
Owner

can you add instructions to the readme?

@delucca
Copy link
Collaborator Author

delucca commented Jun 10, 2021

Sure! I'll do it later today and then comment back here in the PR 🙂

Regarding performance, the 5% impact is on a Linux machine. I don't have a proper Windows to test it, it would be nice to do the same test in Windows too!

@delucca
Copy link
Collaborator Author

delucca commented Jun 10, 2021

@madMAx43v3r do you have a Dockerhub account to host the stable image?

I don't know if you know how to use Docker, but you can build that image and them host it on your Docker account with the following commands:

docker login # It will login to your Docker account
docker build -t <your-username>/chia-plotter .
docker push <your-username>/chia-plotter

The must be exactly the same as the username you used in docker login command, since Docker will use it as an anchor

Or should I left the image generated under my own account in the README?

@madMAx43v3r
Copy link
Owner

Yeah let's use your account & image

@NikXO6
Copy link

NikXO6 commented Jun 10, 2021

docker does not seem to use both cpus

@delucca
Copy link
Collaborator Author

delucca commented Jun 10, 2021

docker does not seem to use both cpus

Did you added the -r flag to your command? Like this:

docker run \
  -v <path-to-your-tmp-dir>:/mnt/harvester \
  -v <path-to-your-final-dir>:/mnt/farm \
  odelucca/chia-plotter \
    -t /mnt/harvester/ \
    -d /mnt/farm/ \
    -p <pool-key> \
    -f <farm-key> \
    -r <number-of-cores>

@delucca
Copy link
Collaborator Author

delucca commented Jun 10, 2021

If you added the -r flag, you should check if Docker has a default CPU/memory constraint in Windows. Some users say it has. You probably can configure those constraints either in your Docker config, or in the run command directly. I know that:

docker run \
  -v <path-to-your-tmp-dir>:/mnt/harvester \
  -v <path-to-your-final-dir>:/mnt/farm \
  -m 8000 \
  odelucca/chia-plotter \
    -t /mnt/harvester/ \
    -d /mnt/farm/ \
    -p <pool-key> \
    -f <farm-key>

Would limit your container to 5gb RAM (with the -m flag)

@delucca
Copy link
Collaborator Author

delucca commented Jun 10, 2021

@madMAx43v3r I've added the README section. Could you merge please? :)

@SebMoore
Copy link
Contributor

@delucca ok - super nitpicky haha - but there is an r missing at the end of Docker on line 179 of the Readme

@NikXO6
Copy link

NikXO6 commented Jun 10, 2021

docker does not seem to use both cpus

Did you added the -r flag to your command? Like this:

docker run \
  -v <path-to-your-tmp-dir>:/mnt/harvester \
  -v <path-to-your-final-dir>:/mnt/farm \
  odelucca/chia-plotter \
    -t /mnt/harvester/ \
    -d /mnt/farm/ \
    -p <pool-key> \
    -f <farm-key> \
    -r <number-of-cores>

I have done this and also manually added a global wslconfig to provide 32 vcpu and 64gb ram. Still processing under 1 cpu.

@bigmac5753
Copy link

any plans to add this to unraid's CA?

@kythorn
Copy link

kythorn commented Jun 10, 2021

Is this image up on dockerhub yet anywhere? I'm trying to build it locally to test it (on a windows host) from the HEAD of your branch, but keep running into the following error:

0.968 CMake Error at CMakeLists.txt:5 (add_subdirectory):
0.968 The source directory
0.968
0.968 /root/lib/bls-signatures
0.968
0.968 does not contain a CMakeLists.txt file.
0.968
0.968
0.970 -- Looking for pthread.h
1.039 -- Looking for pthread.h - found
1.040 -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
1.108 -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
1.110 -- Found Threads: TRUE
1.112 -- Configuring incomplete, errors occurred!
1.112 See also "/root/build/CMakeFiles/CMakeOutput.log".
1.118 make: *** No targets specified and no makefile found. Stop.
executor failed running [/bin/sh -c /bin/sh ./make_devel.sh]: exit code: 2

@SebMoore SebMoore mentioned this pull request Jun 10, 2021
@delucca
Copy link
Collaborator Author

delucca commented Jun 10, 2021

Is this image up on dockerhub yet anywhere? I'm trying to build it locally to test it (on a windows host) from the HEAD of your branch, but keep running into the following error:

0.968 CMake Error at CMakeLists.txt:5 (add_subdirectory):
0.968 The source directory
0.968
0.968 /root/lib/bls-signatures
0.968
0.968 does not contain a CMakeLists.txt file.
0.968
0.968
0.970 -- Looking for pthread.h
1.039 -- Looking for pthread.h - found
1.040 -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
1.108 -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
1.110 -- Found Threads: TRUE
1.112 -- Configuring incomplete, errors occurred!
1.112 See also "/root/build/CMakeFiles/CMakeOutput.log".
1.118 make: *** No targets specified and no makefile found. Stop.
executor failed running [/bin/sh -c /bin/sh ./make_devel.sh]: exit code: 2

Yes, it is: odelucca/chia-plotter

@kythorn
Copy link

kythorn commented Jun 10, 2021

Yes, it is: odelucca/chia-plotter

Awesome. I'll give up fighting cmake being cranky, and just switch to testing what you've published. Thanks!

@NikXO6
Copy link

NikXO6 commented Jun 10, 2021

Did some digging docker wont make full use of dual cpu setups, as wsl2 only passes 1 socket over. Also the wslconfig cant overide it. So a dedicated windows version is the way to go.

@delucca
Copy link
Collaborator Author

delucca commented Jun 11, 2021

Well apparanetly hyper-v had more IO bottleneck compare to wsl2, in my testing. I did manage to get all cores from both CPU's firing with hyper-v but read writes would not go beyond 250MBps, native plotting goes beyond 1GBps. WSL1 does remove the CPU and IO bottleneck, just gotta figure out a way to run docker on it.
https://gist.github.com/bkonetzny/b769afcab375dedae743ac648622a4f1
Going to try this and report.

Where you able to test it? I would like to know if WSL1 is close to Linux-like Docker performance

@delucca
Copy link
Collaborator Author

delucca commented Jun 11, 2021

same I/O bottleneck here, tried both Hyper-V and wsl2

You could give it a try to this guide: https://gist.github.com/bkonetzny/b769afcab375dedae743ac648622a4f1

It seems that WSL1 removes that I/O bottleneck

@NikXO6
Copy link

NikXO6 commented Jun 11, 2021

I have some plots running which finish in 3hrs, will test after that coz gotta reboot system to install.

@liuxx007
Copy link

PS C:\Users\Administrator> docker run -v N::/mnt/harvester -v E::/mnt/farm -m 14000m --cpus 12 odelucca/chia-plotter -t /mnt/harvester/ -d /mnt/farm/ -p xxxxxxxxx -f xxxxxxxxxxxx -r 12 -u 6 -n 1
Final Directory: /mnt/farm/
Number of Plots: 1
Process ID: 1
Number of Threads: 12
Number of Buckets: 2^6 (64)
Pool Public Key: xxxxxxxxxxxxxx
Farmer Public Key: xxxxxxxxxxxxxxxx
Working Directory: /mnt/harvester/
Working Directory 2: /mnt/harvester/
Plot Name: plot-k32-2021-06-11-06-45-6706704666a8255b383df9a24bab3ac7fb651082087adc908eda4547c04ae9c1
[P1] Table 1 took 118.95 sec
[P1] Table 2 took 700.042 sec, found 4294991679 matches
[P1] Table 3 took 991.34 sec, found 4295042099 matches
[P1] Table 4 took 1293.63 sec, found 4295010510 matches
[P1] Table 5 took 1270.05 sec, found 4295042349 matches
[P1] Table 6 took 1144.94 sec, found 4294931712 matches
[P1] Table 7 took 843.155 sec, found 4294840112 matches
Phase 1 took 6362.49 sec
[P2] max_table_size = 4295042349
[P2] Table 7 scan took 138.396 sec
[P2] Table 7 rewrite took 322.242 sec, dropped 0 entries (0 %)
[P2] Table 6 scan took 134.545 sec
[P2] Table 6 rewrite took 322.801 sec, dropped 581267003 entries (13.5338 %)
[P2] Table 5 scan took 127.782 sec
[P2] Table 5 rewrite took 317.683 sec, dropped 762018356 entries (17.7418 %)
[P2] Table 4 scan took 126.356 sec
[P2] Table 4 rewrite took 302.504 sec, dropped 828866578 entries (19.2984 %)
[P2] Table 3 scan took 125.799 sec
[P2] Table 3 rewrite took 314.777 sec, dropped 855126398 entries (19.9096 %)
[P2] Table 2 scan took 134.437 sec
[P2] Table 2 rewrite took 304.276 sec, dropped 865600277 entries (20.1537 %)
Phase 2 took 2675.3 sec
Wrote plot header with 268 bytes
[P3-1] Table 2 took 360.914 sec, wrote 3429391402 right entries
[P3-2] Table 2 took 421.837 sec, wrote 3429391402 left entries, 3429391402 final
[P3-1] Table 3 took 431.387 sec, wrote 3439915701 right entries
[P3-2] Table 3 took 432.982 sec, wrote 3439915701 left entries, 3439915701 final
[P3-1] Table 4 took 446.891 sec, wrote 3466143932 right entries
[P3-2] Table 4 took 449.219 sec, wrote 3466143932 left entries, 3466143932 final
[P3-1] Table 5 took 442.374 sec, wrote 3533023993 right entries
[P3-2] Table 5 took 443.63 sec, wrote 3533023993 left entries, 3533023993 final
[P3-1] Table 6 took 464.418 sec, wrote 3713664709 right entries
[P3-2] Table 6 took 468.633 sec, wrote 3713664709 left entries, 3713664709 final
[P3-1] Table 7 took 399.972 sec, wrote 4294840112 right entries
[P3-2] Table 7 took 542.221 sec, wrote 4294840112 left entries, 4294840112 final
Phase 3 took 5305.79 sec, wrote 21876979849 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 800.199 sec, final plot size is 108834266154 bytes
Total plot creation time was 15143.9 sec
Started copy to /mnt/farm/plot-k32-2021-06-11-06-45-6706704666a8255b383df9a24bab3ac7fb651082087adc908eda4547c04ae9c1.plot
Copy to /mnt/farm/plot-k32-2021-06-11-06-45-6706704666a8255b383df9a24bab3ac7fb651082087adc908eda4547c04ae9c1.plot finished, took 1497.61 sec, 69.3053 MB/s avg.

**Number of Buckets: 2^6 (64) -u 6 **
Using Buckets 64, 15143 sec

@delucca
Copy link
Collaborator Author

delucca commented Jun 11, 2021

I have some plots running which finish in 3hrs, will test after that coz gotta reboot system to install.

Cool :)

Let me know after switching to WSL1!

@8465231
Copy link

8465231 commented Jun 11, 2021

Ok, finally got the docker spun up on a fresh ubuntu 20.04 install. It is working good except that like I saw mentioned earlier, it is only using 1 CPU (50% usage on a dual CPU system).

Did anyone figure out how to get the docker to max all cores?

Since this is a blank ubntu install I went ahead and installed the regular program and can confirm that it maxes all cores.

On my main unraid server though it would need to run as a docker.

@liuxx007
Copy link

I have some plots running which finish in 3hrs, will test after that coz gotta reboot system to install.

Cool :)

Let me know after switching to WSL1!

Cancel this option?
QQ图片20210611221153

@liuxx007
Copy link

I have some plots running which finish in 3hrs, will test after that coz gotta reboot system to install.

Cool :)
Let me know after switching to WSL1!

Cancel this option?
QQ图片20210611221153

Resources
WSL Integration
Configure which WSL 2 distros you want to access Docker from.

Enable integration with my default WSL distro

You don't have any WSL 2 distro. Please convert a WSL 1 distro to WSL 2, or install a new distro and it will appear here.

More info

@hung-nguyen89
Copy link

hung-nguyen89 commented Jun 11, 2021

same I/O bottleneck here, tried both Hyper-V and wsl2

You could give it a try to this guide: https://gist.github.com/bkonetzny/b769afcab375dedae743ac648622a4f1

It seems that WSL1 removes that I/O bottleneck

Switched to WSL1, it seems working as expected.
It may not I/O bottleneck, but because of WSL2 cannot use all core of dual CPU.
microsoft/WSL#5423

@NikXO6
Copy link

NikXO6 commented Jun 11, 2021

I have some plots running which finish in 3hrs, will test after that coz gotta reboot system to install.

Cool :)
Let me know after switching to WSL1!

Cancel this option?
QQ图片20210611221153

Resources
WSL Integration
Configure which WSL 2 distros you want to access Docker from.

Enable integration with my default WSL distro

You don't have any WSL 2 distro. Please convert a WSL 1 distro to WSL 2, or install a new distro and it will appear here.

More info

This will switch over to hyper V which also has IO bottleneck. The only possible way to mitigated the IO performance loss is using WSL1, which is not supported by docker desktop out of the box. https://gist.github.com/bkonetzny/b769afcab375dedae743ac648622a4f1
I have not tried this yet but @hung-nguyen89 seems to have got it running with WSL1.

@liuxx007
Copy link

I have some plots running which finish in 3hrs, will test after that coz gotta reboot system to install.

Cool :)
Let me know after switching to WSL1!

Cancel this option?
QQ图片20210611221153

Resources
WSL Integration
Configure which WSL 2 distros you want to access Docker from.
Enable integration with my default WSL distro
You don't have any WSL 2 distro. Please convert a WSL 1 distro to WSL 2, or install a new distro and it will appear here.
More info

This will switch over to hyper V which also has IO bottleneck. The only possible way to mitigated the IO performance loss is using WSL1, which is not supported by docker desktop out of the box. https://gist.github.com/bkonetzny/b769afcab375dedae743ac648622a4f1
I have not tried this yet but @hung-nguyen89 seems to have got it running with WSL1.

QQ图片20210611224400

@hung-nguyen89
Copy link

hung-nguyen89 commented Jun 11, 2021

@NikXO6 I install Ubuntu 20.4 distro on WSL1 then run mad max plotter directly on it.
Working perfect now :)

Plot Name: 
[P1] Table 1 took 14.7518 sec
[P1] Table 2 took 88.7123 sec, found 4294987001 matches
[P1] Table 3 took 125.792 sec, found 4295084188 matches
[P1] Table 4 took 216.718 sec, found 4294943251 matches
[P1] Table 5 took 211.724 sec, found 4294921961 matches
[P1] Table 6 took 207.083 sec, found 4294893502 matches
[P1] Table 7 took 102.732 sec, found 4294815221 matches
Phase 1 took 967.575 sec
[P2] max_table_size = 4295084188
[P2] Table 7 scan took 8.50683 sec
[P2] Table 7 rewrite took 26.8848 sec, dropped 0 entries (0 %)
[P2] Table 6 scan took 26.0684 sec
[P2] Table 6 rewrite took 40.2666 sec, dropped 581272528 entries (13.534 %)
[P2] Table 5 scan took 25.3941 sec
[P2] Table 5 rewrite took 38.0896 sec, dropped 761984173 entries (17.7415 %)
[P2] Table 4 scan took 24.854 sec
[P2] Table 4 rewrite took 37.6031 sec, dropped 828835135 entries (19.2979 %)
[P2] Table 3 scan took 24.9191 sec
[P2] Table 3 rewrite took 37.1162 sec, dropped 855144184 entries (19.9098 %)
[P2] Table 2 scan took 24.6641 sec
[P2] Table 2 rewrite took 37.0819 sec, dropped 865559197 entries (20.1528 %)
Phase 2 took 362.885 sec
Wrote plot header with 268 bytes
[P3-1] Table 2 took 30.2021 sec, wrote 3429427804 right entries
[P3-2] Table 2 took 29.7135 sec, wrote 3429427804 left entries, 3429427804 final
[P3-1] Table 3 took 35.4288 sec, wrote 3439940004 right entries
[P3-2] Table 3 took 31.994 sec, wrote 3439940004 left entries, 3439940004 final
[P3-1] Table 4 took 35.5545 sec, wrote 3466108116 right entries
[P3-2] Table 4 took 33.9001 sec, wrote 3466108116 left entries, 3466108116 final
[P3-1] Table 5 took 37.6864 sec, wrote 3532937788 right entries
[P3-2] Table 5 took 34.6629 sec, wrote 3532937788 left entries, 3532937788 final
[P3-1] Table 6 took 39.1825 sec, wrote 3713620974 right entries
[P3-2] Table 6 took 34.6069 sec, wrote 3713620974 left entries, 3713620974 final
[P3-1] Table 7 took 37.2563 sec, wrote 4294815221 right entries
[P3-2] Table 7 took 40.9547 sec, wrote 4294815221 left entries, 4294815221 final
Phase 3 took 423.824 sec, wrote 21876849907 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 85.0785 sec, final plot size is 108833640957 bytes
Total plot creation time was 1839.44 sec

@liuxx007
Copy link

@NikXO6 I install Ubuntu 20.4 distro then run mad max plotter directly on it.
Working perfect now :)

Plot Name: 
[P1] Table 1 took 14.7518 sec
[P1] Table 2 took 88.7123 sec, found 4294987001 matches
[P1] Table 3 took 125.792 sec, found 4295084188 matches
[P1] Table 4 took 216.718 sec, found 4294943251 matches
[P1] Table 5 took 211.724 sec, found 4294921961 matches
[P1] Table 6 took 207.083 sec, found 4294893502 matches
[P1] Table 7 took 102.732 sec, found 4294815221 matches
Phase 1 took 967.575 sec
[P2] max_table_size = 4295084188
[P2] Table 7 scan took 8.50683 sec
[P2] Table 7 rewrite took 26.8848 sec, dropped 0 entries (0 %)
[P2] Table 6 scan took 26.0684 sec
[P2] Table 6 rewrite took 40.2666 sec, dropped 581272528 entries (13.534 %)
[P2] Table 5 scan took 25.3941 sec
[P2] Table 5 rewrite took 38.0896 sec, dropped 761984173 entries (17.7415 %)
[P2] Table 4 scan took 24.854 sec
[P2] Table 4 rewrite took 37.6031 sec, dropped 828835135 entries (19.2979 %)
[P2] Table 3 scan took 24.9191 sec
[P2] Table 3 rewrite took 37.1162 sec, dropped 855144184 entries (19.9098 %)
[P2] Table 2 scan took 24.6641 sec
[P2] Table 2 rewrite took 37.0819 sec, dropped 865559197 entries (20.1528 %)
Phase 2 took 362.885 sec
Wrote plot header with 268 bytes
[P3-1] Table 2 took 30.2021 sec, wrote 3429427804 right entries
[P3-2] Table 2 took 29.7135 sec, wrote 3429427804 left entries, 3429427804 final
[P3-1] Table 3 took 35.4288 sec, wrote 3439940004 right entries
[P3-2] Table 3 took 31.994 sec, wrote 3439940004 left entries, 3439940004 final
[P3-1] Table 4 took 35.5545 sec, wrote 3466108116 right entries
[P3-2] Table 4 took 33.9001 sec, wrote 3466108116 left entries, 3466108116 final
[P3-1] Table 5 took 37.6864 sec, wrote 3532937788 right entries
[P3-2] Table 5 took 34.6629 sec, wrote 3532937788 left entries, 3532937788 final
[P3-1] Table 6 took 39.1825 sec, wrote 3713620974 right entries
[P3-2] Table 6 took 34.6069 sec, wrote 3713620974 left entries, 3713620974 final
[P3-1] Table 7 took 37.2563 sec, wrote 4294815221 right entries
[P3-2] Table 7 took 40.9547 sec, wrote 4294815221 left entries, 4294815221 final
Phase 3 took 423.824 sec, wrote 21876849907 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 85.0785 sec, final plot size is 108833640957 bytes
Total plot creation time was 1839.44 sec

nice

@delucca
Copy link
Collaborator Author

delucca commented Jun 11, 2021

same I/O bottleneck here, tried both Hyper-V and wsl2

You could give it a try to this guide: https://gist.github.com/bkonetzny/b769afcab375dedae743ac648622a4f1
It seems that WSL1 removes that I/O bottleneck

Switched to WSL1, it seems working as expected.
It may not I/O bottleneck, but because of WSL2 cannot use all core of dual CPU.
microsoft/WSL#5423

You were able to switch Docker to use WSL1 with the guide you shared? If so, could you please add a section in the README explaining how to use WSL1 backend in Docker? (if you followed a guide, simply points to that guide)

That would save me hours of responding to people explaining this hahaha

@hung-nguyen89
Copy link

hung-nguyen89 commented Jun 11, 2021

same I/O bottleneck here, tried both Hyper-V and wsl2

You could give it a try to this guide: https://gist.github.com/bkonetzny/b769afcab375dedae743ac648622a4f1
It seems that WSL1 removes that I/O bottleneck

Switched to WSL1, it seems working as expected.
It may not I/O bottleneck, but because of WSL2 cannot use all core of dual CPU.
microsoft/WSL#5423

You were able to switch Docker to use WSL1 with the guide you shared? If so, could you please add a section in the README explaining how to use WSL1 backend in Docker? (if you followed a guide, simply points to that guide)

That would save me hours of responding to people explaining this hahaha

I switch to WSL1, then install Ubuntu 20.4 distro on it.
Then follow the guide for Ubuntu https://github.com/madMAx43v3r/chia-plotter#ubuntu-2004
That's it, just Windows, WSL1 and Ubuntu, no Docker.

@delucca
Copy link
Collaborator Author

delucca commented Jun 11, 2021

same I/O bottleneck here, tried both Hyper-V and wsl2

You could give it a try to this guide: https://gist.github.com/bkonetzny/b769afcab375dedae743ac648622a4f1
It seems that WSL1 removes that I/O bottleneck

Switched to WSL1, it seems working as expected.
It may not I/O bottleneck, but because of WSL2 cannot use all core of dual CPU.
microsoft/WSL#5423

You were able to switch Docker to use WSL1 with the guide you shared? If so, could you please add a section in the README explaining how to use WSL1 backend in Docker? (if you followed a guide, simply points to that guide)
That would save me hours of responding to people explaining this hahaha

I switch to WSL1, then install Ubuntu 20.4 distro on it.
Then follow the guide for Ubuntu https://github.com/madMAx43v3r/chia-plotter#ubuntu-2004
That's it, just Windows, WSL1 and Ubuntu, no Docker.

My quote wasn't directly to you, it was asking to @NikXO6

I know that you've used WSL directly without Docker @hung-nguyen89, but I'm interested in Docker in Windows since some users prefer using it.

With Docker, it is way easier to manage large plotting clusters. It is easy to trigger a single plot process in your own machine. For those cases, Docker is overkill. But for users that are managing many nodes (like me), Docker is way easier.

In my specific case, the nodes that I manage are Linux machines, so I'm not suffering from it. But some users are asking for help to me, but they manage clusters with Windows machines.

@hung-nguyen89
Copy link

@delucca
Don't get me wrong. I don't blame Docker.
Docker is great, I use it at daily work.
I stop using Docker for this plotter, because my purpose is run the plotter on windows.

@delucca
Copy link
Collaborator Author

delucca commented Jun 12, 2021

@delucca
Don't get me wrong. I don't blame Docker.
Docker is great, I use it at daily work.
I stop using Docker for this plotter, because my purpose is run the plotter on windows.

No problem man :D

I was just explaining that f my question was for the other user, just to see if he was able to run with WSL1

@spronty1
Copy link

@delucca
I'm trying to run this in unraid terminal. It keeps filling up my docker image and crashing. The program isnt using my 2 temp dir. What am i doing wrong?

docker run
-v /mnt/cache/ChiaPlotting2/Mad2/
-v /mnt/plottingchia/ChiaPlotting/Mad/
-v /mnt/user/201-300/
odelucca/chia-plotter
-t /mnt/cache/ChiaPlotting2/Mad2/
-2 /mnt/plottingchia/ChiaPlotting/Mad/
-d /mnt/user/201-300/
-p af102c5ea342449d8af28ff72850606510c85f35659682a7b6051d8e7fffdc966a7d50ff38c9b849331edf613445acb1
-f a06d85db839a173a6e79fac92a095bb35d72cbeb54903ff8cb247fe539b845d0bfb1c0f99a52405fc1f2f0e600f039e6
-r 14
-n -1
-u 128 \

@kythorn
Copy link

kythorn commented Jun 12, 2021 via email

@feder-cr
Copy link

guys, in the end what is the best solution for plotting on windows?

@hung-nguyen89
@delucca

@delucca
Copy link
Collaborator Author

delucca commented Jun 12, 2021

guys, in the end what is the best solution for plotting on windows?

@hung-nguyen89
@delucca

Fastest: using @stotiks compiled version
More portable: Docker

It depends on your needs

@kythorn
Copy link

kythorn commented Jun 12, 2021 via email

@feder-cr
Copy link

on my servers the stotiks version is incredibly slow, probably not fully compatible with windows server, now i'm using wsl2 but only uses one cpu on 2!

@feder-cr
Copy link

@stotiks

@hung-nguyen89
Copy link

hung-nguyen89 commented Jun 13, 2021

@delucca @feder-cr
Solved wsl2 I/O bottleneck.
The problem is wsl2 doesn't not support NTFS well. we need ext4 to maximize I/O.

Steps:

  1. Join windows insider program/dev channel and install latest build.
  2. Format drive to ext4 (I use DiskGenius).
  3. Attach drive to wsl: wsl --mount <DiskPath> --bare. Refer https://docs.microsoft.com/en-us/windows/wsl/wsl2-mount-disk
  4. Open wsl distro and mount drive: mkdir -p /mnt/wsl/<Device><Partition> && mount /dev/<Disk> /mnt/wsl/<Device><Partition>

Note: wsl mount disk only available on windows preview build

@delucca
Copy link
Collaborator Author

delucca commented Jun 13, 2021

@delucca @feder-cr
Solved wsl2 I/O bottleneck.
The problem is wsl2 doesn't not support NTFS well. we need ext4 to maximize I/O.

Steps:

  1. Join windows insider program/dev channel and install latest build.
  2. Format drive to ext4 (I use DiskGenius).
  3. Attach drive to wsl: wsl --mount <DiskPath> --bare. Refer https://docs.microsoft.com/en-us/windows/wsl/wsl2-mount-disk
  4. Open wsl distro and mount drive: mkdir -p /mnt/wsl/<Device><Partition> && mount /dev/<Disk> /mnt/wsl/<Device><Partition>

Note: wsl mount disk only available on windows preview build

Amazing!

Can you open a PR adding these instructions in the Docker section of the README file please?

@SebMoore
Copy link
Contributor

@delucca @feder-cr
Solved wsl2 I/O bottleneck.
The problem is wsl2 doesn't not support NTFS well. we need ext4 to maximize I/O.
Steps:

  1. Join windows insider program/dev channel and install latest build.
  2. Format drive to ext4 (I use DiskGenius).
  3. Attach drive to wsl: wsl --mount <DiskPath> --bare. Refer https://docs.microsoft.com/en-us/windows/wsl/wsl2-mount-disk
  4. Open wsl distro and mount drive: mkdir -p /mnt/wsl/<Device><Partition> && mount /dev/<Disk> /mnt/wsl/<Device><Partition>

Note: wsl mount disk only available on windows preview build

Amazing!

Can you open a PR adding these instructions in the Docker section of the README file please?

Just a small disclaimer - this works great, but the disk that you want to mount cannot be the disk that you have Windows installed on: the mount command only works for an entire logical disk, meaning you can't just mount a partition, meaning you can't mount the system disk because you need to detach the disk from Windows to mount it, meaning you will have to boot Windows off of a different drive, which could be a problem for some people.

@feder-cr
Copy link

instead do you have advice on how to use both cpu? because I have two cpu but with wsl I only use 1 !!
@hung-nguyen89

@fufar
Copy link

fufar commented Feb 14, 2022

Tryed to use odelucca/chia-plotter to plot chives, it seems that -k flag not working, always k=32 @delucca

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet