Questions tagged [cache]
cache is a component that stores data so future requests for that data can be served faster; the data stored in a cache might be the results of an earlier computation, or the duplicates of data stored elsewhere.
482 questions
2
votes
1
answer
53
views
Spin down HDD on Server
I'm running Debian 13 (fresh install) and want to use specifically Nextcloud and Immich on docker on an SSD and 2 HDDs with 10TB for data (and the second for raid/snapraid or backups or similar).
For ...
9
votes
1
answer
762
views
When suspending to disk, does memory cache got dumped to disk?
My system has 64GiB of memory. I noticed it usually uses about 20GiB for cache. I wonder if I do "suspend to disk", does the cached part get dumped to disk as well, or is it written to disk ...
3
votes
1
answer
109
views
Is it a good idea to have inode size of 2048 bytes + inline_data on an ext4 filesystem?
I only recently "discovered" the inline_data feature of ext4, although it seems to have been around for 10+ years.
I ran a few statistics on various of my systems (desktop/notebook + server),...
4
votes
1
answer
332
views
How to get the stats of an lvm cache?
I am using an lvm cache in the most usual combination (small, fast ssd before a huge, slow hdd). It is simply awesome.
However, I have not found a way to know, how many blocks are actually cached and ...
0
votes
1
answer
49
views
Why does the program that reads files still run very fast after clearing the page cache?
Test environment: Virtual Machine(Windows 11, VMware Workstation Pro), Ubuntu 22.04, mechanical hard drive.
Use the following command to generate 1GB of test data:
dd if=/dev/urandom of=test.data ...
8
votes
2
answers
649
views
fork() Causes DMA Buffer in Physical Memory to Retain Stale Data on Subsequent Writes
I'm working on a C++ application on Ubuntu 20.04 that uses PCIe DMA to transfer data from a user-space buffer to hardware. The buffer is mapped to a fixed 1K physical memory region via a custom ...
2
votes
1
answer
69
views
How to prioritize SSD page cache eviction over HDD with slower speed?
I have a large slow HDD and a small fast SSD. This is about reads not RAID. My desktop grinds to a near-halt when switching back to Firefox or man pages after (re/un)-loading 12+ GiB of Linux kernel ...
0
votes
1
answer
72
views
What is the difference and relation between the "--default-cache-ttl" and "--max-cache-ttl" options?
About GPG is mentioned the gpg-agent and I read the following answer:
gpg does not ask for password
Where is mentioned the --default-cache-ttl and --max-cache-ttl options. So I found this official ...
1
vote
0
answers
97
views
Alternate way to get the CPU cache size
I have a project where I need to get the size of the cache on my Linux machine. I don't know the linux distro, and the /etc/os-release file does not exist.
I only know the kernel and architecture:
...
0
votes
1
answer
172
views
Synology SSD cache size requirement
I've been running a new Synology RS3621RPxs for several weeks, and my 4TB SSD cache shows:
Cache composition: Reusable (341 GB) / Total (3.6 TB)
If I'm reading that correctly, my nas isn't even using ...
0
votes
1
answer
192
views
Share one SSD Cache across multiple volumes & storage pools on Synology NAS
I have a new Synology NAS with 2 storage pools, and I have one volume per pool.
I have added a single SSD to the NAS to serve as a cache, and was able to add it to the first storage pool. This is a ...
6
votes
3
answers
2k
views
Does linux have a cache for standard output?
I know that recently accessed files are cached into the RAM, but is there a cache for frequent commands?
For example, if I run cat file.txt multiple time, file.txt will be cached after the first ...
0
votes
1
answer
163
views
Is there a FUSE-based caching solution for selective prefetching from a remote filesystem?
I am working with a remote parallel file system (CephFS), mounted at /mnt/mycephfs/, which contains a large dataset of small files (200 GB+). My application trains on these files, but reading directly ...
1
vote
0
answers
148
views
SSL certa sha changed, but Chrome still uses old one
I was forced to change ssl certificate for one from my domains. So, cert changed, sha256 changed. Old cert was not expired yet, but it's now replaced with new one.
But, it looks like Chrome does not ...
1
vote
0
answers
68
views
Radix Tree vs Multi-level bitmap
The Linux kernel (at least before using XArrays as far as I'm aware, which to my knowledge are wrappers around Radix Trees anyway) uses radix trees in its address_space structs which every file has. ...
5
votes
2
answers
500
views
Do executables in different containers share shared objects that are define in the same common image layer?
I am investigating the memory impact of containerising two processes that depend on the same shared object. My main question is whether the shared object will be loaded in memory twice or not.
This ...
7
votes
4
answers
1k
views
Simulate slow disks in KVM to see effect of LVM cache in test setup
I'm setting up a Linux system in KVM (QEMU) to test the effect of adding a writeback LVM cache on a fast disk in front of a logical volume that resides on a set of very slow disks (a RAID1 LV). This ...
2
votes
1
answer
857
views
Is it safe to add LVM cache device to existing LVM volume group while filesystem is mounted?
I have an existing LVM volume group with a 10 TB logical volume mounted as an ext4 system which is actively in use.
Is it safe to run the command lvconvert --type cache --cachepool storage/lvmcache-...
0
votes
2
answers
101
views
Is it possible to get a higher memory buff/cache usage after writing a lot of data to the disk?
On an Apache server of my own, logging requests to files has been enabled using a custom Apache module.
The log files can reach several GB at the end of the day.
Using Nagios I have noticed memory ...
2
votes
0
answers
103
views
A simple memcpy loop with stride of 8-16-32 Bytes, no L1 cache misses, what stalls backend cycles?
I am trying to understand the CPU cache performance in a single producer single consumer queue algorithm, but cannot pinpoint the cause of performance degradation in some cases. The following ...
0
votes
1
answer
118
views
What are the issues with timing sync and clearing cache?
Because there is a situation in my project where files cannot be saved to disk after being written, these two scripts have been added in the background. Will they have any impact on system performance?...
2
votes
1
answer
867
views
Any way to enable user_xattr on tmpfs?
I am trying to cache CIFS share files on a ramdisk with cachefilesd, however cachefilesd requires the cache directory filesystem to support user_xattr. tmpfs does not by default. Is there any way to ...
1
vote
1
answer
2k
views
How do I clear the cache without restarting my terminal?
I'm currently working on the POD supercomputer at UT Austin. Tech support for the supercomputer couldn't help me. There's a specific version of Python (3.9) I want to use in my Anaconda environment, ...
0
votes
2
answers
4k
views
How to disable the Linux page cache
The Linux kernel implements the page cache to accelerate I/O operations.
It would be helpful to be able to turn off and on the page cache for research and testing.
How can the Linux page cache be ...
0
votes
0
answers
519
views
Can't flush dns in kali linux in Virtualbox. It seems like neither of these are my dns client: systemd-resolve, resolvectl, nscd, dnsmasq
It seems like there are no dns clients(????).... but it's impossibile, it's just don't know how to find it.
$ sudo lsof -i :53 -S does not return anything.
systemctl restart nscd #or
systemd-resolve -...
0
votes
1
answer
3k
views
It possible use SSD as cache?
I have a linux media server that I use mainly with plex and Serviio(dlna server). I have a t400 4gb gpu (transcoding), 16GB ddr4 ram and an i7-6700 cpu. Now, I have 3 SSDs: 1TB for movies, 250GB for ...
1
vote
0
answers
93
views
Can I invalidate the buffer cache of a block device?
I have a system which is a USB gadget. It exposes one of its partitions over USB using functionfs to allow the host to provide update files:
set -e
CONFIGFS_ROOT=/dev/gadget
CONFIGFS_DEV=$...
0
votes
1
answer
277
views
Question on tuning file system cache in Linux UBIFS on MTD
I am working on an embedded Linux system, where kernel is 5.10.24, and UBIFS on MTD is used.
The testing team had a test, which writes a disk file (open, write, close in order), then powers system off....
0
votes
1
answer
153
views
How to empty name cache on FreeBSD?
The name cache on FreeBSD is responsible for caching file names and their vnodes. It also provides a special database for hashing the contents of large directories.
I would like to know how to empty ...
1
vote
1
answer
261
views
How to drop the contents of the block cache of a partition/drive in Linux?
(Moved from Stack Overflow.)
I have a simple backup process that copies a bunch of files to a USB flash drive. I want to verify that copying was successful by re-reading the flash drive and comparing ...
1
vote
1
answer
10k
views
How to clear all cache data of google-chrome by commands executed by a bash script?
In my lubuntu 18.04 distribution I have installed google-chrome version 114.
By a bash script, at every boots, Chrome is launched and connects to a specific URL. The URL is always the same, but ...
4
votes
4
answers
3k
views
How to provision multi-tier a file system across fast and slow storage while combining capacity?
I'm hunting for a way to utilise a slow 500GB magnetic HDD alongside a fast 500GB SSD.
I'd like to end up with a reasonable fraction of the two combined [hopefully > 800GB] in terms of capacity, ...
2
votes
0
answers
3k
views
Do we really need NSCD service running? What are the pros and cons?
We have a pretty mixed environment in terms of operating systems. Suse 12/15, Oracle Linux 6/7/8, Redhat 6/7/8 and a few others.
We've been using Active Directory authentication for some time.
For ...
0
votes
2
answers
24k
views
How do I clear the dns cache on CentOS 7 and CentOS 8?
I am working on scripting a way to flush DNS cache
on different Linux distros.
I want to support doing this with Ubuntu-Server, Ubuntu Desktop,
CentOS 8 Desktop, and CentOS 7 Server (no GUI).
I have ...
0
votes
1
answer
982
views
cache smb mount on local hard drive
I have a smb mount on my linux server, but occasionally it loses connection, interrupting the software using the mounted directory. Is there a way to cache the smb mount on local disk?
1
vote
1
answer
813
views
NUMA aware caching on linux
This is a follow-up question to dentry/inode caching on multi-cpu machines / memory allocator configuration, but here I try to put the question differently.
My problem is that I have a dual socket ...
2
votes
0
answers
278
views
dentry/inode caching on multi-cpu machines / memory allocator configuration
While doing performance benchmarking on CPLEX, I ran across a strange issue. The details are posted in a blog: https://community.ibm.com/community/user/ai-datascience/blogs/xavier-nodet1/2021/07/08/...
0
votes
0
answers
2k
views
Unable to use perf to find L3 Cache miss rate
I am trying to get the L3 cache miss rate when I try to use perf. The following is the command I run:
perf stat -e instructions,LLC-load-misses,LLC-loads ./program <arg1> <arg2> <arg3&...
1
vote
1
answer
375
views
DDR memory errors or page cache corruption?
System: embedded, arm64 (4xCortexA53), 2GB LPDDR3, eMMC memory, Linux, kernel 5.4.17.
I am experiencing issues with random system crash, that in normal operation will happen every 2 days to every &...
0
votes
1
answer
165
views
Does cygserver improve Cygwin performance? If so, with what tasks?
I've read that cygserver can improve performance in some circumstances but I'm not really clear on how - or on how to know whether it's applicable to our use case.
Can anyone provide any insights?
1
vote
0
answers
76
views
Clean ways to prime the kernel inode cache after boot?
Various answers on various StackExchange sites cover parts of this topic, but I did not see an exact match for this scenario. How can you identify every mounted standard filesystem, and traverse all ...
0
votes
0
answers
5k
views
linux drop_cache using "echo 3 > /proc/sys/vm/drop_caches" not working as expected
In our production environment we are running drop cache command echo 3 > /proc/sys/vm/drop_caches to free the RAM. But also what I found is dropping caches is not a good practice and also it won't ...
0
votes
1
answer
2k
views
Is rsync really a culprit for causing low memory on our VM?
In a VM of 16GB RAM, we are running rsync as a cron job(for every 10 minutes) on our production to sync GBs of folder from AWS EFS to local storage. After few days of running we found that the VM is ...
1
vote
1
answer
72
views
Is file cache flushed automatically after time?
Let's say I copy a file using cp and the proccess returns immedietly because the file was written to cache.
Then I leave the PC alone for 1 hour. Nothing special running on it.
Is the cache flushed ...
-1
votes
1
answer
52
views
Does logging into a shell session build a cache of executables on the path which never gets updated? [duplicate]
I notice that when I compile a custom build of a packaged program stored in /usr/bin eg /usr/bin/emacs, which emacs shows the already existing executable at /usr/bin/emacs instead /usr/local/bin/emacs,...
1
vote
1
answer
764
views
Is it possible to load up a binary into ram, without executing it?
Like I will use google chrome whenever I use linux (most probably) But I don't want it to auto start when ever I open it. I could open it manually, but I have HDD so it is pain to load for the first ...
0
votes
2
answers
252
views
Search [not install] without syncthing on Fedora
I would want to know if it is possible to search packages in Fedora (using dnf) without it having to sync anything previously.
I've read Fedora wiki about rpm, but I don't think I understand properly ...
1
vote
1
answer
3k
views
Is it safe to clear the buffers and cache on a linux server
After reading this link: How do you empty the buffers and cache on a Linux system?, I know that there are some commands that can help us to empty the buffers and cache of the OS.
But I'm not sure if ...
2
votes
1
answer
1k
views
How to change the default BDI `max_ratio` and/or `min_ratio` for all devices?
I'm using a system with multiple storage devices with different write throughput. As explained in question Why were "USB-stick stall" problems reported in 2013? Why wasn't this problem ...
1
vote
1
answer
422
views
Flushing the filesystem cache with a frozen filesystem
I was under the impression that dropping the cache via the vm.drop_caches sysctl would drop all caches, but when I freeze a filesystem and drop the page cache, I can still read the directory:
# fgrep '...