I love this. I write some data analysis code and for ease of development and speed I keep the tables I build in memory. Generating those tables takes lots of memory and CPU, so I disabled the GC and manually run GC when the runtime memory stats start to get close to the system limit. Seems to be working great, but I had to hack the runtime to do it.
On Tue, Jan 24, 2017, 2:39 PM Yves Junqueira <yves.junque...@gmail.com> wrote: > Hi. > > I've seen various discussions about adding memory limits to Go, but > existing proposals are either impractical or they don't take into > consideration important factors such as: > > - why it's so hard to have predictable memory usage > - what's the effect of GOGC to your memory usage > - how to enforce limits (answer: throttling and faster GC pacing) > - what is the best memory metric to use (answer: the container's > memory usage) and > - how retain application processing throughput (answer: request > throttling). > > A coworker and I wrote a document that digs deeper into these often > overlooked details and proposes a few general-purpose approaches that need > to work hand-in-hand: > > *Memory Limits for Go > <https://docs.google.com/document/d/1zn4f3-XWmoHNj702mCCNvHqaS7p9rzqQGa74uOwOBKM/edit#> > * > > Consider giving this a read before you deploy your own memory limit > enforcement schemes. Perhaps soon we'll have public implementations of > these that everyone can use. > > Any feedback is appreciated. Feel free to reply to this thread directly. > > Thanks! > - Yves > > -- > 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. > For more options, visit https://groups.google.com/d/optout. > -- 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. For more options, visit https://groups.google.com/d/optout.