Large Julia RSS usage even after calling gc()


#1

Hi folks,

I have a program running under Julia 0.6/Ubuntu Linux that allocates a fair amount of memory during its runtime (~13GB or so, according to @time - mostly arrays, a few SharedArrays as well). After it finishes, top shows that the Julia process is still occupying >4GB RSS. I tried adding calls to gc() in various places, and explicitly calling it from the REPL, but the usage is more or less unchanged. I have a handful of global variables but per Base.summarysize(), none of them amount to more than a few MB. I also tried using Base.whos() but the sum of all the usage it reports is <1GB. Does anybody have a suggestion what could be occupying the remaining 3GB+, or how I might go about determining where it is? Thanks,

Dara


#2

FWIW, this turned out to be an issue stemming from our use of ODBC.jl, which seems to be using APIs (SQL static cursor) that are not well-tested with our database (those same APIs work fine with postgres, so there’s nothing wrong with them per se).

Once we eliminated the ODBC accesses, we no longer see large RSS usage after garbage collection.