回复:Attach to shared memory after fork()

2021-04-28 Thread 邱宇航(烛远)
> Windows has CreateProcess, which isn't available elsewhere. Yes, we still need fork() on *nix. So the solution is to reduce the overhead of fork(). Attach to shared memory after fork() might be a "Better shared memory management". > This is one of the reasons for using a c

Re: Attach to shared memory after fork()

2021-04-27 Thread Tom Lane
"=?UTF-8?B?6YKx5a6H6IiqKOeDm+i/nCk=?=" writes: > Fork is an expensive operation[1]. Yeah, it's not hugely cheap. > So I propose to remove shared buffers from postmaster and shmat them > after fork. This proposal seems moderately insane. In the first place, it introduces failure modes we could

Re: Attach to shared memory after fork()

2021-04-27 Thread Andrew Dunstan
On 4/26/21 11:56 PM, 邱宇航(烛远) wrote: > Fork is an expensive operation[1]. The major cost is the mm(VMA > PTE...) copy. > > ARM is especially weak on fork, which will invalid TLB entries one by > one, and this is an expensive operation[2]. We could easily got 100% > CPU on ARM machine. We also meet

Attach to shared memory after fork()

2021-04-27 Thread 邱宇航(烛远)
Fork is an expensive operation[1]. The major cost is the mm(VMA PTE...) copy. ARM is especially weak on fork, which will invalid TLB entries one by one, and this is an expensive operation[2]. We could easily got 100% CPU on ARM machine. We also meet fork problem in x86, but not as serious as arm