Subject: [ libssh2-Bugs-2819559 ] high cpu usage during SFTP copying (nonblock mode)

[ libssh2-Bugs-2819559 ] high cpu usage during SFTP copying (nonblock mode)

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Thu, 03 Sep 2009 08:51:12 +0000

Bugs item #2819559, was opened at 2009-07-10 12:06
Message generated for change (Comment added) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=703942&aid=2819559&group_id=125852

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: SFTP
Group: None
Status: Pending
Resolution: Out of Date
Priority: 5
Private: No
Submitted By: mera (mera-nn)
Assigned to: Daniel Stenberg (bagder)
Summary: high cpu usage during SFTP copying (nonblock mode)

Initial Comment:
Using test sftp copying binary , high cpu usage observed. Seems curl uses nonblock mode so sftp usage using curl library is high. Originally issue observed using curl library.

The logs below:

Using latest libssh2

[root_at_localhost simple]# pwd
/root/libssh2-1.1/example/simple

[root_at_localhost simple]#./sftp_write 192.168.35.75 user pass test.sftp /tmp/test.block
Fingerprint: 11 12 A1 54 1C 8D 65 40 DD 45 EC F9 12 25 A0 59
libssh2_sftp_init()!
libssh2_sftp_open()!
libssh2_sftp_open() is done, now send data!
all done

cpu usage is OK:
  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
 2611 root 15 0 4808 1544 1264 S 11.7 0.1 0:01.48 lt-sftp_write

[root_at_localhost simple]# ./sftp_write_nonblock 192.168.35.75 user pass test.sftp /tmp/test.nonblock
Fingerprint: 11 12 A1 54 1C 8D 65 40 DD 45 EC F9 12 25 A0 59
libssh2_sftp_init()!
libssh2_sftp_open()!
libssh2_sftp_open() is done, now send data!
all done

High cpu usage !!!
 PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
 2561 root 25 0 4804 1464 1244 R 99.3 0.1 0:09.71 lt-sftp_write_non_block

RedHat Enterprise Linux Server 5.1. But, I tested this scenario on 3 platforms. Same effect.
So, I think won't be a big problem to reproduce this issue on any Linux platform.

Please, confirm.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2009-09-03 08:51

Message:
I have tried latest version of libssh2. same effect . high cpu usage.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2009-09-01 21:04

Message:
Thanks, can you try again with the most recent git code and see if you
still experience this problem? I've tried to go over the code and cleaned
up dubious code and it might just have fixed this. Not to mention that we
released 1.2 after the version this is reported against.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=703942&aid=2819559&group_id=125852
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2009-09-03