-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CPU usage pegged at 100% #47
Comments
No polling. Ffpd runs one listener thread and then one thread per
connection. All IO is supposed to be blocking but what you are seeing
makes me wonder.
…On Jun 25, 2017 08:47, "pcbeard" ***@***.***> wrote:
Using bin/ftpdrb on macOS with ruby 1.4, Activity Monitor shows ruby using
6 threads and 100% of a CPU. Is the server doing a lot of polling?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#47>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB2JiA6biP4atwrp-Bk_EqSWJDXgTsbRks5sHoD6gaJpZM4OEpDU>
.
|
Even w/o any connections, simply starting the server by running bin/fptdrb, here's what top shows:
|
The problem was a busy-loop in bin/ftpdrb. |
Yes, I just confirmed that too. Here:
What's your proposed fix? I think the easiest would be to simply change that loop to a call to the server thread's join method. |
Added a pull request. |
I think your fix is fine. I'll probably back out my fix and accept your PR after I get some of ftpd's housekeeping taken care of. |
I've released a new version of the gem which includes my fix for this issue. Leaving this issue open tor remind me to replace it with your fix. |
Did you ever consider my fix? |
@pcbeard I would love to use your fix. I haven't pulled it in because my upkeep of ftpd stopped when recent versions of Ruby broke the double-bag-ftps gem that ftpd uses for ftps support, and I don't know what the fix for that is. I suppose I could officially not support more recent Ruby versions, but that bothers me. |
Using bin/ftpdrb on macOS with ruby 1.4, Activity Monitor shows ruby using 6 threads and 100% of a CPU. Is the server doing a lot of polling? In my configuration, there are 3 active server connections that are otherwise idle most of the time.
The text was updated successfully, but these errors were encountered: