On Fri, Nov 1, 2024 at 9:15 PM Siyuan Liu wrote:
>
> There is this strange behavior on a Golang service we are running.
>
> On some instances, there is a forced GC that gets triggered every 4 minutes.
> This can be observed when the `GODEBUG=gctrace=1` is turned on. There is a
> log line with `g
There is this strange behavior on a Golang service we are running.
On some instances, there is a forced GC that gets triggered every 4
minutes. This can be observed when the `GODEBUG=gctrace=1` is turned on.
There is a log line with `gc ... (forced)` every 4 minutes consistently on
selected ins
I hope this will help us to better understand
https://medium.com/eureka-engineering/understanding-allocations-in-go-stack-heap-memory-9a2631b5035d
Sharon Mafgaoker – Senior Solutions Architect
M. 050 995 99 16 | sha...@cloud5.co.il
On Fri, 1 Nov 2024 at 19:21 Tushar Rawat wrote:
> Hi Jason
Hi Tushar,
I think you are getting the tradeoffs and building intuition well.
p.s. Nits, if we want to be super pedantic (keeping in mind Ian's
note that there really are no hard and fast rules)...
1) you probably meant 3 words instead of 3 bytes
(3 words at 8 bytes per word is 24 bytes; an 8x
On Fri, Nov 1, 2024 at 11:08 AM Stephan Lukits wrote:
>
> from my research I found it could be helpful to exectue gcc with the
> `--mfloat-abi=hard` option; but I couldn't figure how to inject that option?
I don't know whether it will fix your problem, but you can set the
environment variable CG
from my research I found it could be helpful to exectue gcc with the
`--mfloat-abi=hard` option; but I couldn't figure how to inject that option?
```
~/go/src/hellogio $ go build .
# example.con/rpi3/hellogio
/usr/local/go/pkg/tool/linux_arm/link: running gcc failed: exit status 1
/usr/bin/gcc -m
Hi Jason,
Make sense.
So ideally even for the types/struct which are *more than 3 bytes* and
*immutable,
*if we are able to prove (with some profiling/perf. test) that their is
actually a significant performance improvement on replacing value with
pointer returns (because pointer copy is ch
Hi Tushar,
My rule of thumb in practice is: for returning structs, I almost always
return a pointer.
The exception is -- the only time I would return a value in general -- is
when:
a) the returned value is _intended_ to be an immutable value, like a
time.Time and a string value;
*and*
b) t