All of lore.kernel.org
 help / color / mirror / Atom feed
* Direct io on Ubuntu i386?
@ 2012-08-20  0:57 Greg Sullivan
  2012-08-20 10:57 ` Jens Axboe
  0 siblings, 1 reply; 5+ messages in thread
From: Greg Sullivan @ 2012-08-20  0:57 UTC (permalink / raw)
  To: fio

I'm trying to do direct io (to avoid the file system cache) on Ubuntu
i386. I've tried direct=1, and tried the io engines sync and libaio -
it always seems to use the cache.

Is there a way to bypass the file system cache on Ubuntu? I've got a
vanilla install using the automated Ubuntu installer for Windows i386
32-bit (dual boot).

fio version: 2.0.8-

Greg.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Direct io on Ubuntu i386?
  2012-08-20  0:57 Direct io on Ubuntu i386? Greg Sullivan
@ 2012-08-20 10:57 ` Jens Axboe
  2012-08-20 11:37   ` Greg Sullivan
  0 siblings, 1 reply; 5+ messages in thread
From: Jens Axboe @ 2012-08-20 10:57 UTC (permalink / raw)
  To: Greg Sullivan; +Cc: fio

On 08/20/2012 02:57 AM, Greg Sullivan wrote:
> I'm trying to do direct io (to avoid the file system cache) on Ubuntu
> i386. I've tried direct=1, and tried the io engines sync and libaio -
> it always seems to use the cache.
> 
> Is there a way to bypass the file system cache on Ubuntu? I've got a
> vanilla install using the automated Ubuntu installer for Windows i386
> 32-bit (dual boot).

direct=1 will certainly bypass the cache on Linux, regardless of
version. What makes you suspect otherwise?

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Direct io on Ubuntu i386?
  2012-08-20 10:57 ` Jens Axboe
@ 2012-08-20 11:37   ` Greg Sullivan
  2012-08-20 11:42     ` Jens Axboe
  0 siblings, 1 reply; 5+ messages in thread
From: Greg Sullivan @ 2012-08-20 11:37 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio

On 20 August 2012 20:57, Jens Axboe <axboe@kernel.dk> wrote:
>
> On 08/20/2012 02:57 AM, Greg Sullivan wrote:
> > I'm trying to do direct io (to avoid the file system cache) on Ubuntu
> > i386. I've tried direct=1, and tried the io engines sync and libaio -
> > it always seems to use the cache.
> >
> > Is there a way to bypass the file system cache on Ubuntu? I've got a
> > vanilla install using the automated Ubuntu installer for Windows i386
> > 32-bit (dual boot).
>
> direct=1 will certainly bypass the cache on Linux, regardless of
> version. What makes you suspect otherwise?
>
> --
> Jens Axboe


Running a simple job that reads a 50MB file, the first time I run it,
the aggregate throughput reported by fio is ~20MB/s For subsequent
runs, the transfer rate is significantly higher  - ~150MB/s. When I
then clear the file system cache, and then run it again, the transfer
rate drops back to 20MB/s.

The INI:
[read]
bs=4k
direct=1
sync=1
size=50M
rw=read

Just in case it's relevant, I'm running this on a very old laptop - a
Compaq NW8000. (and 150MB/s is impossibly fast for it to be reading
that from disk)

