MINA SSHD
  1. MINA SSHD
  2. SSHD-13

Avoid SecureRandom.generateSeed on every SSH connection

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.1.0
    • Labels:
      None

      Description

      Avoid SecureRandom.generateSeed on every SSH connection

      This is easily 38.9% of our CPU time when establishing a new SSH session. For applications that build and tear down sessions at a high rate, losing ~39% of the time to building a temporary PRNG just for that session is a fairly large waste.

        Activity

        Hide
        Guillaume Nodet added a comment -

        Changed to only use a single PRNG instance.

        Sending trunk/src/main/java/org/apache/sshd/SshClient.java
        Sending trunk/src/main/java/org/apache/sshd/SshServer.java
        Adding trunk/src/main/java/org/apache/sshd/common/random/SingletonRandomFactory.java
        Sending trunk/src/test/java/org/apache/sshd/CipherTest.java
        Adding trunk/src/test/java/org/apache/sshd/LoadTest.java
        Sending trunk/src/test/resources/log4j.properties
        Transmitting file data ......
        Committed revision 741470.

        Show
        Guillaume Nodet added a comment - Changed to only use a single PRNG instance. Sending trunk/src/main/java/org/apache/sshd/SshClient.java Sending trunk/src/main/java/org/apache/sshd/SshServer.java Adding trunk/src/main/java/org/apache/sshd/common/random/SingletonRandomFactory.java Sending trunk/src/test/java/org/apache/sshd/CipherTest.java Adding trunk/src/test/java/org/apache/sshd/LoadTest.java Sending trunk/src/test/resources/log4j.properties Transmitting file data ...... Committed revision 741470.

          People

          • Assignee:
            Guillaume Nodet
            Reporter:
            Shawn Pearce
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development