increase readahead to improve page cache use
This commit is contained in:
parent
02437a677c
commit
767083fb5e
1 changed files with 8 additions and 0 deletions
|
|
@ -9,6 +9,14 @@ export HOME=/root
|
|||
|
||||
echo "=== EveryTab EC2 Bootstrap ==="
|
||||
|
||||
# --- EBS readahead ---
|
||||
# Large readahead improves bundle gen throughput by prefetching icon files into page cache.
|
||||
# 16MB readahead (32768 sectors × 512 bytes). Safe for all pipeline stages.
|
||||
echo "--- Setting EBS readahead ---"
|
||||
ROOT_DEV=$(findmnt -no SOURCE / | sed 's/p[0-9]*$//')
|
||||
sudo blockdev --setra 32768 "$ROOT_DEV"
|
||||
echo "Readahead: $(blockdev --getra "$ROOT_DEV") sectors on $ROOT_DEV"
|
||||
|
||||
# --- File descriptor limits ---
|
||||
echo "--- Raising file descriptor limits ---"
|
||||
echo '* soft nofile 65536' | sudo tee -a /etc/security/limits.conf
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue