Mailinglist Archive: opensuse (1470 mails)

< Previous Next >
Re: [opensuse] experiences with bache / logic of caching
On Wed, Feb 17, 2016 at 12:08 PM, Per Jessen <per@xxxxxxxxxxxx> wrote:
Greg Freemyer wrote:

On Wed, Feb 17, 2016 at 7:03 AM, Per Jessen <per@xxxxxxxxxxxx> wrote:
Andrei Borzenkov wrote:

On Wed, Feb 17, 2016 at 2:28 PM, Per Jessen <per@xxxxxxxxxxxx> wrote:

I'll have to check, but I don't think adding memory will do much. The
filesystems cache is not used because there are no filesystems in use -
the raw disk space is handed out over iSCSI, just as Greg described.


Caches are per-block device, so unless you are using devices for
direct IO they should still benefit from RAM caches.

Each storage server has 4Gb, expandable to 32Gb afaict - but ietd does
use direct IO. (type=blockio). I think I need to check up on fileio vs.
blockio. Adding some more RAM is a lot easier than adding a bcache.

The purpose of O_DIRECT is to move the cache handling from kernel
space to userspace. Does ietd not implement a cache in user space?

Almost certainly not - that would somewhat negate the idea of using direct
IO. Still, I think it's an implementation left-over from years back. I have
not found any reason for using blockio vs fileio (those are the two terms
used by ietd), but I'll have to test it.


/Per

We may be talking about different things.

The device /dev/sdx can be directly opened as a block device and it
can perform blockio. By default I'm pretty sure the kernel would
provide a cache for it.

OTOH, if the "O_DIRECT" flag is passed in on the open() call, then the
kernel is being instructed not to provide a cache. User space will
typically manage cache management if O_DIRECT is in use.

Grep the source code for the O_DIRECT flag and see if it is used to
open the block devices. That will let you know if the kernel is
providing cache functionality.

Greg
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups