How to disable filesystem buffer for a single filesystem?
I have a 2TB SSD drive which im writing data to using 'scp'.
The 'scp' command finished but in trynig to umount the drive, I found that I had to run a 'sync' command to flush the buffers. The disk remained at 100% utilization for almost 1.5 hours while the sync command ran. Unfortunately, this caused me to miss a window for shipping the drive out. So, how can I disable the filesystem buffer to prevent this crazylong sync command? I would much rather have a slower transfer rate but be able to get the drive out of the system on schedule than have faster transfer and miss my delivery. |
Short answer - you can't.
How is the SSD connected ?. |
via USB 2.0, the drive is a Samsung 2tb consumer drive with a usb adapter.
This is for our offsite backups, so pick-up tome is important. Code:
Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await r_await w_await svctm %util |
Thought so - in that case you can do some things to help. Read this. It's old, but still relevant.
|
That's conceivable since the box has 1tb ram...
|
I might be over simplifying things but USB 2.0 is 480Mbps. How much data are you writing to the drive? If you are writing 300GB then it will take about 1.5 hours. You can easily calculate the approx time it will take to transfer and write to the drive so you can plan accordingly.
|
Well, I get about 27 MB/s or just over 50% theoretical bandwidth.
Ive been adjusting the dirty_bites downward slowly to avoid stalling the ssh copy. Got it down to 90GB and heading down to 10GB. Code:
[root@hp6 vm]# for x in $(seq 800 -1 100); do echo ${x}00000000 > dirty_bytes; sleep 10; done |
All times are GMT -5. The time now is 12:56 PM. |