Greg.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Direct io on Ubuntu i386?
  2012-08-20 11:37   ` Greg Sullivan
@ 2012-08-20 11:42     ` Jens Axboe
  2012-08-21 11:32       ` Greg Sullivan
  0 siblings, 1 reply; 5+ messages in thread
From: Jens Axboe @ 2012-08-20 11:42 UTC (permalink / raw)
  To: Greg Sullivan; +Cc: fio

On 08/20/2012 01:37 PM, Greg Sullivan wrote:
> On 20 August 2012 20:57, Jens Axboe <axboe@kernel.dk> wrote:
>>
>> On 08/20/2012 02:57 AM, Greg Sullivan wrote:
>>> I'm trying to do direct io (to avoid the file system cache) on Ubuntu
>>> i386. I've tried direct=1, and tried the io engines sync and libaio -
>>> it always seems to use the cache.
>>>
>>> Is there a way to bypass the file system cache on Ubuntu? I've got a
>>> vanilla install using the automated Ubuntu installer for Windows i386
>>> 32-bit (dual boot).
>>
>> direct=1 will certainly bypass the cache on Linux, regardless of
>> version. What makes you suspect otherwise?
>>
>> --
>> Jens Axboe
> 
> 
> Running a simple job that reads a 50MB file, the first time I run it,
> the aggregate throughput reported by fio is ~20MB/s For subsequent
> runs, the transfer rate is significantly higher  - ~150MB/s. When I
> then clear the file system cache, and then run it again, the transfer
> rate drops back to 20MB/s.
> 
> The INI:
> [read]
> bs=4k
> direct=1
> sync=1
> size=50M
> rw=read
> 
> Just in case it's relevant, I'm running this on a very old laptop - a
> Compaq NW8000. (and 150MB/s is impossibly fast for it to be reading
> that from disk)

Please run fio with strace -o somefile -f fio <ini.file> and bzip2+send
the 'somefile' file.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Direct io on Ubuntu i386?
  2012-08-20 11:42     ` Jens Axboe
@ 2012-08-21 11:32       ` Greg Sullivan
  0 siblings, 0 replies; 5+ messages in thread
From: Greg Sullivan @ 2012-08-21 11:32 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio

On 20 August 2012 21:42, Jens Axboe <axboe@kernel.dk> wrote:
> On 08/20/2012 01:37 PM, Greg Sullivan wrote:
>> On 20 August 2012 20:57, Jens Axboe <axboe@kernel.dk> wrote:
>>>
>>> On 08/20/2012 02:57 AM, Greg Sullivan wrote:
>>>> I'm trying to do direct io (to avoid the file system cache) on Ubuntu
>>>> i386. I've tried direct=1, and tried the io engines sync and libaio -
>>>> it always seems to use the cache.
>>>>
>>>> Is there a way to bypass the file system cache on Ubuntu? I've got a
>>>> vanilla install using the automated Ubuntu installer for Windows i386
>>>> 32-bit (dual boot).
>>>
>>> direct=1 will certainly bypass the cache on Linux, regardless of
>>> version. What makes you suspect otherwise?
>>>
>>> --
>>> Jens Axboe
>>
>>
>> Running a simple job that reads a 50MB file, the first time I run it,
>> the aggregate throughput reported by fio is ~20MB/s For subsequent
>> runs, the transfer rate is significantly higher  - ~150MB/s. When I
>> then clear the file system cache, and then run it again, the transfer
>> rate drops back to 20MB/s.
>>
>> The INI:
>> [read]
>> bs=4k
>> direct=1
>> sync=1
>> size=50M
>> rw=read
>>
>> Just in case it's relevant, I'm running this on a very old laptop - a
>> Compaq NW8000. (and 150MB/s is impossibly fast for it to be reading
>> that from disk)
>
> Please run fio with strace -o somefile -f fio <ini.file> and bzip2+send
> the 'somefile' file.
>
> --
> Jens Axboe
>

Jens kindly helped me a bit offline. My problem was due to the fact
that I am booting off a FUSE virtual disk, and direct io won't work. I
have now tested direct io using a natively formatted USB FLASH drive,
and it's working fine. ;^)

Greg.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-08-21 11:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-20  0:57 Direct io on Ubuntu i386? Greg Sullivan
2012-08-20 10:57 ` Jens Axboe
2012-08-20 11:37   ` Greg Sullivan
2012-08-20 11:42     ` Jens Axboe
2012-08-21 11:32       ` Greg Sullivan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.