37 votes
Accepted

What command can I use to clear the 'yum' cache, on Fedora 23 system?

According to the documentation for dnf clean: Performs cleanup of temporary files kept for repositories. This includes any such data left behind from disabled or removed repositories as well as for ...
jayhendren's user avatar
  • 8,384
31 votes

How to cache or otherwise speed up `du` summaries?

Common usage of du can be immensely sped up by using ncdu. ncdu - NCurses Disk Usage performs the du, caches the results and shows them in a nice command line GUI, somewhat comparable to du -hc -d 1 | ...
DennisH's user avatar
  • 411
31 votes
Accepted

Why does Chromium not cache DNS for more than a minute?

Chromium/Chrome does not cache DNS requests more than a minute indeed. Interestingly enough, from bugs-chromium - Issue 164026 - DNS TTL not honored from Apr 21 2011 The only DNS cache in the system ...
Rui F Ribeiro's user avatar
27 votes

Make Linux write to network filesystem concurrently with local disk reads

After some more investigation, it looks like this issue is less kernel related and more about how rsync and CIFS interact. As far as I can make out, what is happening is that when rsync closes the ...
Malvineous's user avatar
  • 6,903
24 votes
Accepted

30% of RAM is "buffers". What is it?

What is the difference between "buffers" and the other type of cache? Why is this distinction so prominent? Why do some people say "buffer cache" when they talk about cached file ...
sourcejedi's user avatar
  • 50.3k
23 votes

How to cache or otherwise speed up `du` summaries?

duc (see https://duc.zevv.nl) might be what you're looking for. Duc stores the disk usage in a optimized database, resulting in a fast user interface. No wait times once the index is complete. ...
Peter's user avatar
  • 231
19 votes

How to flush the DNS cache in Debian?

If using systemd-resolved as your DNS resolver (i.e. the hosts line of your /etc/nsswitch.conf file includes the word resolve and/or /etc/resolv.conf contains the line nameserver 127.0.0.53), then ...
JBat's user avatar
  • 209
17 votes
Accepted

How to clean yum cache for untracked repositories?

The yum clean all command actually suggests that you run rm -rf /var/cache/yum: » yum clean all Cleaning repos: amzn2-core amzn2extra-docker amzn2extra-epel copr:copr.fedorainfracloud.org:jdoss:...
Edward's user avatar
  • 2,519
15 votes
Accepted

Make debian "apt" (new apt-get / aptitude frontend) cache .deb files in '/var/cache/apt/archives/'

Create a /etc/apt/apt.conf.d/01keep-debs file with the following content: Binary::apt::APT::Keep-Downloaded-Packages "true"; Your *.deb should be kept in /var/cache/apt/archives/* directory. Or ...
GAD3R's user avatar
  • 66.8k
15 votes
Accepted

Why were "USB-stick stall" problems reported in 2013? Why wasn't this problem solved by the existing "No-I/O dirty throttling" code?

The 2013 article is wrong A mistake in LWN? Are you sure? Long queues in I/O devices, created by "background" writeback Limitations of "no-I/O dirty throttling"? Genuine reports of ...
sourcejedi's user avatar
  • 50.3k
13 votes
Accepted

What happens when a file that is 100% paged in to the page cache gets modified by another process

Continuous release then replaces /apps/EXE with a brand new executable. This is the important part. The way a new file is released is by creating a new file (e.g. /apps/EXE.tmp.20190907080000), ...
filbranden's user avatar
  • 21.8k
12 votes
Accepted

Is "Cached" memory de-facto free?

That view can be very misleading in a number of real-world cases. The kernel now provides an estimate for available memory, in the MemAvailable field. This value is significantly different from ...
sourcejedi's user avatar
  • 50.3k
11 votes

Can I safely remove /var/cache?

Found this post interesting in that I was looking to delete from /var/cache on Ubuntu 15.10 for disk space improvement, this is what I have found: /var/cache/apt cache files are removed after 'sudo ...
JeffreyJ's user avatar
  • 111
11 votes

Defer *all* disk writes, keep them in memory

If you want to prevent disk writes as much as possible, you can do this with Laptop Mode. One of the features of laptop mode is to allow a disk to spin down and to prevent the kernel from writing to ...
Gilles 'SO- stop being evil''s user avatar
11 votes
Accepted

What is an alternative for zcache?

Indeed zcache appears to have been discontinued, as it was removed from kernel 3.11 for being effectively obsolete. The commit message of zcache removal reads staging: zcache: delete it zcache ...
Marc.2377's user avatar
  • 1,112
11 votes
Accepted

Does a tmpfs (/dev/shm) use Linux Page Cache? If it does, then how?

Does a tmpfs use Linux Page Cache? tmpfs and the page cache are two sides of the same coin. As described in https://www.kernel.org/doc/Documentation/filesystems/tmpfs.txt (emphasis mine) tmpfs ...
frostschutz's user avatar
  • 49.2k
11 votes

How to clean yum cache for untracked repositories?

There is another option available: # yum --enablerepo='*' --verbose clean all Here it's explained: # man yum ... CLEAN OPTIONS The following are the ways which you can invoke yum in clean mode. ...
Martin Zeitler's user avatar
10 votes

How to check when yum metadata will expire?

yum repolist enabled -v contains this information (the metadata_expire configured and the last metadata update time) and pretty output. [root@localhost ~]# yum repolist enabled -v | grep 'Repo-name\|...
Matt Cover's user avatar
9 votes

How can I transparently cache any directory or mounted file system for reads and write back?

Try using catfs, a generic fuse caching filesystem I'm currently working on.
khc's user avatar
  • 211
9 votes
Accepted

Can I easily make a host "mirror" that caches downloaded Debian packages?

For having a local deb cache to server my Debian server farm, I actually prefer to use apt-cacher-ng (caching proxy server for software repositories) It is a proxy specially APT/deb aware, quite ...
Rui F Ribeiro's user avatar
9 votes
Accepted

Why does closing a file wait for sync when overwriting a file, but not when creating?

That sounds like a reminder of the O_PONIES fiasco, which just recently had its 11th birthday. Before ext4 came, ext3 had acquired a sort of a reputation for being stable in the face of power losses. ...
ilkkachu's user avatar
  • 139k
8 votes
Accepted

Checking a URL redirection from terminal

curl has the -L option -L, --location (HTTP) If the server reports that the requested page has moved to a different location (indicated with a Location: header and a 3XX response ...
Torin's user avatar
  • 1,703
8 votes
Accepted

kernel: FS-Cache: Duplicate cookie detected - what is this?

This appears to be working as intended. The Duplicate cookie detected errors are not indicative of a situation that requires action by the sysadmin. As has been pointed out on the upstream bug ...
MountainX's user avatar
  • 18k
8 votes
Accepted

What is good block size for file cache on Linux?

The device block size is the block size with what the system is talking with the HDD controllers. If you want to read/write the HDD, it happens so: Read: CPU -> HDD controller: "Please send me the ...
peterh's user avatar
  • 9,731
7 votes

How to read the local DNS cache contents?

If you are using nscd, you can view the contents (and possibly some other garbage), by showing the ASCII strings from the binary cache file. In Debian/Ubuntu, that file is /var/cache/nscd/hosts for ...
SteveK's user avatar
  • 171
7 votes
Accepted

dirty_ratio per device

dirty_ratio per device Q: Are there any ways to "whitelist" the fast devices to have more write cache? Or to have the slow devices (or remote "devices" like //cifs/paths) use less write cache? ...
sourcejedi's user avatar
  • 50.3k
7 votes

Why is my system using swap when RAM fills up with cache?

You can set the swappiness to 0.The Linux documentation says: "This control is used to define how aggressive (sic) the kernel will swap memory pages. Higher values will increase aggressiveness, ...
Ljm Dullaart's user avatar
  • 4,688
6 votes

how to check default cache mode for disk in kvm

Here is a way to check some default cache mode. Although it's also kind of documentation, it's "online" and you get the default cache mode of your current QEMU version. As @dokotr5000 said, it depends ...
lqu's user avatar
  • 171

Only top scored, non community-wiki answers of a minimum length are eligible