Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Oct 2011 15:52:31 +0400
From:      Lev Serebryakov <lev@FreeBSD.org>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        arch@freebsd.org, lev@freebsd.org
Subject:   Re: [PATCH] fadvise(2) system call
Message-ID:  <1855260864.20111030155231@serebryakov.spb.ru>
In-Reply-To: <CAJ-VmomdJnGqgRWH9zop=Opc=B6MxhCnL%2B1LSroUo3Np7LJNQg@mail.gmail.com>
References:  <201110281426.00013.jhb@freebsd.org> <4EAB550E.3060603@FreeBSD.org> <458756137.20111030024046@serebryakov.spb.ru> <CAJ-Vmo=D-b1SJ0WjJGGJ_WPK8FvE-fptDPRCGyMVhOm=FR8RYA@mail.gmail.com> <908954806.20111030130143@serebryakov.spb.ru> <CAJ-VmomdJnGqgRWH9zop=Opc=B6MxhCnL%2B1LSroUo3Np7LJNQg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <lev@FreeBSD.org>




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