Questions tagged [caching]
34 questions
19
votes
2 answers
How can I safely create and access temp files from shell scripts?
I've read that redirecting output to a fixed name file in /tmp can be a security risk, because if an attacker (or malcontent) notices that a file /tmp/tmpfileformyscript.tmp is created when I run my script (even if he doesn't have read access to my…
Wildcard
- 35,316
- 26
- 130
- 258
6
votes
0 answers
Using dd on Mac OS: conv=fsync equivalent?
I'm running an experiment where I benchmark the speed of reading and writing with and without caching. On Linux, using 'conv=fsync' as an operand makes sure that the output file is entirely physically written before 'dd' exits (for more accurate…
Phi Lam
- 61
- 1
- 2
6
votes
1 answer
Key passphrases and sshd -- cached authentication?
Asking a more precise question:
It appears that I can complete an rsync-over-ssh, using a key that requires a passphrase, without entering the passphrase. For example, I can run the rsync from the command line:
rsync -qavz -e ssh -i…
keshlam
- 403
- 2
- 10
6
votes
0 answers
bcache: writeback strategy
I'm using bcache with about 1 TByte of SSD caching for about 40 TByte of data. With writeback and 10% configured for bcache, about 100 GByte of dirty data exist only on the caching devices.
I like bcache to keep using the configured percentage of…
C-Otto
- 365
- 1
- 3
- 17
4
votes
2 answers
Why Linux does not clean up disk caches and swap automatically?
For example, when I archive a few gigs of files (using tar), Linux uses quite a lot of disk caching (and some swap) but never cleans it up when the operation has completed. As a result, because there's no free memory Linux will try to swap out…
chingis
- 253
- 3
- 6
4
votes
1 answer
Use SWAP as disk cache in Linux
I am using different kind of disks on my server. Is it possible to use faster disk as SWAP and ask Linux to use it as Disk cache
As I understand Linux use SWAP only for application data not disk cache.
But I want to use faster disk as cache for…
ondway
- 71
- 3
3
votes
0 answers
Using a LVM Raid0 as a LVM Cache for / on Linux Mint
I have a pair of solid state drives (/dev/sda and /dev/sdc) and a hard drive (/dev/sdb). I would like to install the system to the hard drive, collect the SSD's into a Raid-0, and divide up that Raid-0 into swap space and cache for the hard drive.
I…
SEMANTICALLY_INVALID
- 31
- 1
3
votes
2 answers
Request header for Cache-Control not working
I have set Cache-Control in apache for 1 week for my JS Files but when i check in the browser Cache-Control shows no-cache. Where i am missing the configuration ?
Below is my configuration in apache
Huzefa
- 79
- 1
- 7
3
votes
1 answer
Is it possible to set mod_expires directives dependent on REMOTE_ADDR?
Basically I have a bunch of mod_expires directives in my httpd.conf like so:
ExpiresByType text/html "access plus 1 hour"
I realize that ultimately, the user's browser determines how long to hold onto something but the above suggestion is too long…
Bratchley
- 16,684
- 13
- 64
- 103
2
votes
1 answer
Optimize adding extra packages to the USB-media for alpine linux offline install?
We would like to make an automated installer for Alpine Linux for running our own application on an embedded x86 pc. Our application setup requires packages not present on the downloadable media and we need it to run self-contained and offline. I…
Thorbjørn Ravn Andersen
- 1,031
- 11
- 19
2
votes
0 answers
Automatically store based on file size - linux - bcache?
Hoping to get answers to this on Debian based distros:
When saving a file, from any program, I'd wish to know if it is possible for the OS to automatically save based on file size. For example, imagine a system with a "big" HDD and a "small" SSD…
J. Ramos
- 21
- 2
2
votes
0 answers
Why are RAM cached NFS file contents corrupted?
We have an NFS server and several clients (Ubuntu 18.04). Sometimes (rarely) a client sees corrupted data after a file was changed from another client. The server and all other clients see the file correctly.
The context is a simple everyday…
isarandi
- 461
- 1
- 4
- 11
2
votes
2 answers
systemctl enable tmp.mount
Consider the practice of mounting the /tmp directory on a tmpfs memory based filesystem, as can be done with:
systemctl enable tmp.mount
And consider the following:
one justification: The use of separate file systems for different paths can protect…
ron
- 5,749
- 7
- 48
- 84
2
votes
1 answer
Is it possible to give caching preferences to the filesystem?
I have a directory (/srv/data) with a large number (20,000,000) with a number of small (4-40KB) files. These files are all located in subdirectories of /srv/data, where the concatenation of the subdirectory names and file names form UUIDs. For…
magnus
- 439
- 1
- 4
- 12
2
votes
0 answers
dd command 4M block size - buff cache
dd if=/dev/urandom of=file1 bs=4M count=100
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------ ---timestamp---
r b swpd free buff cache si so bi bo in cs us sy id wa st
1 0 81292 167664…
Rkaj
- 21
- 2