guydavis / machinaris

An easy-to-use WebUI for crypto plotting and farming. Offers Bladebit, Gigahorse, MadMax, Chiadog and Plotman in a Docker container. Supports Chia, MMX, Chives, Flax, and HDDCoin among others.
Apache License 2.0
337 stars 69 forks source link

Show more precise info in the plotting analysis (seconds) #289

Closed efnats closed 2 years ago

efnats commented 3 years ago

In the plotting analysis currently the total amount taken for a plot is being shown in 1000 seconds. For example 1.4k instead 1482.

For those of us who are trying to improve on their plotting speeds this number is quite important and it would help to not get rounded but exact information of the time it took to create the plot.

guydavis commented 3 years ago

Unfortunately, this rounded value is coming out of Plotman, not Machinaris. Makes sense as Plotman was written when only the slow Chia plotter was avaiable, so rounding to the 1000s was no issue. Now, months later we have Bladebit and Madmax which are so much faster. I'll have to take a look at patching that project's upstream.

efnats commented 2 years ago

I have checked this again and using (a modified) method jm suggested here https://chiadecentral.com/nuc-small-form-factor-plotting-build/ it is possible to get good average statistics for a specific plotter by using this command:

grep -i "creation time" ~/machinaris/plotman/logs/*.plot.log | awk '{sum=sum+$6} {avg=sum/NR} {tday=86400/avg*6*101.366/1024} END {printf "%d K32 plots, avg %0.1f seconds, %0.2f TiB/day \n", NR, avg, tday}' 335 K32 plots, avg 1800.2 seconds, 28.51 TiB/day

Maybe this could be used somewhere in the overview or the workers tab in "farming".

edit:

cat `find /home/chia/docker/machinaris/plotman/logs/ -type f -exec stat -c '%Y %n' {} \; | sort -nr | awk 'NR==1,NR==100 {print $2}'` | grep "creation time" |awk '{sum=sum+$6} {avg=sum/NR} {tday=86400/avg6101.366/1024} END {printf "%d K32 plots, avg %0.1f seconds, %0.2f TiB/day \n", NR, avg, tday}'

will analyze the last 100 modifies log files. This helps if you had done modifications to a plotter (hardware or software) that would impact performance and you still want to get precise information about the latest x plots.

I believe the current bash line find -type -exec.. sort.. is not very performant or resource friendly so the command should either be run not too often or we might find a better substitute for finding the last x logfiles.

guydavis commented 2 years ago

Hi, good suggestion. I am working on this and other improvments. Now no longer rounding to thousands in latest dev stream:

image

guydavis commented 2 years ago

This has been released with v0.6.4. Thanks again for the suggestion.