Uploaded image for project: 'Ansible Networking & Security (Content)'
  1. Ansible Networking & Security (Content)
  2. ANA-541

pylibssh takes longer time than paramiko to receive the same data

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • networking
    • None

      Related to

      • The above issue is caused because pylibssh takes ~300 times longer than paramiko to read the output of show vlan | json from the same target device. This resulted in the command_timeout value to work for paramiko but not libssh.
      • This was realised by adding time.perf_counter() in relevant places within network_cli code as defined in this patch.
      • Based on multiple passes, paramiko takes ~3 secs while pylibssh takes ~1000 secs to receive the same data.
      • Data from one such pass is added here - https://gist.github.com/NilashishC/62cf8e945ac9a49e743fb2b553b8716d.
      • On bumping the buffer size in read_non_blocking() to 8096 bytes and removing the upper cap of 1024 bytes, this delay was reduced to ~280 secs.

              Unassigned Unassigned
              chagrawa Chetna Agrawal
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: