<div dir="ltr"><div dir="ltr"><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The question (for you!) is how we can choose better settings, and<br>
whether we should choose </blockquote><div> </div><div> In my opinion configuration resolution will be best if resolved in the following order of increasing priority/weightage.<br></div><div>1. Auto-detect depending on the system parameters.</div><div>Auto-detection of best params is a must IMO as there's</div><div>enough diversity in server hardware that one size won't fit</div><div>all can be implemented without much effort(excluding benchmarking).<br></div><div><br></div><div>2. Configuration file: A yaml, toml, or any other simple format</div><div></div><div>- Load a different config file with *nbdcopy --file=custom-config.yaml*</div><div>- Maybe generate the default config file having values from the auto-detect phase.<br></div><div>nbdcopy --generate-config<br></div><div><br></div><div><div>~/.config/nbdcopy/config.yaml (used to get values)<br></div><div>~/.config/nbdcopy/example.yaml (generated for reference from auto)<br></div></div></div><div class="gmail_quote"><br><div>3. CLI params</div><div>A quick way to override configuration file params<br></div><div>ex: functionally same<br></div><div>`nbdcopy --requests=4 --config=custom-config.yaml`</div><div>`nbdcopy --config=custom-config.yaml --requests=4`</div><div><br></div><div>The flow of initialization:<br></div><div>Read config file ----override ---> CLI params --- missing params --> auto-detect fill<br></div><div>or</div><div>easier implementation:</div><div>auto-detect fill --- override ---> config file --- override ---> CLI params<br></div><div><br></div><div><br></div><div>The rationale for choosing configuration file method:</div><div>- Easier to use avoiding long commands (less typing, scripts easier to read)</div><div>- Easy switch between multiple configurations and override them.<br></div><div>- Documentation and configuration in the same place</div><div>So easier for someone else to understand why certain parameters were chosen.</div></div></div>