Sample Header Ad - 728x90

Is it safe to change read ahead setting on a live server

2 votes
0 answers
547 views
After going through Elasticsearch's documentation I realised that [the recommended read ahead value is 128KiB](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/tune-for-search-speed.html#_avoid_page_cache_thrashing_by_using_modest_readahead_values_on_linux) while I am currently using 256KiB on a live server. It is only indexing data and not serving any production traffic at the moment. I am not sure if changing it would result in an increase in performance but I was planning on testing that after. As far as I understand it should be safe to do so without corrupting any data but I can't find any info confirming that. Here is the configuration for the data drive (/dev/nvme0n1) that I got after running lsblk -o NAME,RA,MOUNTPOINT,TYPE,SIZE
nvme0n1  256                        disk    1.8T
└─md2    256                        raid1   1.8T
  └─data 256 /var/lib/elasticsearch crypt   1.8T
This is how I would go about changing the values blockdev --setra 256 /dev/nvme0n1 blockdev --setra 256 /dev/md2 blockdev --setra 256 /dev/mapper/data
Asked by Nick Garlis (21 rep)
Nov 8, 2022, 08:03 AM
Last activity: Nov 8, 2022, 08:04 AM