Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add udev rule to increase read_ahead_kb when an NFS share is mounted #7

Closed
wants to merge 2 commits into from

Conversation

hailmo-amzn
Copy link
Contributor

Description of changes:
Adding a udev rule to increase the read_ahead_kb value to an old kernel default value when an nfs share is mounted to remedy latency seen with efs.

Before Change:

$ uname -r;sudo mount -t nfs4 -o nfsvers=4.1,hard,timeo=600,retrans=2,noresvport fs-b36e9c87.efs.eu-west-1.amazonaws.com:/ efs;sudo ./nfs-readahead show /home/ec2-user/efs/; time rsync  efs/test .
5.4.0-1.132.64.amzn2.x86_64
/home/ec2-user/efs 0:40 /sys/class/bdi/0:40/read_ahead_kb = 128

real    0m14.428s
user    0m3.842s
sys    0m1.099s

After Change:

$ uname -r;sudo mount -t nfs4 -o nfsvers=4.1,hard,timeo=600,retrans=2,noresvport fs-b36e9c87.efs.eu-west-1.amazonaws.com:/ efs;sudo ./nfs-readahead show /home/ec2-user/efs/; time rsync  efs/test .
5.4.0-1.132.64.amzn2.x86_64
/home/ec2-user/efs 0:40 /sys/class/bdi/0:40/read_ahead_kb = 15360

real    0m3.579s
user    0m3.848s
sys    0m0.929s

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Co-authored-by: Keith Gable <ziggy@ignition-project.com>
@nmeyerhans
Copy link
Contributor

Committed as 9b1ff7d

@nmeyerhans nmeyerhans closed this Nov 16, 2021
nmeyerhans pushed a commit to nmeyerhans/amazon-ec2-utils that referenced this pull request Nov 17, 2021
Pull requests amazonlinux#7 and amazonlinux#8 both added entries to %changelog but were merged in
reverse order, resulting in a changelog that wasn't chronologically ordered,
leading to rpm build failures documented in issue amazonlinux#10.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants