You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the GitLab official blog post, How a fix in Go 1.9 sped up our Gitaly service by 30x, Gitaly (GitLab Git RPC service) with Go 1.8 uses fork for ForkExec caused child process starting with a copy of the parent processes' memory, in other words, ForkExec takes longer when the process has larger virtual memory footprint.
In Go 1.9, ForkExec switch from fork to clone(2) with CLONE_VFORK and CLONE_VM flags, or as known as posix_spawn(3), which doesn't copy parent processes' memory space and has a roughly constant time.
According to the GitLab official blog post, How a fix in Go 1.9 sped up our Gitaly service by 30x, Gitaly (GitLab Git RPC service) with Go 1.8 uses
fork
forForkExec
caused child process starting with a copy of the parent processes' memory, in other words,ForkExec
takes longer when the process has larger virtual memory footprint.In Go 1.9,
ForkExec
switch fromfork
toclone(2)
withCLONE_VFORK
andCLONE_VM
flags, or as known asposix_spawn(3)
, which doesn't copy parent processes' memory space and has a roughly constant time.ref: golang/go#5838
ref: https://go-review.googlesource.com/c/go/+/37439
The text was updated successfully, but these errors were encountered: