Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 02 Aug 1997 02:14:44 -0400
From:      "Gary Palmer" <gpalmer@freebsd.org>
To:        hackers@freebsd.org
Subject:   non-blocking file i/o
Message-ID:  <7776.870502484@orion.webspan.net>

next in thread | raw e-mail | index | archive | help

A friend (who mainly does his devel under solaris/linux) recently came
up with a patch to the INN database code which made the writes
non-blocking. On linux/solaris, the non-blocking writes would take
fractions of a ms. On FreeBSD, the blocking write took 8ms and the
``non-blocking'' write took 4ms (set using fcntl). It also seems that
Linux and Solaris use open(file, O_NONBLOCK, 0) to put the file into
non-blocking mode for reading and writing also, where our open flag
only affects the open.

O_NONBLOCK seems nearly a no-op on FreeBSD. Is this true? Is there
anything that can be done about it?

(just as a test, the mmap'd version on a FreeBSD PPro came out with
pretty similar figures to the Linux one on similar h/w ... it's just
non-blocking writes that seem troublesome). The reason that a
non-blocking writes one could be attractive is that the .pag file is
bloated a lot, and could be a lot of trouble on smaller machines ...

Thanks,

Gary
--
Gary Palmer                                          FreeBSD Core Team Member
FreeBSD: Turning PC's into workstations. See http://www.FreeBSD.ORG/ for info



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7776.870502484>