1. 13 Mar, 2009 4 commits
    • Iustin Pop's avatar
      Add a new ReplaceAndFailover move · 79ac6b6f
      Iustin Pop authored
      This patch adds a new replace secondary and failover move (equals to
      “r:x f”), which can improve the solution (since we are testing more
      options at each step).
      79ac6b6f
    • Iustin Pop's avatar
      Some whitespace changes · fd934a28
      Iustin Pop authored
      Aligned the comments in Instance.hs
      fd934a28
    • Iustin Pop's avatar
      Convert hbal from multiple rounds to a step-method · 7dfaafb1
      Iustin Pop authored
      Currently hbal does multiple rounds, stopping when a rounds doesn't
      bring improvements. With the recent changes to not remove instances from
      the candidate list, this is obsolete as the first round will always run
      to the end of the improvements.
      
      This patch changes this so that the Cluster.checkMove function doesn't
      recurse, but just computes the next best move (as its docstring says).
      This means we can actually incrementally compute and print the solution,
      and this is needed as otherwise an instance could move twice and the
      second time it needs the current placement to compute the exact command
      line and operation needed for the move.
      7dfaafb1
    • Iustin Pop's avatar
      Rework the solution printing in Cluster.hs · ca8258d9
      Iustin Pop authored
      This abstracts the individual placement solution so that it can be used
      independently.
      ca8258d9
  2. 12 Mar, 2009 5 commits
  3. 11 Mar, 2009 6 commits
    • Iustin Pop's avatar
      Fix the Makefile clean rule · ea22656b
      Iustin Pop authored
      This removes obsolete entries from the clean rule and adds the hbal
      binary.
      ea22656b
    • Iustin Pop's avatar
      Change the N1 score to percent of N1 failures · 34a6e127
      Iustin Pop authored
      Since for a very many N+1 failures in a cluster, we could actually
      degrade the N1 CV by making a node N+1 compliant, we need to make sure
      this value only decreases when fixing non-compliant nodes.
      
      The easiest way is to compute the N+1 score as a percentage of failed
      nodes, with the caveat that the domain of values might not be fully
      compatible with the other scores. It is still [0, 1] but does not vary
      like the others.
      34a6e127
    • Iustin Pop's avatar
      Add two new variables in the cluster score · d6be0775
      Iustin Pop authored
      This patch adds two new variables to the cluster score:
        - variance of the failN1 attribute
        - variance of the reserved memory percentage
      
      The variance of the failN1 helps make the cluster N+1 happy, whereas the
      reserved memory percentage helps balance the unused memory for
      redundancy on the nodes.
      d6be0775
    • Iustin Pop's avatar
      Add the node reserved memory percentage · dfc749e6
      Iustin Pop authored
      This patch adds the node attribute “reserved memory percentage” that is
      derived from the maximum reserved memory for a node and its total
      memory.
      
      This will be useful for enhancing the balancing algorithm.
      dfc749e6
    • Iustin Pop's avatar
      Record the running cluster CV in placements · c5c295bc
      Iustin Pop authored
      This patch adds a score variable to the placement type, so we can record
      the changes in the cluster CV for later display.
      
      This gives visibility in the decrease of the parameters and can show
      which are the most important steps to perform (out of the full move
      list).
      c5c295bc
    • Iustin Pop's avatar
      Also print cluster coefficients in hn1 · 0c1df6fd
      Iustin Pop authored
      This patch adds printing the initial and final cluster coefficients in
      hn1 too, to better understand the found solution.
      0c1df6fd
  4. 10 Mar, 2009 3 commits
  5. 09 Mar, 2009 5 commits
    • Iustin Pop's avatar
      Add a news file and make the 0.0.5 release · bbd1d273
      Iustin Pop authored
      bbd1d273
    • Iustin Pop's avatar
      Beautify: strip common suffix from names · a0529a64
      Iustin Pop authored
      This patch automatically removes the longest common (domain, i.e.
      starting with a dot) suffix from the node and instance names. This gives
      a much clearer display, and this format is compatible with the way
      Ganeti accepts shortened names.
      a0529a64
    • Iustin Pop's avatar
      hbal: allow, but warn on, N+1 failed clusters · d6109e64
      Iustin Pop authored
      Based on the node changes, we remove the N+1 check and only show a
      warning instead.
      d6109e64
    • Iustin Pop's avatar
      Change the node N+1 check model · d10b27ef
      Iustin Pop authored
      Currently, we fail a new instance placement if the new node status is
      not N+1 compliant. This means that an allocation on an already N+1
      failed node still fails, even though (conceptually) we're not worse than
      before.
      
      This patch changes this model to fail the allocation *only* if the node
      was N+1 compliant before. This allows balancing to work on non-N+1 happy
      clusters, with the caveat that they probably won't be N+1 happy at the
      end.
      
      Since we skip N+1 check in some cases, we add a new “failHealth” check
      that verifies the node still has strict positive free memory and disk
      space.
      d10b27ef
    • Iustin Pop's avatar
      Show which nodes are not N+1 compliant in output · 2cf878a5
      Iustin Pop authored
      This patch adds a '*' character to nodes which are not N+1 compliant to
      the output, to help with understanding pre- and post-changes cluster
      status.
      2cf878a5
  6. 22 Feb, 2009 4 commits
    • Iustin Pop's avatar
      Don't build documentation for the Main modules · 8df5db55
      Iustin Pop authored
      This fixes the doc issue which exists since the addition of hbal. Now
      make doc makes sense again.
      8df5db55
    • Iustin Pop's avatar
      Change the total disk/mem to Double · 38f63ae6
      Iustin Pop authored
      Since we only use the totals for computations, and we always convert
      them via fromIntegral, let's just store them directly as Doubles.
      38f63ae6
    • Iustin Pop's avatar
      A no-code change s/disk/dsk/ · 962367fe
      Iustin Pop authored
      This just makes indendation nicer in many expressions.
      962367fe
    • Iustin Pop's avatar
      Compute the p_mem / p_dsk statically · 0335fe4a
      Iustin Pop authored
      This patch changes the computation of p_mem / p_dsk from on-demand
      (whenever the cluster stats are computed) to after-modify (after a node
      is modified, we update its stats). This brings a god speed-up as only
      one node or two are usually changed between cluster-wide stats are
      computed.
      0335fe4a
  7. 15 Feb, 2009 7 commits
    • Iustin Pop's avatar
      Documentation updates · d53264c0
      Iustin Pop authored
      d53264c0
    • Iustin Pop's avatar
      Simplify the checkInstanceMove function · 9dc6023f
      Iustin Pop authored
      This patch flattens the two folds into one, by simply building the whole
      list of moves instead  of the double recursion (nodes and the each
      node's moves). This has no functional change, but it's much cleaner.
      9dc6023f
    • Iustin Pop's avatar
      A small optimization in node computation · 256810de
      Iustin Pop authored
      Currently we always compute the available node list for moves (for an
      instances) based on the nodes of the initial table. This works find,
      however is a repeated calculation.
      
      We optimize this by passing a node list (of indexes, not full objects),
      which helps in two ways:
        - faster to filter later
        - allows restriction of target nodes by enforcing only this subset as
          target for moves
      256810de
    • Iustin Pop's avatar
      Container: add a 'keys' function · 1fd47ca2
      Iustin Pop authored
      1fd47ca2
    • Iustin Pop's avatar
      Replace a foldl by foldl' · d4f62d4e
      Iustin Pop authored
      d4f62d4e
    • Iustin Pop's avatar
      Split checkMove into two · 4e25d1c2
      Iustin Pop authored
      This cleans up and splits the individual instance move into a separate function.
      4e25d1c2
    • Iustin Pop's avatar
      Change the balancing algorithm · aaaa0e43
      Iustin Pop authored
      This patch changes the balancing algorithm to not iterate linearly over
      the instances (in a random, but fixed order), instead selecting at each
      step the best next move. This should allow a better score (most of the
      time), and usually also a shorter solution.
      aaaa0e43
  8. 14 Feb, 2009 4 commits
  9. 13 Feb, 2009 2 commits