Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-13891 HDFS RBF stabilization phase I
  3. HDFS-14114

RBF: MIN_ACTIVE_RATIO should be configurable

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.3.0, HDFS-13891
    • None
    • None
    • Reviewed

    Description

      The following code contains

            if (timeSinceLastActive > connectionCleanupPeriodMs ||
                active < MIN_ACTIVE_RATIO * total) {
              // Remove and close 1 connection
              List<ConnectionContext> conns = pool.removeConnections(1);
              for (ConnectionContext conn : conns) {
                conn.close();
              }
              LOG.debug("Removed connection {} used {} seconds ago. " +
                      "Pool has {}/{} connections", pool.getConnectionPoolId(),
                  TimeUnit.MILLISECONDS.toSeconds(timeSinceLastActive),
                  pool.getNumConnections(), pool.getMaxSize());
            }
      ...
                  if (pool.getNumConnections() < pool.getMaxSize() &&
                      active >= MIN_ACTIVE_RATIO * total) {
                    ConnectionContext conn = pool.newConnection();
                    pool.addConnection(conn);
                  } else {
                    LOG.debug("Cannot add more than {} connections to {}",
                        pool.getMaxSize(), pool);
                  }
      

      It affects cleanup and creating Connections. Maybe it should be configurable so that we can reconfig it to improve performance

      Attachments

        1. HDFS-14114.001.patch
          10 kB
          Hui Fei
        2. HDFS-14114.002.patch
          10 kB
          Hui Fei
        3. HDFS-14114.003.patch
          11 kB
          Hui Fei
        4. HDFS-14114.004.patch
          11 kB
          Hui Fei
        5. HDFS-14114.005.patch
          12 kB
          Hui Fei
        6. HDFS-14114.006.patch
          12 kB
          Hui Fei
        7. HDFS-14114.007.patch
          12 kB
          Hui Fei
        8. HDFS-14114.008.patch
          12 kB
          Hui Fei
        9. HDFS-14114-HDFS-13891.001.patch
          12 kB
          Yiqun Lin
        10. HDFS-14114-HDFS-13891.002.patch
          13 kB
          Hui Fei

        Activity

          People

            ferhui Hui Fei
            ferhui Hui Fei
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: