--
You received this message because you are subscribed to the Google Groups "Network Traffic Obfuscation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to traffic-obf...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Network Traffic Obfuscation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to traffic-obf...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Mon, Feb 11, 2019 at 11:40 AM ‘Alberto Lalama’ via Network Traffic Obfuscation traff...@googlegroups.com wrote:
We have also experimented with SetGCPercent and FreeOSMemory. @Rod Hynes, do you use a heuristic to call FreeOSMemory? We have experimented with ReadMemStats to call FreeOSMemory when memory pressure is high. However, we have seen inconsistent memory stats, as the function seems to report the main application's memory, and not the VPN extension's.
We call SetGCPercent with an aggressive setting to deal with constant, small memory allocations that occur throughout our code base.
We use FreeOSMemory proactively, calling it between memory intensive operations (e.g, establish a connection to a server) with the expectation that this will cause heap to be reclaimed and reused before subsequent operations which remain blocked until FreeOSMemory returns.
Per https://golang.org/doc/go1.9#gc, only the goroutine calling FreeOSMemory blocks, so we make FreeOSMemory calls in schedulers that launch/coordinate other goroutines.
(I think that in many cases we could simply call GC instead of FreeOSMemory. FreeOSMemory calls GC and maybe returns some memory to the OS, which I’m not sure happens often. Either way, what we’re attempting to do in this case is synchronously complete some garbage collection before allocating more memory.)
--