From owner-freebsd-arch@FreeBSD.ORG Sun Oct 30 11:52:42 2011 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8343106564A; Sun, 30 Oct 2011 11:52:42 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [IPv6:2a01:4f8:131:60a2::2]) by mx1.freebsd.org (Postfix) with ESMTP id A8F608FC13; Sun, 30 Oct 2011 11:52:42 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:504f:9791:43c0:21ab]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id E67F94AC1C; Sun, 30 Oct 2011 15:52:40 +0400 (MSK) Date: Sun, 30 Oct 2011 15:52:31 +0400 From: Lev Serebryakov Organization: FreeBSD Project X-Priority: 3 (Normal) Message-ID: <1855260864.20111030155231@serebryakov.spb.ru> To: Adrian Chadd In-Reply-To: References: <201110281426.00013.jhb@freebsd.org> <4EAB550E.3060603@FreeBSD.org> <458756137.20111030024046@serebryakov.spb.ru> <908954806.20111030130143@serebryakov.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Cc: arch@freebsd.org, lev@freebsd.org Subject: Re: [PATCH] fadvise(2) system call X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lev@FreeBSD.org List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Oct 2011 11:52:43 -0000 Hello, Adrian. You wrote 30 =EE=EA=F2=FF=E1=F0=FF 2011 =E3., 15:44:43: >> =A0 I don't know. But I could show your results of typical ktrace, where >> =A0transmission-daemon spends 590 seconds of 600 (Wall time) in >> =A0pread() syscall , and real read speed is only about 30Mbit/s (and >> =A0this FS could be read at speed about 300MiB/s, 100 times faster, >> =A0with linear read). > Is the app doing multi-threaded disk IO? How random is the IO? No, it is single-threaded, but I/O is very random one. This single thread serves many (up to 128 in my setup, and this limit often reached) clients. Typical "logical" block for client is about 1-2MiB, and many clients download several consequent logical blocks. But basic I/O size in transmission is only 32Kb. > How is fadvise being used in the torrent client? Is it being used to > force in data into cache? Yep. With fadvice() transmission notify kernel about logical block (1-2MiB, depends on torrent itself) as "will need" and read from it when client ready to receive next 32KiB portion. Without fadvice() it looks like completely random I/O with 32KiB blocks (with total size of files about 1TiB in my case!). I have very large vfs.read_max, but it doesn't help much :( --=20 // Black Lion AKA Lev Serebryakov