swar / Swar-Chia-Plot-Manager

This is a Cross-Platform Plot Manager for Chia Plotting that is simple, easy-to-use, and reliable.
GNU General Public License v3.0
1.26k stars 388 forks source link

Wrong temp_size on linux #294

Open lorado opened 3 years ago

lorado commented 3 years ago

Hello and thank you for this awesome software peace =)

I am testing it right now on windows and linux. I don't know why, but on my linux machine temp_size is showing a double of the real taken space (or so). On windows this column reports correct values.

Here is a snapshot:

======================================================================================================================
num       job        k     pid           start          elapsed_time   phase    phase_times    progress   temp_size
======================================================================================================================
1     swar-plotter   32   5776    2021-05-13 05:16:09   08:56:44       3       03:59 / 01:23   90.43%     272 GiB  
2     swar-plotter   32   6327    2021-05-13 06:34:09   07:38:43       3       04:05 / 01:26   74.84%     337 GiB  
3     swar-plotter   32   6530    2021-05-13 07:10:05   07:02:48       3       04:05 / 01:29   68.25%     363 GiB  
4     swar-plotter   32   6747    2021-05-13 07:55:09   06:17:44       3       04:05 / 01:28   60.16%     400 GiB  
5     swar-plotter   32   8176    2021-05-13 10:27:25   03:45:27       1                       32.27%     319 GiB  
6     swar-plotter   32   9279    2021-05-13 11:07:29   03:05:24       1                       26.11%     334 GiB  
7     swar-plotter   32   9754    2021-05-13 12:29:36   01:43:16       1                       16.15%     312 GiB  
8     swar-plotter   32   10265   2021-05-13 14:07:45   00:05:07       1                       1.33%      84 GiB   
======================================================================================================================
Manager Status: Running

================================================================================
 type               drive                  used     total     percent   plots
================================================================================
temp    /media/nvmePlotter/tmp           1.18TiB   1.79TiB    69.6%     ?    
temp2   /media/nvmePlotter/tmp           1.18TiB   1.79TiB    69.6%     ?    
dest    /media/Plotter01/private_plots   1.39TiB   14.55TiB   9.5%      ?    
================================================================================
CPU Usage: 51.8%
RAM Usage: 17.21/31.33GiB(56.4%)

Plots Completed Yesterday: 2
Plots Completed Today: 11

Next log check at 2021-05-13 14:13:53

Why do I have this issue? I am running from the venv which is delivered by chia-blockchain

OS: Ubuntu Server 20.04

swar commented 3 years ago

It's counting file sizes of all files with the plot id in the temp directory so there might be something else going on with Linux that I wasn't able to account. Unfortunately, I do not have a Linux PC to debug this issue. Would be interesting to see if other people have this issue.

swar commented 3 years ago

@lorado is this issue fixed in the new update or no?

Try version 0.1.0 to see if it fixes your issues. https://github.com/swar/Swar-Chia-Plot-Manager/releases/tag/v.0.1.0

zephyrtx commented 3 years ago

There is a bug is in the get_temp_size function. This function is defined in plotmanager/library/utilities/processes.py. The temp size is double counted when temporary_directory and temporary2_directory are the same. To fix this, change the following line:

for file_path in directories:

to:

for file_path in set(directories):