[Documentation] The tmpdir_stagger_phase_ options are very hard to understand
I had been trying a lot of things with tmpdir_stagger_phase_ before finally understanding them thanks to @jkbecker in chat . In my case, they allow me to do what I want, but I had no idea they did.
There's a few reasons why they are confusing to me:
- The documentation and the tool itself uses
:to separate major minor, but the comment just saysbefore tmpdir_stagger_phase_major tmpdir_stagger_phase_minor is lesswhich is confusing. - They are based around "tmpdir", but i my case I have a single temp dir, and I am really only thinking about avoiding overloading my CPU, so it wasn't intuitive that it could do what I want (why is phase limit per tmpdir?)
- The default of 1 seems very conservative, perhaps this is because it makes sense for people with many temp drives, but for people like me with a single temp drive, wouldn't something like 4 here be a better default?
- the
tmpdir_stagger_phase_majortmpdir_stagger_phase_minorare defined as the start of the next point beyond the limited window, this is a bit strange to wrap ones head around. EG if i want to limit what's in phase 1, I set it to 2:1. Perfectly fine once I understand it, but didn't lead to an intuitive reading. - The monitored/limited window always starts with 0:0 (because plotman can't predict when a job will enter a non 0:0 window start) but that isn't really clear
- Given the way the major phases work (that they are intensive in different ways), is there any legitimate reason to tune the
phase_minorhere? Minor is always just the table. I feel like the inclusion of it makes it seem more complex and harder to understand - I feel like the other options in the scheduling section are more intuitive and important, perhaps they come first, and this optional phase staggering is commented out and only used by people who wrap their head around it.
tmpdir_stagger_phase_limitis marked as optional, buttmpdir_stagger_phase_xare not, which makes me think they work independently?
I think that in the long run the option names could be changed, or the whole stagger limit by phase window could be reconsidered, (for instance simply a phase_1_max_jobs option would be so clear), I think updating the comments in the default yaml file will help a lot. To kickstart the discussion I've quickly come up with the following draft.
I don't want to open a PR right away because it seems like a better discussion topic and I don't want to jump to conclusions. Here's a first draft at a comment which could try and clearly and conciesly paint a picture of how these work:
# The tmpdir_stagger_phase_ values are optional and give you the ability
# to limit how many plots are running at the start of the phase cycle.
#
# For instance, if you want to only ever have 4 plots running at a time in
# the first phase, set tmpdir_stagger_phase_major to 2,
# tmpdir_stagger_phase_minor to 1, and tmpdir_stagger_phase_limit to 4.
# This means that Plotman will monitor the window BEFORE 2:1 and ensure
# that plot-triggering is limited to a maximum of 4. The plot-limited
# window always starts at the very start (0:0).
How does that feel to everyone?
# This means that Plotman will monitor the window BEFORE 2:1 and ensure
# that plot-triggering is limited to a maximum of 4.
Wonder if this is redundant given the opening sentence? Perhaps another example to add would be: # Another example, if you only want 2 plots to run in the first part of the plotting process, set # tmpdir_stagger_phase_major to 3, tmpdir_stagger_phase_minor to 4, and # tmpdir_stagger_phase_limit to 2.
Also just to point out how confused I was, I currently had tmpdir_stagger_phase_major: 20, tmpdir_stagger_phase_minor: 10 configured. š
I looked into the code and saw it uses milestone variable name, I think if things are renamed down the road, using language like that would help indicate these options are defining a point in time and not a max plot count.
tmpdir_stagger_milestone_major = tmpdir_stagger_phase_major etc?
@graemes another example would be useful! although how did you end up with 3:4 being "the first part of the plotting process" ? or maybe those numbers aren't what you would include?
Meant to say "first half" and "..phase_major to 2"
Yeah cool!
is there any legitimate reason to tune the phase_minor here?
Yes, there absolutely is. I have 3:4 configured there. I can safely start a new plot when i reached that phase without running out of temp space
Yes, there absolutely is. I have 3:4 configured there. I can safely start a new plot when i reached that phase without running out of temp space
what changes between 3:3 and 3:4? Less temp space?
Out of curiosity I wonder if what you are describing is better served by the use of the second temp drive option that chia offers
Iām not opposed to the minor phase config as everyone might have their own reasons but I think it would be useful if the documentation (config comments, readme, or wiki) could paints picture of how the minor phase config could be useful to be something other than 1. Perhaps you can share your scenario to help others.
From start to end of phase 3 there is a difference of around 60GB. When i start a new plot after table pair 4 i have enough free space to start phase 1 again without risk of running out of space. There is enough time for the first plot to finish phase 3 and finish the first 2-3 tables in phase 1. Also beeing able to configure it that granulary makes it possible for me to time my RAM and CPU resources. This would all not work if we could not configure minor phase for staggering.
And no, another temp drive is no viable solution just because it does not exist and would defy my intention to use the hardware most efficient (Which is the fundamental idea about chia). I frankly do not care if you get this or not. This setting is then simply of no relevance for you. Also do i belive, the current help text explains exactly what this does. It should not, nor does it need to, explain why you might want to use this.
@speedmann Ok cool thank you for your explanation.
From start to end of phase 3 there is a difference of around 60GB.
My understanding is that you would want to set 4:1 then, not 3:4. As the phase limit window is defined as a lt not a lte. If you have 3:4 then plotman, as I understand it, is monitoring a window of 0:0-3:3 inclusive. Is that your understanding too?
I frankly do not care if you get this or not. This setting is then simply of no relevance for you.
Incorrect: I need this setting too. It is just that I nearly gave up on plotman because I couldn't understand what these settings did or how it would help. I've seen the same sentiment multiple times from other people, I don't think I'm the only one.
The current config file is largely derived from how I had my system configured some number of months ago, plus a few complications requested by others. There are probably some options for simplification of the overall system, but also, there's a lot of easy headroom in having improved documentation and a simpler default config that doesn't include a bunch of complicated extra stuff.
On Thu, Apr 29, 2021 at 6:05 PM BasilHorowt @.***> wrote:
@speedmann https://github.com/speedmann Ok cool thank you for your explanation.
From start to end of phase 3 there is a difference of around 60GB.
My understanding is that you would want to set 4:1 then, not 3:4. As the phase limit window is defined as a lt not a lte. If you have 3:4 then plotman, as I understand it, is monitoring a window of 0:0-3:3 inclusive. Is that your understanding too?
I frankly do not care if you get this or not. This setting is then simply of no relevance for you.
Incorrect: I need this setting too. It is just that I nearly gave up on plotman because I couldn't understand what these settings did or how it would help. I've seen the same sentiment multiple times from other people, I don't think I'm the only one.
ā You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ericaltendorf/plotman/issues/151#issuecomment-829727160, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARPZIFQRBLOJ4EGDVZMH2DTTLH67FANCNFSM43M322BQ .
Thanks for your interest. This forum is really for reporting issues with Plotman. For general tuning of your plotting setup, please discuss on #plotting-hardware and #plotman on Keybase. Thanks for understanding.
On Thu, Apr 29, 2021 at 6:12 PM huangwuping @.***> wrote:
Hi,guys! I have 2T SSD as tempdir,12-core-cpu and 64G RAM, how can i config the tmpdir_stagger_phase_major tmpdir_stagger_phase_minor and limit to maximize the profermance and job safety? Thank you very much.
ā You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ericaltendorf/plotman/issues/151#issuecomment-829729452, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARPZIFWRFJHBCX3QXTTQPXTTLH7XLANCNFSM43M322BQ .
Can someone explain me what table pair means?
This is a term I have never stumbled upon in months of working with Chia.
I'm not sure what that term means. Where did you see it?
On Sun, May 2, 2021, 13:04 flotti455 @.***> wrote:
Can someone explain me what table pair means?
This is a term I have never stumbled upon in months of working with Chia.
ā You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ericaltendorf/plotman/issues/151#issuecomment-830863995, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARPZIFSRMETDH7563G7XB3DTLWV5DANCNFSM43M322BQ .
Perhaps a better term might be _phase pair _ (or at least that's how I think of it). From https://github.com/Chia-Network/chia-blockchain/wiki/Beginners-Guide - There are 4 phases that does operations in 7 tables
A table (phase) pair is Phase (major) and Step (minor).
FYI - the table with the % complete is quite useful for guesstimating plot scheduling but keep in mind the 1st phase only is multi-threaded while the remainder are single threaded atm.
# Temporary Drive Plotter Phase Settings
# Because Chia Phase 1 utilizes more memory and cpu (thread) resources
# AND is the only multi-threaded stage (after phase 1, the jobs are single threaded)
# These phase settings can help fine tune your chia plotting process
# beyond setting a stagger or limit on number of concurrent jobs
# There are 3 parameters that will help you achieve this. But before learning those,
# take a look at the table below, to learn all the phases and steps of the chia plotting process
# Chia Phase:Step Table
# Phase Step % Progress
# 1 1 1%
# 1 2 6%
# 1 3 12%
# 1 4 20%
# 1 5 28%
# 1 6 36%
# 1 7 42%
# 2 1 43%
# 2 2 48%
# 2 3 51%
# 2 4 55%
# 2 5 58%
# 2 6 61%
# 3 1 66%
# 3 2 73%
# 3 3 79%
# 3 4 85%
# 3 5 92%
# 3 6 98%
# 4 1 100%
# Example 1 - Detailed Explanation
# The tmpdir_stagger_phase_major and tmpdir_stagger_phase_minor correspond
# to the phase and step the plotting process is currently in
# For e.g. it could be 2:1 (2 is the phase or major, 1 is the step or minor)
tmpdir_stagger_phase_major = 2 # phase 2
tmpdir_stagger_phase_minor = 1 # step 1
# The tmpdir_stagger_phase_limit corresponds to the number of plot jobs that can be
# concurrently run before reaching phase 2, step 1 or 2:1
# If this is set to 2, then there will always be 2 plot jobs
# concurrently ran during phase 1. Or specifically during (1:1, 1:2, 1:3, 1:4, 1:5, 1:6, 1:7)
tmpdir_stagger_phase_limit = 2 # limit of 2 plot jobs
# Example 2
# You may decide you want to allow 3 conconcurrent plot jobs to run during phase 1
# Increase the tmpdir_stagger_phase_limit to 3
# tmpdir_stagger_phase_major = 2 # phase 2
# tmpdir_stagger_phase_minor = 1 # step 1
# tmpdir_stagger_phase_limit = 3 # limit of 3 plot jobs
# Example 3
# You may decide you want to relax the restriction and expand the phase:step to 3:1
# And Increase the limit on jobs to 4
# tmpdir_stagger_phase_major = 3 # phase 3
# tmpdir_stagger_phase_minor = 1 # step 1
# tmpdir_stagger_phase_limit = 4 # limit of 4 plot jobs
@thomann061 I think this would be a most excellent addition to the wiki :-)
If it possible to tell how much storage is taken on each phase:step that would be also valuable info.
If I change these values when plotman has started plotting, will it reload from the config file every time it's about to start a job?
(NOTE: I am currently using an old AMD FX-4170 quad core based computer to learn chia farming while I save for a decent setup) So, I have 5 spinning drives installed in this PC, ( I don't have SSD's right now) I have plotman.yaml setup with all of the drives acting as temps and destinations to spread the IO around. I only want to have a max of 2 plots in phase 1:X so each gets 2 "cores". I can have up to 4 in the other phases because of the single threaded nature of those phases, so how would I setup the scheduling section for this scenario?
Based on what thomann061 said above.....
The tmpdir_stagger_phase_limit corresponds to the number of plot jobs that can be concurrently run before reaching phase 2, step 1 or 2:1 If this is set to 2, then there will always be 2 plot jobs concurrently ran during phase 1. Or specifically during (1:1, 1:2, 1:3, 1:4, 1:5, 1:6, 1:7)
This is not what happens on my setup. It always seems to go based on the global_stagger_m: which I had at 60 minutes. I land up with 4 plots running in phase 1. From what I understand, I should have one that plots until 2:1 and then a new plot starts. When that one reaches 2:1 another new one is triggered and so on. Is that not correct?
my current settings are: tmpdir_stagger_phase_major: 2 tmpdir_stagger_phase_minor: 1 tmpdir_stagger_phase_limit: 1 tmpdir_max_jobs: 1 global_max_jobs: global_stagger_m: 120 polling_time_s: 20
@thomann061 your edit is immensely more clear. Thank you. I definitely did not understand this when I first read started. This helps a lot.
@BasilHorowt thanks for raising this, while folks like me just kept blindly fiddling without understanding!