ubuntu$ echo $GODEBUG memprofilerate=1024
I set this var in my bashrc. But still when I do heap profiling only allocs > 512kb are seen in top command. What am I missing?
More outputs:
ubuntu$ env | grep '^GODEBUG='
GODEBUG=memprofilerate=1024
ubuntu$ env | grep '^GODEBUG=' | xxd
00000000: 474f 4445 4255 473d 6d65 6d70 726f 6669 GODEBUG=memprofi
00000010: 6c65 7261 7465 3d31 3032 340a lerate=1024.
Edit: This is a long running process running over 4 days. The linux top -p command is showing a steady increase in memory used by this process but pprof is not able to catch newly allocated space.
Last 2 profile collections: Jul 26 2pm : Top shows used KiB mem - 3145692. pprof profile heap1.out Jul 28 7pm : Top shows used KiB mem - 3915992. pprof profile heap2.out
go tool pprof of heap1.out and heap2.out show the same top 27 inuse_space numbers.