dup() scales badly on multicore platform
Robert Watson
rwatson at FreeBSD.org
Thu Apr 2 03:52:39 PDT 2009
On Thu, 2 Apr 2009, $BVC4d(Jccuiyyan at sina.com wrote:
> i benchchmark the dup() system call on 32 cores machine in
> FreeBSD-current8.0.
>
> The results are bad. The phenomenon is easy to come out. Each
> process(not thread) on the core
>
> dup() its private file, and close() in a tight loop. The time
> completing the parallel workload
>
> is considered as performance. At first, i think there are some locks.
> However, lock profiling
>
> in FreeBSD is strange and interesting. I attach the graph and lock
> profiling. Any ideas?
Could you post your benchmark code? It sounds from the above as though you
have 32 processes, ecah dup'ing and closing a descriptor originally created in
that process (and not a shared descriptor with other processes)?
Robert N M Watson
Computer Laboratory
University of Cambridge
More information about the freebsd-current
mailing list