Skip to content
This repository has been archived by the owner on May 16, 2020. It is now read-only.

possible memory leak through ref cursor (analysis) #71

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

c-bik
Copy link
Member

@c-bik c-bik commented Jun 18, 2019

@shamis and @acautin,

My erlang level attemps only confirms your observations so far. The test module mec_oc here is slightly enhanced version on @acautin 's work.

image

mec_oc:test_ref_cursor(Conn, TestSql, 1000, BindVars, BindValues).
{1000, 0.01%} {900, 0.02%} {800, 0.03%} {700, 0.03%} {600, 0.04%} {500, 0.04%} {400, 0.05%}
{300, 0.05%} {200, 0.06%} {100, 0.06%}

image

I think this module is already closest to dpi (as far erlang can go). Tried different combinations without any improvements so far!

Next step is to implement this with C (taking the NIF part out of the way to get losest to dpi APIs) and perform similar tests.

@c-bik c-bik requested review from acautin and shamis June 18, 2019 21:19
@c-bik
Copy link
Member Author

c-bik commented Jun 19, 2019

image

{1000, 0.01%} {900, 0.02%} {800, 0.02%} {700, 0.02%} {600, 0.02%} {500, 0.02%} {400, 0.03%}
{300, 0.03%} {200, 0.03%} {100, 0.03%} {end, 0.03%}

image

test script updated
@c-bik
Copy link
Member Author

c-bik commented Jun 19, 2019

image

{1000, 0.01%} {900, 0.01%} {800, 0.02%} {700, 0.02%} {600, 0.02%} {500, 0.02%} {400, 0.02%}
{300, 0.03%} {200, 0.03%} {100, 0.03%} {end, 0.04%}

image

@c-bik
Copy link
Member Author

c-bik commented Aug 29, 2019

image

> mec_oc:test_ref_cursor(Conn, TestSql, 1000, BindVars, BindValues).
Resources #{connection => 1,context => 1,data => 0,datapointer => 0,
            statement => 0,variable => 0}
{1000, 0.01%} {900, 0.01%} {800, 0.01%} {700, 0.01%} {600, 0.02%} {500, 0.02%} {400, 0.02%}
 {300, 0.02%} {200, 0.02%} {100, 0.02%} {end, 0.02%}
Resources #{connection => 1,context => 1,data => 0,datapointer => 0,
            statement => 0,variable => 0}

image

@c-bik c-bik removed the request for review from acautin September 2, 2019 15:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant