[erlang-questions] Linux ODBC socket recieve_msg woes

20 views
Skip to first unread message

Andy Richards

unread,
Mar 23, 2012, 10:28:09 AM3/23/12
to Erlang Questions
Hi all,

I'm experiencing performance issues with erlang odbc when running on Linux. I have a simple test application which sends 100 queries from my test gen_server via erlang odbc to sqlserver. When running this test on Windows the test completes in about 200 millis however the exact same test on Linux take about 4 seconds!

I added trace logging to the odbc port driver odbcserver.c and can see that it also takes approx 200 millis to execute all messages and send them back to Erlang however the function receive_msg & receive_msg_part adds approx 3.6 seconds receiving messages from the socket?

I'm running OTP R15B which I've compiled myself on our Redhat EL 6 server. Has anyone come experienced socket performance issues with ODBC under Linux ?

Many thank,

Andy.

Andy Richards

unread,
Mar 23, 2012, 1:16:59 PM3/23/12
to Erlang Questions
Fixed. I found this forum message from back in 2004.

http://erlang.org/pipermail/erlang-questions/2004-July/012808.html

Editing odbcserver.c and disabling nagel's algorithm (approx 40ms on Redhat 6) on the socket solved the problem. I wonder why this was never added to odbcserver.c in the past?

I still see a packet being sent and a ack in my tcpdump inbetween the initial query msg being sent and my resultset being sent back to erlang which I have no idea what for? However overall performance has improved greatly.

Andy.

Ingela Andin

unread,
Mar 26, 2012, 4:33:04 AM3/26/12
to Andy Richards, Erlang Questions
Hi!

2012/3/23, Andy Richards <andy.ric...@googlemail.com>:


> Fixed. I found this forum message from back in 2004.
>
> http://erlang.org/pipermail/erlang-questions/2004-July/012808.html
>
> Editing odbcserver.c and disabling nagel's algorithm (approx 40ms on Redhat
> 6) on the socket solved the problem. I wonder why this was never added to
> odbcserver.c in the past?

Humm... it was added on the erlang side but apparently not on the c-side. I can
not remember why, if it was for some reason or maybe it was just an oversight.
Please send your modifications as a patch.

[...]

Regards Ingela Erlang/OTP team - Ericsson AB
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

Andy Richards

unread,
Mar 26, 2012, 12:50:35 PM3/26/12
to Ingela Andin, Erlang Questions
Hi Ingela, I shall do. Should I send this patch to the erlang-patches mailing list or submit a patch via GitHub?

Andy.

Ingela Andin

unread,
Mar 26, 2012, 3:22:22 PM3/26/12
to Andy Richards, Erlang Questions
Hi!

Please follow the instructions on github on how to make a patch.

https://github.com/erlang/otp/wiki/submitting-patches

Regards Ingela Erlang/OTP team - Ericsson AB

2012/3/26 Andy Richards <andy.ric...@googlemail.com>:

Reply all
Reply to author
Forward
0 new messages