The executable acquires an advisory record lock (fcntl(fd, F_SETLKW, *)) on a profile file.
Merge pool size >= 10 may be beneficial when the concurrency is large.
Also fix a small problem about snprintf. It can cause the filename to be truncated after %m.