Skip to content

Allow Randomization of Archive Drive Destinations #856

@MikeKroell

Description

@MikeKroell

When using multiple Plotters, Plotman will constantly use the same archive drive across all plotters resulting in a dramatic slowdown of transfers and writes due to non-sequential writes to the drive over sequential. This happens even with just two plotters.

Now I am not a coder, but here is how I modified the code to make this work for me. Note I did remove some of the checks of the config for this and not sure exactly what other effects it has but it is working for me:

archive.py

    if len(available) > 0:
        index = random.randrange(len(available) - 1)
        #Original Code:
        #index = min(arch_cfg.index, len(available) - 1)
        (archdir, freespace) = sorted(available)[index]
        print(f'Selected {archdir} for archive destination')

This ensures that the majority of the time plotters will be using separate drives. The more drives with available space, the more diverse. They will occasionally hit the same drive, but unless we write some type of temp files for Plotman to read as a marker, I'm not sure how to keep multiple plotters aware of other's writes vs a write that might have not completed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions