[{"data":1,"prerenderedAt":258},["ShallowReactive",2],{"project-10649059":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":36,"aspects":37,"strip":42,"post_text":43,"what":44,"said":70,"maker_in_thread":141,"shape":149,"grid":154,"attempts":219,"same_week":220,"maker_shows":34,"maker_hidden":250,"reader_version":251,"card":252},"10649059","Mmm","manual memory management for Go","title","Show HN: Mmm – manual memory management for Go","https:\u002F\u002Fgithub.com\u002Fteh-cmc\u002Fmmm","github.com","teh_cmc",1448887247,2015,72,29,376,2565,15,"notable","languages","memory management library","library",[24,25,26,27,28],"go","manual memory management","garbage collection","gc pauses","unmanaged heap","curious",-0.263,{"positive":32,"neutral":33,"mixed":34,"critical":35},0,5,1,3,9,{"performance":38,"design":39,"idea":41},{"positive":32,"critical":32},{"positive":32,"critical":40},2,{"positive":32,"critical":34},[35,32,32,32,32,32,32,32,32,32,32,32,32,34,34,32,35,35,32,32,32,32,35,32,32,35,32,35,34],null,{"problem":45,"audience":55,"pricing":43,"motivation":60,"time_to_build":43,"stack":64,"openness":69,"stage":69,"team_size":69},{"value":46,"source":47,"evidence":48},"Long GC pauses in high-load Go services with large caches cause latency spikes","maker",[49,52],{"id":50,"by":11,"text":51},"10650885","I couldn't have said it better. This is almost word for word why I decided to build mmm: I maintain a few high-load RPC services in Go, each of which stores millions, if not tens…",{"id":53,"by":11,"text":54},"10651059","Yes, as I said in this comment [1]; my real issue here is lengthy GC pauses, which cause peaks in response times. Regarding overall performances, I'm not really convinced that…",{"value":56,"source":57,"evidence":58},"Go developers running high-load services with large in-memory heaps","inferred",[59],{"id":50,"by":11,"text":51},{"value":61,"source":47,"evidence":62},"Maintains high-load Go RPC services where GC pauses cause response time peaks",[63],{"id":50,"by":11,"text":51},[65],{"value":66,"source":47,"evidence":67},"Go",[68],{"id":50,"by":11,"text":51},"unknown",{"praise":71,"objections":84,"requests":110,"questions":117,"alternatives":125},[72],{"value":73,"source":74,"evidence":75},"Idea is useful for Go services hitting GC latency limits","commenter",[76,80],{"id":77,"by":78,"text":79},"10649758","jerf","Infrequently enough that it's usually premature optimization to spend too much time worrying about it. But in Go's core application space, high-load network applications,…",{"id":81,"by":82,"text":83},"10650203","jorangreef","One might actually suffer from GC overhead much more than that, i.e. it might be the number one thing to be aware of and optimize, especially if your program has millions of…",[85,96,103],{"value":86,"source":74,"evidence":87},"Using reflection and interface casts may allocate on the GC heap, undermining the goal",[88,92],{"id":89,"by":90,"text":91},"10650201","slimsag","It seems a bit contradictory to write a manual memory management library in Go and _then use type reflection as a shoehorned version of generics_. It must be that the author only…",{"id":93,"by":94,"text":95},"10650529","pcwalton","Also, don't reflection and\u002For interface casts for anything larger than a pointer allocate on the GC heap in Go? That is, isn't it using GC to implement no-GC?",{"value":97,"source":74,"evidence":98},"Premature optimization; profile and reduce allocations first",[99,100],{"id":77,"by":78,"text":79},{"id":101,"by":78,"text":102},"10650406","Much more than \"a realistic chance of optimizing everything else to the point that GC time becomes your biggest problem\"?",{"value":104,"source":74,"evidence":105},"Benchmarks use forced STW GC calls, not representative of production",[106],{"id":107,"by":108,"text":109},"10654609","_rlh","You use runtime.GC() when you did your benchmark. This tells the Go runtime to do an aggressive stop the world GC, which it does. The normal GC is concurrent and if you use it…",[111],{"value":112,"source":74,"evidence":113},"Report reproducible gctrace latency results to the Go team",[114],{"id":115,"by":108,"text":116},"10658599","Some folks export GODEBUG=gctrace=1 which will result in the GC dumping out a lot of interesting information including stop the world latency. It doesn't increase the determinism…",[118],{"value":119,"source":74,"evidence":120},"How often does GC need to run for it to matter in overall speed?",[121],{"id":122,"by":123,"text":124},"10649667","eljimmy","The benchmarks seem to revolve around the invoking of the collector. I am very curious as to how common it would be to do that often enough for it to matter in terms of overall…",[126,133,137],{"value":127,"source":74,"evidence":128},"External caches like memcache or Redis over RPC",[129],{"id":130,"by":131,"text":132},"10650998","giovannibajo1","There's also #4, using a ready-to-use external cache that can be accessed over RPC\u002Fnetwork. Like memcache, or Redis. I'm sure you've thought of it, so can you explain why it…",{"value":134,"source":74,"evidence":135},"Using Rust or C for the cache, called from Go via RPC",[136],{"id":77,"by":78,"text":79},{"value":138,"source":74,"evidence":139},"Go GC tuning via GOGC and concurrent collector in Go 1.5",[140],{"id":115,"by":108,"text":116},{"comments":142,"answered":35,"key":143},4,[144,145,146],{"id":53,"text":54},{"id":50,"text":51},{"id":147,"text":148},"10651215","You're certainly right that it's a possible and viable alternative. The reason I didn't go that way is quite simple: I always try and do my best to avoid external dependencies.…",{"commenters":150,"max_depth":151,"maker_replies":142,"first_comment_mins":152,"lifespan_hours":153},16,8,125,32,[155,159,163,166,169,171,173,175,177,179,182,185,188,191,193,194,196,197,199,201,202,204,206,208,210,212,213,215,216],[156,32,35,157,158,32],"10649618","project\u002Fneutral\u002Fperformance","tptacek",[160,32,32,161,162,32],"10649828","commenter\u002Fneutral\u002Fnone","eternalban",[164,32,32,161,165,32],"10649884","paraboul",[167,32,32,161,168,32],"10650173","JoachimSchipper",[170,32,32,161,162,32],"10650226",[172,32,32,161,165,32],"10650372",[174,32,32,161,94,32],"10650563",[176,32,32,161,158,32],"10650589",[178,32,32,161,94,32],"10650613",[180,32,32,161,181,32],"10651228","jheriko",[183,32,32,161,184,32],"10651565","ctz",[186,32,32,161,187,32],"10650084","arethuza",[189,32,32,161,190,32],"10650809","eropple",[89,34,34,192,90,32],"project\u002Fcritical\u002Fdesign",[93,34,34,192,94,32],[53,34,32,195,11,34],"maker\u002Fneutral\u002Fperformance",[122,40,35,157,123,32],[77,40,35,198,78,32],"project\u002Fmixed\u002Fperformance",[81,40,32,200,82,32],"commenter\u002Fneutral\u002Fperformance",[101,40,32,200,78,32],[203,40,32,200,82,32],"10653848",[50,40,32,205,11,34],"maker\u002Fpositive\u002Fidea",[130,40,35,207,131,32],"maker\u002Fneutral\u002Fidea",[147,40,32,209,11,34],"maker\u002Fneutral\u002Fnone",[211,40,32,200,78,32],"10651554",[107,35,35,195,108,32],[214,35,32,195,11,34],"10657117",[115,35,35,195,108,32],[217,142,34,218,181,32],"10651272","project\u002Fcritical\u002Fidea",[],[221,226,231,236,241,245],{"id":222,"name":223,"points":224,"category":225},"10646440","Pickle Cat",747,"creative",{"id":227,"name":228,"points":229,"category":230},"10646551","HackerCouch",162,"consumer_social",{"id":232,"name":233,"points":234,"category":235},"10634918","Easy Forth",122,"learning_science",{"id":237,"name":238,"points":239,"category":240},"10663298","LaTeX Boilerplates",104,"productivity",{"id":242,"name":243,"points":244,"category":225},"10656671","VerizonCraft",53,{"id":246,"name":247,"points":248,"category":249},"10637278","Real Time Black Friday Dashboard",46,"web_saas",false,"v2",{"id":253,"name":5,"line":6,"ai":250,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":254,"top":18,"kw":255,"maker":11,"domain":10,"tier":19,"attempts":32,"strip":256,"url":9,"mix":257,"praise":73,"objection":86,"sub":21},10649059,-0.26,[24,25,26,27,28],"30000000000001103300003003031",[32,33,34,35],1794036538161]