Skip to content

RFC Introduce nfs-readahead-udev

Thiago Becker linux-nfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 RFC Latest7 patches 4 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7Create nfs-readahead-udev.gitignore configure.ac tools/Makefile.am +2 more+13 -10 replies
2/7readahead: configure udevtools/nfs-readahead-udev/99-nfs_bdi.rules.in tools/nfs-readahead-udev/Makefile.am+9 -00 replies
3/7readahead: create logging facilitytools/nfs-readahead-udev/Makefile.am tools/nfs-readahead-udev/log.h tools/nfs-readahead-udev/main.c +1 more+72 -10 replies
4/7readahead: only set readahead for nfs devices.tools/nfs-readahead-udev/99-nfs_bdi.rules.in tools/nfs-readahead-udev/Makefile.am tools/nfs-readahead-udev/main.c+133 -20 replies
5/7readahead: create the configuration file.gitignore configure.ac tools/nfs-readahead-udev/Makefile.am +7 more+269 -30 replies
6/7readahead: add mountpoint and fstype optionstools/nfs-readahead-udev/parser.y tools/nfs-readahead-udev/scanner.l+16 -40 replies
7/7readahead: documentationtools/nfs-readahead-udev/Makefile.am tools/nfs-readahead-udev/nfs-readahead-udev.man tools/nfs-readahead-udev/readahead.conf+63 -02 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [RFC v2 PATCH 0/7] Introduce nfs-readahead-udev

Recent changes in the linux kernel caused NFS readahead to default to 128 from the previous default of 15 * rsize. This causes performance penalties to some read-heavy workloads, which can be fixed by tuning the readahead for that given mount.

Specifically, the read troughput on a sec=krb5p mount drops by 50-75% when comparing the default readahead with a readahead of 15360.

Previous discussions:
https://lore.kernel.org/linux-nfs/[email protected]/
I attempted to add a non-kernel option to mount.nfs, and it was rejected.

https://lore.kernel.org/linux-nfs/[email protected]/
Attempted to add a mount option to the kernel, rejected as well.

I had started a separate tool to set the readahead of BDIs, but the scope is specifically for NFS, so I would like to get the community feeling for having this in nfs-utils.

This patch series introduces nfs-readahead-udev, a utility to automatically set NFS readahead when NFS is mounted. The utility is triggered by udev when a new BDI is added, returns to udev the value of the readahead that should be used.

The tool currently supports setting read ahead per mountpoint, nfs major version, or by a global default value.

Thiago Becker (7):
Create nfs-readahead-udev
readahead: configure udev
readahead: create logging facility
readahead: only set readahead for nfs devices.
readahead: create the configuration file
readahead: add mountpoint and fstype options
readahead: documentation

 .gitignore                                    |   6 +
 configure.ac                                  |   4 +
 tools/Makefile.am                             |   2 +-
 tools/nfs-readahead-udev/99-nfs_bdi.rules.in  |   1 +
 tools/nfs-readahead-udev/Makefile.am          |  26 +++
 tools/nfs-readahead-udev/config_parser.c      |  25 +++
 tools/nfs-readahead-udev/config_parser.h      |  14 ++
 tools/nfs-readahead-udev/list.h               |  48 ++++
 tools/nfs-readahead-udev/log.h                |  16 ++
 tools/nfs-readahead-udev/main.c               | 211 ++++++++++++++++++
 .../nfs-readahead-udev/nfs-readahead-udev.man |  47 ++++
 tools/nfs-readahead-udev/parser.y             |  85 +++++++
 tools/nfs-readahead-udev/readahead.conf       |  15 ++
 tools/nfs-readahead-udev/scanner.l            |  19 ++
 tools/nfs-readahead-udev/syslog.c             |  47 ++++
 15 files changed, 565 insertions(+), 1 deletion(-)
 create mode 100644 tools/nfs-readahead-udev/99-nfs_bdi.rules.in
 create mode 100644 tools/nfs-readahead-udev/Makefile.am
 create mode 100644 tools/nfs-readahead-udev/config_parser.c
 create mode 100644 tools/nfs-readahead-udev/config_parser.h
 create mode 100644 tools/nfs-readahead-udev/list.h
 create mode 100644 tools/nfs-readahead-udev/log.h
 create mode 100644 tools/nfs-readahead-udev/main.c
 create mode 100644 tools/nfs-readahead-udev/nfs-readahead-udev.man
 create mode 100644 tools/nfs-readahead-udev/parser.y
 create mode 100644 tools/nfs-readahead-udev/readahead.conf
 create mode 100644 tools/nfs-readahead-udev/scanner.l
 create mode 100644 tools/nfs-readahead-udev/syslog.c
Signature · 1 line
2.35.1