Skip to content

Buffer sequential writes #64

@bbockelm

Description

@bbockelm

We've had a CephFS system indicate that they are seeing strongly negative effects of relatively small writes being emitted by XRootD. The thinking is they are seeing a large number of 16KB write syscalls and a large number of IOPS in Ceph. This is a bit surprising to me - my assumption is that buffered IO is going to be smoothed out at the OS level.

Regardless -- because we default to sequential writes, it should be trivial to do some application-side buffering as well:

  1. Add a configuration knob that allows the user to specify write buffering size (defaults to 0).
  2. When writes occur, if they are smaller than the buffer size (or the total buffered data is less than the buffer size), buffer. Otherwise, write to the next layer down. Use a mutex to ensure concurrent writes don't muck up the buffer.
  3. If an out-of-sequential write (or close) is encountered, dump the remaining buffer and turn off buffering for the remainder of the open file.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions