From owner-freebsd-hackers Fri Aug 1 23:14:48 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id XAA04679 for hackers-outgoing; Fri, 1 Aug 1997 23:14:48 -0700 (PDT) Received: from mail.webspan.net (root@mail.webspan.net [206.154.70.7]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id XAA04674 for ; Fri, 1 Aug 1997 23:14:46 -0700 (PDT) Received: from orion.webspan.net (orion.webspan.net [206.154.70.5]) by mail.webspan.net (WEBSPAN/970608) with ESMTP id CAA05768 for ; Sat, 2 Aug 1997 02:14:45 -0400 (EDT) Received: from orion.webspan.net (localhost [127.0.0.1]) by orion.webspan.net (WEBSPAN/970608) with ESMTP id CAA07778 for ; Sat, 2 Aug 1997 02:14:45 -0400 (EDT) To: hackers@freebsd.org From: "Gary Palmer" Subject: non-blocking file i/o Date: Sat, 02 Aug 1997 02:14:44 -0400 Message-ID: <7776.870502484@orion.webspan.net> Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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