-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Freeswitch: Lua performance bottleneck after importing http.request #201
Comments
That's really odd.... |
@daurnimator Thank you for responding. I've attached two scripts which will help you in reproducing the issue. Bash: |
That script doesn't fail for me. |
@daurnimator Could you please check CPU utilization. I've attached a screenshot of CPU utilization on my machine. Please note we observed this with just 200 threads. |
@daurnimator Did you check this further? |
We use Freeswitch stack with 4000 channels to send IVR calls. The logic is written in Lua. We need to send a POST request whenever a call gets picked up. For this purpose we are using lua-http package. Both the functionalities, i.e. outbound calling and sending POST request are implemented in same Lua file. When we import lua-http package (require "http.request"), we observe high CPU utilization (more than 95%). This also affects outbound calls. We have also observed that, whenever number of threads importing the library cross 1500, system starts slowing down. One possible solution is to restrict number of threads but that would reduce number of outbound calls. Is there anything else we can do to remove this bottleneck?
System configuration:
Operating system: Debian,
4 core CPU, 16G RAM
The text was updated successfully, but these errors were encountered: