[GH-ISSUE #2] Not persistent across reboots #1

Closed
opened 2026-03-07 19:13:19 +03:00 by kerem · 6 comments
Owner

Originally created by @TheLinuxGuy on GitHub (Feb 3, 2024).
Original GitHub issue: https://github.com/007revad/Synology_enable_sequential_IO/issues/2

Thanks for making this script available. I have followed the setup instructions and upon reboot (regardless of sysctl.conf setting for 0 instead of 1024 the DSM seems to be resetting it to defaults).

Here is some basic debugging after a reboot, note I installed using the script run as root (sudo -i) before rebooting.

myuser@sin:/$ sudo -i
root@sin:~# date
Sat Feb  3 03:29:12 AM EST 2024
root@sin:~# uptime
 03:29:14 up 1 min,  1 user,  load average: 5.34, 1.84, 0.66 [IO: 3.79, 1.22, 0.43 CPU: 1.55, 0.62, 0.23]
root@sin:~# cat /etc/sy
synoappprivilege.db     synoinfo.conf.16tlG0    synotoprc               sysctl.conf
synoautoblock.db        synopackageslimit.conf  synouser.conf           syslog-ng/
synoinfo.conf           synosyslog/             sysconfig/              systemd/
root@sin:~# cat /etc/sysctl.conf
kernel.panic = 3
net.core.somaxconn = 65535
net.ipv4.tcp_tw_reuse  = 1
fs.protected_hardlinks = 1
fs.protected_symlinks = 1
kernel.syno_forbid_console=0
kernel.syno_forbid_usb=0
net.ipv6.conf.default.accept_ra_defrtr=0
net.ipv4.conf.default.accept_redirects=0
net.ipv6.conf.default.accept_redirects=0
net.ipv4.conf.default.send_redirects=0
net.ipv4.conf.default.secure_redirects=0
net.ipv6.conf.default.accept_ra=0
dev.flashcache_shared_cache_vg1_alloc_cache_1+volume_1.skip_seq_thresh_kb="0"
(failed reverse-i-search)`dev': ^Cte
root@sin:~# /volume1/data/synology/scripts/
@eaDir/            syno_app_mover.sh  syno_seq_io.sh
root@sin:~# /volume1/data/synology/scripts/syno_seq_io.sh
Synology_enable_sequential_IO v1.0.1 - by 007revad

See https://github.com/007revad/Synology_enable_sequential_IO

Setting a cache's skip_seq_thresh_kb to 0 enables sequential I/O
Choose a volume with a cache to edit:
---------------------
Cache Volume  Setting
---------------------
1)  volume_1  1024
---------------------
Select cache volume to edit: 1

You selected volume_1 to set to 0

Sequential I/O for volume_1 cache is enabled.

The Synology needs to restart.
Type yes to reboot now.
Type anything else to quit (if you will restart it yourself).


Originally created by @TheLinuxGuy on GitHub (Feb 3, 2024). Original GitHub issue: https://github.com/007revad/Synology_enable_sequential_IO/issues/2 Thanks for making this script available. I have followed the setup instructions and upon reboot (regardless of sysctl.conf setting for 0 instead of 1024 the DSM seems to be resetting it to defaults). Here is some basic debugging after a reboot, note I installed using the script run as root (sudo -i) before rebooting. ``` myuser@sin:/$ sudo -i root@sin:~# date Sat Feb 3 03:29:12 AM EST 2024 root@sin:~# uptime 03:29:14 up 1 min, 1 user, load average: 5.34, 1.84, 0.66 [IO: 3.79, 1.22, 0.43 CPU: 1.55, 0.62, 0.23] root@sin:~# cat /etc/sy synoappprivilege.db synoinfo.conf.16tlG0 synotoprc sysctl.conf synoautoblock.db synopackageslimit.conf synouser.conf syslog-ng/ synoinfo.conf synosyslog/ sysconfig/ systemd/ root@sin:~# cat /etc/sysctl.conf kernel.panic = 3 net.core.somaxconn = 65535 net.ipv4.tcp_tw_reuse = 1 fs.protected_hardlinks = 1 fs.protected_symlinks = 1 kernel.syno_forbid_console=0 kernel.syno_forbid_usb=0 net.ipv6.conf.default.accept_ra_defrtr=0 net.ipv4.conf.default.accept_redirects=0 net.ipv6.conf.default.accept_redirects=0 net.ipv4.conf.default.send_redirects=0 net.ipv4.conf.default.secure_redirects=0 net.ipv6.conf.default.accept_ra=0 dev.flashcache_shared_cache_vg1_alloc_cache_1+volume_1.skip_seq_thresh_kb="0" (failed reverse-i-search)`dev': ^Cte root@sin:~# /volume1/data/synology/scripts/ @eaDir/ syno_app_mover.sh syno_seq_io.sh root@sin:~# /volume1/data/synology/scripts/syno_seq_io.sh Synology_enable_sequential_IO v1.0.1 - by 007revad See https://github.com/007revad/Synology_enable_sequential_IO Setting a cache's skip_seq_thresh_kb to 0 enables sequential I/O Choose a volume with a cache to edit: --------------------- Cache Volume Setting --------------------- 1) volume_1 1024 --------------------- Select cache volume to edit: 1 You selected volume_1 to set to 0 Sequential I/O for volume_1 cache is enabled. The Synology needs to restart. Type yes to reboot now. Type anything else to quit (if you will restart it yourself). ```
kerem closed this issue 2026-03-07 19:13:19 +03:00
Author
Owner

@TheLinuxGuy commented on GitHub (Feb 3, 2024):

My workaround for now.

root@sin:~# cat /proc/sys/dev/flashcache_shared_cache_vg1_alloc_cache_1+volume_1/skip_seq_thresh_kb
1024
root@sin:~# echo "0" > /proc/sys/dev/flashcache_shared_cache_vg1_alloc_cache_1+volume_1/skip_seq_thresh_kb
root@sin:~# cat /proc/sys/dev/flashcache_shared_cache_vg1_alloc_cache_1+volume_1/skip_seq_thresh_kb
0

Verified working; otherwise the NAS won't write to nvme sequential IO (7GB linux dvd iso)

<!-- gh-comment-id:1925217995 --> @TheLinuxGuy commented on GitHub (Feb 3, 2024): My workaround for now. ``` root@sin:~# cat /proc/sys/dev/flashcache_shared_cache_vg1_alloc_cache_1+volume_1/skip_seq_thresh_kb 1024 root@sin:~# echo "0" > /proc/sys/dev/flashcache_shared_cache_vg1_alloc_cache_1+volume_1/skip_seq_thresh_kb root@sin:~# cat /proc/sys/dev/flashcache_shared_cache_vg1_alloc_cache_1+volume_1/skip_seq_thresh_kb 0 ``` Verified working; otherwise the NAS won't write to nvme sequential IO (7GB linux dvd iso)
Author
Owner

@007revad commented on GitHub (Feb 4, 2024):

Are you using DSM 7.2.1 Update 4?

<!-- gh-comment-id:1925587929 --> @007revad commented on GitHub (Feb 4, 2024): Are you using DSM 7.2.1 Update 4?
Author
Owner

@TheLinuxGuy commented on GitHub (Feb 4, 2024):

Are you using DSM 7.2.1 Update 4?

No.

DSM 7.2.1-69057 Update 3 (Release notes) on DS1522+

<!-- gh-comment-id:1925601113 --> @TheLinuxGuy commented on GitHub (Feb 4, 2024): > Are you using DSM 7.2.1 Update 4? No. DSM 7.2.1-69057 Update 3 ([Release notes](http://update7.synology.com/autoupdate/whatsnew.php?model=DS1522%2B&update_version=69057-3)) on DS1522+
Author
Owner

@skupjoe commented on GitHub (Feb 6, 2024):

I am seeing the same issue and I am running DSM 7.2.1-69057 Update 3 on DS1823xs+

After running the script and setting to 0 I immediately re-run the script and I still see a value of 1024.

# ./syno_seq_io.sh                                                                                                                                        
Synology_enable_sequential_IO v1.0.1 - by 007revad                                                         

See https://github.com/007revad/Synology_enable_sequential_IO                                              

Setting a cache's skip_seq_thresh_kb to 0 enables sequential I/O                                           
Choose a volume with a cache to edit:                                                                      
---------------------                                                                                      
Cache Volume  Setting                                                                                      
---------------------                                                                                      
1)  volume_1  1024                                                                                         
---------------------                                                                                      
Select cache volume to edit: 1                                                                             

You selected volume_1 to set to 0                                                                          

Sequential I/O for volume_1 cache is enabled.                                                              

The Synology needs to restart.                                                                             
Type yes to reboot now.                                                                                    
Type anything else to quit (if you will restart it yourself).              
<no reboot>

# cat /proc/sys/dev/flashcache_shared_cache_vg1_alloc_cache_1+volume_1/skip_seq_thresh_kb                                                                                                                                                                                                                                                                                       
1024                                                                

# ./syno_seq_io.sh                                                                                                                                        
Synology_enable_sequential_IO v1.0.1 - by 007revad                                                         

See https://github.com/007revad/Synology_enable_sequential_IO                                              

Setting a cache's skip_seq_thresh_kb to 0 enables sequential I/O                                           
Choose a volume with a cache to edit:                                                                      
---------------------                                                                                      
Cache Volume  Setting                                                                                      
---------------------                                                                                      
1)  volume_1  1024                                                                                         
---------------------                                                                                      
Select cache volume to edit: 1                                                                             

You selected volume_1 to set to 0                                                                          

Sequential I/O for volume_1 cache is enabled.                       

But if I run:

echo "0" > /proc/sys/dev/flashcache_shared_cache_vg1_alloc_cache_1+volume_1/skip_seq_thresh_kb

And then run the script immediately after (no reboot) I see it correctly set to 0:

# ./syno_seq_io.sh 
Synology_enable_sequential_IO v1.0.1 - by 007revad

See https://github.com/007revad/Synology_enable_sequential_IO 

Setting a cache's skip_seq_thresh_kb to `0` enables sequential I/O
Choose a volume with a cache to edit: 
---------------------
Cache Volume  Setting
---------------------
1)  volume_1  0
---------------------
Select cache volume to edit: q
Invalid choice! q

But then if I reboot it goes back to 1024.

# cat /proc/sys/dev/flashcache_shared_cache_vg1_alloc_cache_1+volume_1/skip_seq_thresh_kb                                                                                                                                                                                                                                                                                       
1024  

# ./syno_seq_io.sh                                                                                                                                        
Synology_enable_sequential_IO v1.0.1 - by 007revad                                                         

See https://github.com/007revad/Synology_enable_sequential_IO                                              

Setting a cache's skip_seq_thresh_kb to 0 enables sequential I/O                                           
Choose a volume with a cache to edit:                                                                      
---------------------                                                                                      
Cache Volume  Setting                                                                                      
---------------------                                                                                      
1)  volume_1  1024                                                                                         
---------------------

I've worked around this by using a scheduled boot task to run:

echo "0" > /proc/sys/dev/flashcache_shared_cache_vg1_alloc_cache_1+volume_1/skip_seq_thresh_kb
<!-- gh-comment-id:1928715811 --> @skupjoe commented on GitHub (Feb 6, 2024): I am seeing the same issue and I am running DSM 7.2.1-69057 Update 3 on DS1823xs+ After running the script and setting to `0` I immediately re-run the script and I still see a value of `1024`. ``` # ./syno_seq_io.sh Synology_enable_sequential_IO v1.0.1 - by 007revad See https://github.com/007revad/Synology_enable_sequential_IO Setting a cache's skip_seq_thresh_kb to 0 enables sequential I/O Choose a volume with a cache to edit: --------------------- Cache Volume Setting --------------------- 1) volume_1 1024 --------------------- Select cache volume to edit: 1 You selected volume_1 to set to 0 Sequential I/O for volume_1 cache is enabled. The Synology needs to restart. Type yes to reboot now. Type anything else to quit (if you will restart it yourself). <no reboot> # cat /proc/sys/dev/flashcache_shared_cache_vg1_alloc_cache_1+volume_1/skip_seq_thresh_kb 1024 # ./syno_seq_io.sh Synology_enable_sequential_IO v1.0.1 - by 007revad See https://github.com/007revad/Synology_enable_sequential_IO Setting a cache's skip_seq_thresh_kb to 0 enables sequential I/O Choose a volume with a cache to edit: --------------------- Cache Volume Setting --------------------- 1) volume_1 1024 --------------------- Select cache volume to edit: 1 You selected volume_1 to set to 0 Sequential I/O for volume_1 cache is enabled. ``` But if I run: ``` echo "0" > /proc/sys/dev/flashcache_shared_cache_vg1_alloc_cache_1+volume_1/skip_seq_thresh_kb ``` And then run the script immediately after (no reboot) I see it correctly set to 0: ``` # ./syno_seq_io.sh Synology_enable_sequential_IO v1.0.1 - by 007revad See https://github.com/007revad/Synology_enable_sequential_IO Setting a cache's skip_seq_thresh_kb to `0` enables sequential I/O Choose a volume with a cache to edit: --------------------- Cache Volume Setting --------------------- 1) volume_1 0 --------------------- Select cache volume to edit: q Invalid choice! q ```` But then if I reboot it goes back to `1024`. ``` # cat /proc/sys/dev/flashcache_shared_cache_vg1_alloc_cache_1+volume_1/skip_seq_thresh_kb 1024 # ./syno_seq_io.sh Synology_enable_sequential_IO v1.0.1 - by 007revad See https://github.com/007revad/Synology_enable_sequential_IO Setting a cache's skip_seq_thresh_kb to 0 enables sequential I/O Choose a volume with a cache to edit: --------------------- Cache Volume Setting --------------------- 1) volume_1 1024 --------------------- ``` I've worked around this by using a scheduled boot task to run: ``` echo "0" > /proc/sys/dev/flashcache_shared_cache_vg1_alloc_cache_1+volume_1/skip_seq_thresh_kb ```
Author
Owner

@007revad commented on GitHub (Mar 3, 2024):

@TheLinuxGuy @skupjoe

My Internet was down for 4 hours today so I had time to work on this script. The version I'm working on:

  1. Includes echo "0" > /proc/sys/dev/flashcache_shared_cache_vg1_alloc_cache_1+volume_1/skip_seq_thresh_kb for the selected volume.
  2. Does not need a reboot after running running the script due to point 1.

I'm currently working on making it possible to schedule the script to run at boot with an option to specify the caches you want set to sequential I/O.

<!-- gh-comment-id:1975095715 --> @007revad commented on GitHub (Mar 3, 2024): @TheLinuxGuy @skupjoe My Internet was down for 4 hours today so I had time to work on this script. The version I'm working on: 1. Includes `echo "0" > /proc/sys/dev/flashcache_shared_cache_vg1_alloc_cache_1+volume_1/skip_seq_thresh_kb` for the selected volume. 2. Does not need a reboot after running running the script due to point 1. I'm currently working on making it possible to schedule the script to run at boot with an option to specify the caches you want set to sequential I/O.
Author
Owner

@007revad commented on GitHub (Mar 4, 2024):

New version of the script here: https://github.com/007revad/Synology_enable_sequential_IO/releases/tag/v2.0.3

It needs to be scheduled to run as root at boot, with the --volumes=volume_n option.

See readme: https://github.com/007revad/Synology_enable_sequential_IO
and how to scheduled: https://github.com/007revad/Synology_enable_sequential_IO/blob/main/how_to_schedule.md

<!-- gh-comment-id:1976078388 --> @007revad commented on GitHub (Mar 4, 2024): New version of the script here: https://github.com/007revad/Synology_enable_sequential_IO/releases/tag/v2.0.3 It needs to be scheduled to run as root at boot, with the --volumes=volume_n option. See readme: https://github.com/007revad/Synology_enable_sequential_IO and how to scheduled: https://github.com/007revad/Synology_enable_sequential_IO/blob/main/how_to_schedule.md
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Synology_enable_sequential_IO#1
No description provided.