We have written a server in golang, and the requirement is that this server 
should be as responsive and the process should never be swapped out.
To enable this we added:
err = syscall.Mlockall(syscall.MCL_CURRENT | syscall.MCL_FUTURE)

The resulting behavior seems that top shows RES memory always increasing, 
despite the fact that golangs garbage collector is releasing memory, seen 
by using
GODEBUG=gctrace=1 when starting the process:


scvg-1: 10 MB released
scvg-1: inuse: 13, idle: 10, sys: 24, released: 10, consumed: 13 (MB)

Is there anyother way to make sure go process does not have its pages 
swapped out ? (because the syscall does not seem to play well)

-- 
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.

Reply via email to