0

I am currently trying to move my web server (php zendframework based) from Ubuntu to FreeBSD. Both the servers having the same hardware configuration. After migration, I did JMeter test (Http request (Json), Concurrent = 200) of the server, "Throughput" in FreeBSD server was double that of the Ubuntu server which is amazing.

However, when I increase the concurrent to 500, I see almost 50% request Failure due to "java.net.SocketException: Connection reset". But it works as normal in the Ubuntu server.

After many times testing, I found Ubuntu can handle 1500 concurrent httprequest without error, FreeBSD server can handle 200 concurrent request with double speed without error, but cannot handle more. In order to verify the result, I tried AB command. **ab -c 200 -n 5000 127.0.0.1/responseController. It fails and terminate if the ¬-c parameter is over 200, but works fine in Ubuntu.

For debugging I did following: 1. adjust httpd.conf, /boot/loader.conf, /etc/sysctl.conf somehow, but looks like nothing changed. 2. I try switch to mpn_worker_module in Apache configuration and its relevant configuration in php. Nothing changed but failure part log was different, which showed "request failure to respond" rather than "java.net.SocketException: Connection reset"

I did a lot of search but couldn't find the cause of this failure. I though the Json request would be waiting until response or timeout? I am not sure which configuration file or parameter will make it work.

Please help.

2
  • Do you use ipfw or pf on FreeBSD? Do you have anything in the middle? It may be nice to check queue on socket (netstat -Lan), max length is 128 by default (kern.ipc.soacceptqueue). Aug 30, 2016 at 9:34
  • yes man, thank you very much
    – Li Kevin
    Sep 1, 2016 at 2:16

1 Answer 1

0

Thanks for Michael Zhilin, yes "ipfw" did something to caused this, and yes "kern.ipc.soacceptqueue" is the bottleneck in this case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.