[go-nuts] Re: Lots of retained free spans

2022-01-29 Thread Brian Candler
Go doesn't know about memory pressure, but rather it informs the OS about pages it no longer needs, and the OS deals with memory pressure. See the madvise(2) manpage and the go1.12 release notes . If I und

Re: [go-nuts] http2 WriteTimeout: Issue 49741 in go1.17.6 or not?

2022-01-29 Thread frankre...@gmail.com
I've narrowed down the difference between the case where it fails to timeout and where it does timeout to whether the http2 ConfigureServer is manually called on the *http.Server. I had to export the http2ConfigureServer in h2_bundle.go to be able to call it from the std http package but when I

[go-nuts] Re: Lots of retained free spans

2022-01-29 Thread Eric Hubbard
How does go know about memory pressure? maybe that aspect is broken in my environment... within a cgroup..etc.. On Saturday, 29 January 2022 at 02:16:56 UTC-8 Brian Candler wrote: > What go version are you compiling with? > > go prior to 1.16 would hold onto memory such that the OS would only

[go-nuts] Re: Lots of retained free spans

2022-01-29 Thread Eric Hubbard
v1.16.4 On Saturday, 29 January 2022 at 02:16:56 UTC-8 Brian Candler wrote: > What go version are you compiling with? > > go prior to 1.16 would hold onto memory such that the OS would only > reclaim it when under memory pressure; it could be made to free memory > eagerly using GODEBUG=madvdon

Re: [go-nuts] Re: Why, oh why, do people do this? Things that annoy me in Go code.

2022-01-29 Thread David Finkel
On Sat, Jan 29, 2022 at 6:21 AM Tim Hardcastle wrote: > Agree with Rudolf on point 2. Long meaningful variable/function names are > good. Comments become obsolete, they become detached from their code, > they're only used to explain the name of the variable once and then you're > left with someth

Re: [go-nuts] http2 WriteTimeout: Issue 49741 in go1.17.6 or not?

2022-01-29 Thread frankre...@gmail.com
Sorry. I misrepresented the problem. The issue was that the example should print "wrote 4096, err http2: stream closed" after a second, having filled the buffer with 64 64KiB writes first. Even with go1.17.6, it doesn't do that. The 65th write is not timing out. But it does work if I use the re

[go-nuts] Re: Anyone else writing an interpreter with Thorsten Ball?

2022-01-29 Thread Kamil Ziemian
Thank you for the feedback! piątek, 28 stycznia 2022 o 20:40:40 UTC+1 timphar...@gmail.com napisał(a): > It's very well-explained and the code's easy to read. And you can build on > it. I've been able to modify his code to my language spec, use syntactic > whitespace instead of braces, utf8 ins

[go-nuts] Re: Why, oh why, do people do this? Things that annoy me in Go code.

2022-01-29 Thread Tim Hardcastle
Agree with Rudolf on point 2. Long meaningful variable/function names are good. Comments become obsolete, they become detached from their code, they're only used to explain the name of the variable once and then you're left with something than reads // urn contains the userlist fxn := rx (frn)

[go-nuts] Re: Lots of retained free spans

2022-01-29 Thread Brian Candler
What go version are you compiling with? go prior to 1.16 would hold onto memory such that the OS would only reclaim it when under memory pressure; it could be made to free memory eagerly using GODEBUG=madvdontneed=1. This was made the default in go 1.16. https://discuss.dgraph.io/t/benchmarks-