This doesn't seem to help... gc 589 @171.013s 0%: 0.012+0.69+0.17 ms clock, 0.41+0.079/2.9/1.6+5.5 ms cpu, 6->6->5 MB, 7 MB goal, 32 P scvg: 0 MB released scvg: inuse: 7, idle: 54, sys: 61, released: 54, consumed: 7 (MB) scvg: inuse: 7, idle: 54, sys: 61, released: 54, consumed: 7 (MB) scvg: inuse: 7, idle: 54, sys: 61, released: 54, consumed: 7 (MB) scvg: inuse: 7, idle: 54, sys: 61, released: 54, consumed: 7 (MB) scvg: inuse: 7, idle: 54, sys: 61, released: 54, consumed: 7 (MB) scvg: inuse: 7, idle: 54, sys: 61, released: 54, consumed: 7 (MB) scvg: 0 MB released scvg: inuse: 8, idle: 53, sys: 61, released: 52, consumed: 8 (MB) gc 590 @171.018s 0%: 0.25+0.89+0.020 ms clock, 8.2+0.28/3.8/2.6+0.65 ms cpu, 7->7->6 MB, 8 MB goal, 32 P scvg: 0 MB released scvg: inuse: 8, idle: 53, sys: 61, released: 53, consumed: 8 (MB) scvg: 0 MB released scvg: inuse: 8, idle: 53, sys: 61, released: 53, consumed: 8 (MB) scvg: 0 MB released scvg: inuse: 8, idle: 53, sys: 61, released: 53, consumed: 8 (MB) scvg: 0 MB released scvg: inuse: 8, idle: 53, sys: 61, released: 53, consumed: 8 (MB) scvg: 0 MB released scvg: inuse: 8, idle: 53, sys: 61, released: 53, consumed: 8 (MB) scvg: 0 MB released scvg: inuse: 8, idle: 53, sys: 61, released: 53, consumed: 8 (MB) scvg: 0 MB released scvg: inuse: 8, idle: 53, sys: 61, released: 53, consumed: 8 (MB) scvg: 0 MB released scvg: inuse: 8, idle: 53, sys: 61, released: 53, consumed: 8 (MB) scvg: 0 MB released scvg: inuse: 8, idle: 53, sys: 61, released: 53, consumed: 8 (MB)
The ps shows 3674660 826844 (VSZ RSS) BR, Miha On Monday, October 7, 2019 at 10:04:41 AM UTC+2, Jamil Djadala wrote: > > On Mon, 7 Oct 2019 00:54:32 -0700 (PDT) > miha.v...@gmail.com <javascript:> wrote: > > > Hi guys, > > > > We are having a very weird problem, where the process memory keeps > > rising, but both the pprof and valgrind report no memory leaks. But > > the RSS just keeps rising.The C part is in external so library > > > > To be more exact, the pprof when the process becomes idle reports a > > few megabytes used and the Valgrind reports 88bytes lost(this are > > global objects) But the RSS for example is ~1G and virtual 4G+ > > I've run also run the app with the GODEBUG=madvdontneed=1,gctrace=1 > > but madvdontneed doesn't seem to help. > > > > If I describe the MO of communicating with the library's API (all > > memory is allocated on the library side). > > > > for { > > * initialize the processor > > * say to the library to create the blob of size x on it's side > > * convert the returned pointer to a fake slice (code below) > > * copy data to the fake slice > > * instruct processor to do it's thing (e.g make > > calculations/compress the data,...) > > * process the data on Go side (depending on the processor this > > either makes a copy of the data or creates a fake slice from it) > > * destroy the processor (this frees the memory on the library's > > side) > > * upload the data somewhere > > } > > > > func cVoidPtrToByteSlice(data unsafe.Pointer, size int, bytes > > *[]byte) { header := (*reflect.SliceHeader)(unsafe.Pointer(bytes)) > > header.Data = uintptr(data) > > header.Len = size > > header.Cap = size > > } > > > > BR, > > Miha > > > > Hi, can you try to run your program with GOGC=10 environment ? > > -- > Jamil Djadala > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/39e78a46-50e0-411d-b826-c4ac6497fda6%40googlegroups.com.