Fixes and optimizations

This MR solves:

  • Malleability issues due a put instead a update on rocksdb on metadata movements (old stale metadata status could survive)
  • Malleability tool : gkfs_malleabiliy mutate sync command : Synchronously traverses all the malleability phases
  • Add a weight + benchmark phase before the daemons are ready so the servers are weighted per write bandwidth. It can even decide to go to memory (or a secondary root) if we hit a threshold
  • Needs Random Slicing and GKFS_RANDOM_SLICING_CALIBRATION and ( GKFS_DAEMON_2ND_ROOT with GKFS_RANDOM_SLICING_MIN_MBPS , optional )
Edited by Ramon Nou

Merge request reports

Loading
+4 −0
Changes for docs/sphinx/users/running.md: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -320,6 +320,10 @@ Set `GKFS_DAEMON_STATS_FILE=/path/to/stats.log` for periodic file output, or
When all these variables are unset, no statistics collection thread is started.
Set `GKFS_DAEMON_MIGRATION_CHECKPOINT=ON` to enable atomic per-daemon migration
checkpoint files; this is startup-only and disabled by default.
Set `GKFS_DAEMON_MIGRATION_PARALLELISM=4` on the daemons to run up to four
concurrent eager chunk migration jobs per daemon (range 1–32, default 1).
This does not parallelize metadata redistribution. Each worker can hold a
chunk buffer, so tune against destination load and available memory.

Snapshots include `timestamp_ms`, `pid`, `uptime_seconds`, sampled I/O queue
depth/total, migration job/byte counters, daemon operation totals, and read/write
+8 −0
Changes for include/common/rpc/data_migration_executor.hpp: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -86,6 +86,14 @@ public:
            MigrationProgressCallback progress = nullptr,
            JobHandler handler = nullptr);

    /** @brief Execute jobs with at most parallelism concurrent handlers.
     * Progress callbacks are serialized and report completed jobs.
     */
    MigrationStatus
    execute_parallel(std::vector<MigrationJob>& jobs, size_t parallelism,
                     MigrationProgressCallback progress = nullptr,
                     JobHandler handler = nullptr);

    /** @brief Execute jobs in batches of the requested size. */
    MigrationStatus
    execute_batched(std::vector<MigrationJob>& jobs, size_t batch_size,
+7 −0
Changes for include/common/rpc/random_slicing_distributor.hpp: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -150,6 +150,7 @@ private:
    host_t localhost_;
    unsigned int hosts_size_{0};
    std::vector<host_t> all_hosts_;
    std::vector<float> weights_;
    std::vector<Partition> partitions_;
    IntervalIndex interval_idx_;

@@ -166,6 +167,8 @@ private:
public:
    explicit RandomSlicingDistributor(host_t localhost,
                                      unsigned int hosts_size);
    RandomSlicingDistributor(host_t localhost, unsigned int hosts_size,
                             const std::vector<float>& weights);
    RandomSlicingDistributor() = default;

    // Distributor interface
@@ -202,6 +205,10 @@ public:
    bool
    set_intervals(const std::vector<Interval>& intervals);

    /** @brief Set per-host relative capacities and rebuild the layout. */
    void
    set_weights(const std::vector<float>& weights);

    /** @brief Return the current flat interval table. */
    std::vector<Interval>
    get_intervals() const;
+10 −0
Changes for include/common/env.hpp: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -58,6 +58,16 @@ static constexpr auto DISTRIBUTION_STRATEGY =
        ADD_PREFIX("DISTRIBUTION_STRATEGY");
static constexpr auto RANDOM_SLICING_CUTSHIFT =
        ADD_PREFIX("RANDOM_SLICING_CUTSHIFT");
static constexpr auto RANDOM_SLICING_CALIBRATION =
        ADD_PREFIX("RANDOM_SLICING_CALIBRATION");
static constexpr auto RANDOM_SLICING_CALIBRATION_SECONDS =
        ADD_PREFIX("RANDOM_SLICING_CALIBRATION_SECONDS");
static constexpr auto RANDOM_SLICING_CALIBRATION_MIN_MBPS =
        ADD_PREFIX("RANDOM_SLICING_CALIBRATION_MIN_MBPS");
static constexpr auto RANDOM_SLICING_CALIBRATION_DAEMON_COUNT =
        ADD_PREFIX("RANDOM_SLICING_CALIBRATION_DAEMON_COUNT");
static constexpr auto RANDOM_SLICING_CALIBRATION_DAEMON_ID =
        ADD_PREFIX("RANDOM_SLICING_CALIBRATION_DAEMON_ID");
static constexpr auto EXPAND_ON_DEMAND = ADD_PREFIX("EXPAND_ON_DEMAND");
static constexpr auto NUM_REPL = ADD_PREFIX("NUM_REPL");
static constexpr auto CREATE_CHECK_PARENTS = ADD_PREFIX("CREATE_CHECK_PARENTS");
+4 −0
Changes for include/common/hostfile_management.hpp: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -135,6 +135,10 @@ get_marker(const std::string& line);
HostfileMarkers
parse_hostfile_markers(const std::string& path);

/** Return per-host RS weights in the same sorted order as hostfile_pairs(). */
std::vector<float>
hostfile_rs_weights(const std::string& path);

/**
 * @brief Validate a marker-based hostfile topology.
 * @param markers Parsed hostfile markers
Loading
Loading