From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 2 15:01:13 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 79FFC16A4CE; Sat, 2 Oct 2004 15:01:13 +0000 (GMT) Received: from lara.cc.fer.hr (lara.cc.fer.hr [161.53.72.113]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA0D243D49; Sat, 2 Oct 2004 15:01:12 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from [127.0.0.1] (localhost.cc.fer.hr [127.0.0.1]) by lara.cc.fer.hr (8.13.1/8.13.1) with ESMTP id i92F0SsZ000753; Sat, 2 Oct 2004 17:00:28 +0200 (CEST) (envelope-from ivoras@fer.hr) Message-ID: <415EC28B.4030900@fer.hr> Date: Sat, 02 Oct 2004 17:00:27 +0200 From: Ivan Voras User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: hackers@freebsd.org, current@freebsd.org References: <415BDFC2.1020304@fer.hr> <415C9967.3090309@jonny.eng.br> <415D2E86.5060007@fer.hr> <20041002133512.GA16646@nerve.riss-telecom.ru> In-Reply-To: <20041002133512.GA16646@nerve.riss-telecom.ru> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: GEOM (ggate) compression consumer +problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Oct 2004 15:01:13 -0000 Dmitry Frolov wrote: > * Ivan Voras [01.10.2004 17:17]: > >>But, I still can't solve the wdrain problem. I've tried it on a recent >>BETA6 kernel and it still remains. Writes get slower and slower >>(actually, the frequency of writes), and then something locks up (with >>no CPU usage...). Sometimes, *any* writes to any filesystem lock up. > > > Looks very similar to a syncing problem found in md(4). > Take a look at cvs log entry for revision 1.115 of md.c: > > http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/md/md.c Thank you! It's exactly the same problem I've got. After including O_DIRECT and O_FSYNC flags to the open() call, the problems dissapear (though performance takes a big hit). Also, it's the same problem with ggatel. This small patch solves it: --- ggatel.c.old Sat Oct 2 16:48:08 2004 +++ ggatel.c Sat Oct 2 16:48:11 2004 @@ -160,7 +160,7 @@ struct g_gate_ctl_create ggioc; int fd; - fd = open(path, g_gate_openflags(flags)); + fd = open(path, g_gate_openflags(flags) | O_DIRECT | O_FSYNC); if (fd < 0) err(EXIT_FAILURE, "Cannot open %s", path); ggioc.gctl_version = G_GATE_VERSION; I've poslihed some quirks from the ggatec, so it should now be ready for somewhat broader testing ;) (It's at http://ivoras.sharanet.org/ggcomp.tgz ; expect about 10x worse performance compared to performance without compression).