[Twisted-Python] Python SSH Server( twisted.conch) takes up high cpu usage when a large number of echo

Glyph Lefkowitz glyph at twistedmatrix.com
Wed Nov 16 01:52:12 MST 2016


> On Nov 14, 2016, at 6:58 PM, 陈健 <chenjianhappy2008 at 126.com> wrote:
> 
>  hi:
>     I write a SSH server with Twisted Conch. But encountered a difficult problem. Assume that user A and user B log in to the twisted ssh server through ssh command. Then user A tail or cat a large file (greater than 100M) on the server, which will cause a lot of echoing through the twisted ssh server, making python ssh process (twisted.conch ) cpu usage is very high (greater than 95%, or even 100%), then the user B will be blocked, a long time no response. Is there any way to sleep userA's session(0.5 seconds) when find the user A has a large number of echo through the twisted ssh server and not blocking the other connected users?
> 
> http://stackoverflow.com/questions/40601119/python-ssh-server-twisted-conch-takes-up-high-cpu-usage-when-a-large-number-of <http://stackoverflow.com/questions/40601119/python-ssh-server-twisted-conch-takes-up-high-cpu-usage-when-a-large-number-of>
> Best regards,
> 
> 
> 


Thanks for getting in touch!  I've put an answer on Stack Overflow; I hope others will have more input.

-g
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20161116/fcca699a/attachment-0002.html>


More information about the Twisted-Python mailing list