The tag has no wiki summary.

learn more… | top users | synonyms

65
votes
2answers
13k views

How do I clear Bash's cache of paths to executables?

When I execute a program without specifying the full path to the executable, and Bash must search the directories in $PATH to find the binary, it seems that Bash remembers the path in some sort of ...
26
votes
3answers
2k views

Does grep use a cache to speed up the searches?

I have noticed that subsequent runs of grep on the same query (and also a different query, but on the same file) are much faster than the first run (the effect is easily noticeable when searching ...
18
votes
4answers
20k views

Can I safely remove /var/cache?

I am running out of disk space and noted that I have a large /var/cache directory. Can I safely remove this? (using Arch Linux, BTW).
17
votes
7answers
5k views

Linux equivalent to ReadyBoost?

Is there a kernel module or some other patch or something similar to Windows' ReadyBoost? Basically I'm looking for something that allows disk reads to be cached on a Flash drive.
15
votes
4answers
14k views

Where are stored the Youtube videos cache in Google Chrome?

Google Chrome used to store YouTube videos in /tmp, but not for the last two versions. Nor could I find those files in ~/.cache/google-chrome. Googling for this query produces Windows-specific ...
13
votes
1answer
7k views

How do you empty the buffers and cache on a Linux system?

Prior to doing some benchmarking work how would one free up the memory (RAM) that the Linux Kernel is consuming for its buffers and cache?
13
votes
1answer
2k views

Is disabling barriers for ext4 safe on a laptop with battery?

The manual page says about the barrier option for ext4: Write barriers enforce proper on-disk ordering of journal commits, making volatile disk write caches safe to use, at some performance ...
13
votes
2answers
784 views

Why does Linux purge the memory cache when it is nearly full?

Here's what the memory graph looks like on a VPS running CentOS with 512MB of RAM and nginx/php-fpm/mysqld serving (mostly static) content to a couple thousand visitors per day. (those are days on ...
9
votes
4answers
1k views

Is there a way to sync only one partition?

Is there a way to sync only one partition instead of all partitions? Something like "sync /dev/sdc1".
8
votes
5answers
5k views

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

We have a large file system on which a full du (disk usage) summary takes over two minutes. I'd like to find a way to speed up a disk usage summary for arbitrary directories on that file system. For ...
8
votes
1answer
282 views

Linux cache evictions

Looking at how the VFS cache on my Linux machine behaves, I can see that even when effectively idle (crond and most other daemons stopped, interfaces down) the amount of free memory gradually ...
8
votes
2answers
958 views

lshw and lscpu disagree on caches - which is right?

I am trying to find out specifics about caches (in particular which caches are shared between cores and which are not) and have stumpled onto a inconsistency. sudo lshw says *-cache:0 ...
7
votes
5answers
13k views

DNS queries not using nscd for caching

I'm trying to use nscd (Nameservices Cache Daemon) to cache DNS locally so I can stop using Bind to do it. I've gotten it started and ntpd seems to attempt to use it. But everything else for hosts ...
7
votes
2answers
1k views

How to time grep commands accurately?

I want to compare the speed of these two commands: grep pattern1 files* grep pattern2 files* Unfortunately, the first grep reads much of files* into memory buffers, so the second grep runs ...
7
votes
3answers
494 views

Why does it makes sense to cache swap?

It sounds quite counter-productive to me to cache pages that are swapped out. If you swap pages in, what is the advantage to first cache them in memory, only to have to than move them to the right ...
6
votes
1answer
659 views

How to configure Linux to cache file metadata in preference to contents?

I’d like to set the system up to use most RAM for file system metadata caching, but only a reasonably small amount for read/write caching and prefetching files. Ideally I would like to be able to ...
6
votes
1answer
15k views

How to read the local DNS cache contents?

I know that on Windows I can issue ipconfig /displaydns and I see the local DNS's cache content. How can I list the DNS's cache content in Linux? I would like to get as much as cross-distro solution ...
5
votes
2answers
762 views

what does it mean by cold cache and warm cache concept?

I read a paper and it used terms “cold cache” and “warm cache”. What does it mean by cold cache and warm cache concept? I visit this but I need something more.
5
votes
2answers
5k views

Cleancache vs zram?

I have an old laptop here with only 512 MB of RAM. Since a few kernel releases, I am using zram to convert 256 MB of it to a compressed ramdisk which is then used as swap. This has proved to be very ...
5
votes
1answer
8k views

Is there a command which will force Linux to flush cache of one file on an NFS share?

Related to this question on StackOverflow, I am wondering if there is a way for me to flush the NFS cache / force Linux to see the most up-to-date copy of a file that's on an NFS share. I have a ...
5
votes
2answers
489 views

Find/ls caching

It seems as though the first time I run find or ls on a directory, it takes a while to work. But, each time thereafter, it is fast, as though a list of the directory's contents has been cached or ...
5
votes
1answer
369 views

Why doesn't dm-crypt handle write barriers properly?

One of the well-known properties of dm-crypt is that it does not handle write barriers properly and hence it requires turning off on-drive write cache to prevent corruption of filesystems. As far as I ...
5
votes
1answer
149 views

How to use an SSD for caching, so my hard disks can spin down?

I've got a file server with a bunch of disks running together in a BTRFS pool and want to add an SSD for caching. I'm not mainly after speeding up things, but want to catch the regular small accesses ...
5
votes
0answers
263 views

Cleanup of temporary file ~/.cache/duplicity/temp failed

Often when I run Duplicity I see an error message like this at the end of the run: Cleanup of temporary file ...
4
votes
4answers
421 views

If I have an SSD and a hard disk in a system, can the SSD act as cache for the hard disk?

Say I have some partitions; one on a SATA drive and one on an SSD. I want to create a "virtual" hybrid disk. Is this possible?
4
votes
2answers
403 views

Are there any ways or tools to dump the memory cache and buffer?

As the title, I want to check out what files are loaded in buffer. Just so it's clear, the buffers & cache I'm referring to are what show up when you run the free -m command: $ free -m ...
4
votes
3answers
381 views

Does bash have a built in caching command available (sort of like mktemp or sponge)?

I'm using the amazon ec2 command line tools, and the ec2-describe-instances tool is a little painful because of the 2-5 seconds it requires to make the request and display the output. I'm looking ...
4
votes
1answer
568 views

How can I tune Ubuntu for running from a flash drive?

I feel like this is a bit of a duplicate of this other question about making caching more aggressive, but I tried a lot of the suggestions there and I just can't figure out why I'm having trouble. My ...
4
votes
3answers
28k views

How to flush local DNS cache in CentOS

(I am aware that googling this question gives me tons of stuff, but literally none worked) I'm looking for a way to flush the local DNS cache on a Centos 6 system, it is not running any DNS server or ...
4
votes
1answer
276 views

Limit disk buffer usage in SLES 11SP2 to allow more efficient memory overcommit on esxi host

When running VMs on an ESXi host, you can overcommit the memory. Example: host == 20GB physical RAM The amount of RAM allocated to each VM is VM1 == 10gb VM2 == 10gb VM3 == 10gb VM4 == 10gb The ...
4
votes
1answer
590 views

Drop a specific file from the Linux filesystem cache?

I know I can drop everything from the Linux filesystem cache, but is there a way to drop just one specific file? Or prevent a file from being cached? Or tell a process not to cache any files it ...
4
votes
2answers
354 views

Does sysctl kern.bufcachepercent not work in OpenBSD 5.2 above 1.7GB?

I run OpenBSD/amd64 5.2 on a system with 12GB of RAM, and I want to use about 6GB to 8GB for filesystem caching. By default, 5.2 amd64 comes with sysctl kern.bufcachepercent set to 20 (20%); I've ...
4
votes
1answer
2k views

What options are there for tuning Linux file system caching?

What various types of caching are possible in the ext3 file system and how can their values be changed using system calls or other methods? I don't want to use commands or tools.
3
votes
2answers
2k views

/proc/cpuinfo “cache” category: L1, L2 or total?

When I look in /proc/cpuinfo, one of the lines tells me I have 6144 KB of cache. Is this L1 cache, L2 cache, or the sum of both of them? In any case, how do I find out how much L1 and L2 cache my ...
3
votes
2answers
387 views

`free`: output format

I use free to get the amount of free space on some of my servers. Its output is something like: $ free -m total used free shared buffers cached Mem: 374 ...
3
votes
2answers
75 views

How to get size of data that haven't been written to disk yet?

In some programs percentage of copying large files get to 100% very fast and then I'm waiting much more before it goes next step. It's caused by buffer. How to I see amount of data that are going to ...
3
votes
3answers
132 views

Speed up copying 1000000 small files

I have 1000000 4-20 kb files in a dir. I need to copy that dir. But it seems I have to do a seek for each files so this takes quite a while. Is there a way in which I can speed this up? I am ...
3
votes
2answers
453 views

Memory management, bias to swapping

I was having 768 MB RAM. In a general day MySQL was using 100-180 mb of RAM and MySQL was swapping 80-120 mb. I was having 50-60 mb free RAM. So I thought I should upgrade. Then I upgraded my RAM ...
3
votes
2answers
319 views

linux disk caching affects access times reported by stat?

On Ubuntu 12.04 I did the following stat a file cat the same file stat the file again cat the file again after 5 min stat the file The access time reported at 3. reflects the point at which 2. was ...
3
votes
1answer
2k views

What is the buffers column in the output from free?

These questions briefly list the format of the free command, noting that buffers is kernel memory that must be written out to disk and cache is file data that does not need to be written disk. On my ...
3
votes
1answer
4k views

How can I tell which version of Varnish I'm running?

How can I get the installed Varnish cache version string from the command line?
3
votes
1answer
102 views

Is no caching mode page a serious error?

My server log displays the following error messages in RED: kernel: sda: sda1 sda2 kernel: sd 0:1:0:0: [sda] No Caching mode page found kernel: sd 0:1:0:0: [sda] Assuming drive cache: write through ...
3
votes
1answer
107 views

Ubuntu filesystem buffers/cache always empty

I have a virtual server with ubuntu 10.04.4 LTS and plesk (preinstalled by hosting company). Now i have seen that the buffers/cache are always empty. Current uptime is 22 days. free and htop shows the ...
3
votes
1answer
483 views

How to guarantee writes are physically committed before reported completed?

When my system boots, as it probes the external, USB-attached hard drive, I get the message Assuming drive cache: write through in the dmesg output, tagged with the device name of the external drive. ...
3
votes
1answer
1k views

AIX 6.1 JFS2 Oracle files system, not using much files system cache

I am running Oracle database on AIX 6.1, Oracle using JFS2 file systems. Maxperm is set to 90%. This is busy database server, but it is not using the file system cache (less then 2%). The system has ...
3
votes
1answer
344 views

SSD as a read cache for FREQUENTLY read data

I'm looking for ways to make use of an SSD to speed up my system. In “Linux equivalent to ReadyBoost?” (and the research that triggered for me) I've learned about bcache, dm-cache and EnhanceIO. All ...
3
votes
1answer
617 views

Measure hard-disk read(), write() speed without caching in QNX 6.5

I am working on QNX 6.5 Operating system. QNX 6.5 supports POSIX APIs. I am trying to build an application which is used to evaluate performance of hard-disks. My application will read/write/read ...
3
votes
2answers
422 views

iptables routing marked packets from router to PC and routing them back to router

I'm trying to do deep packet inspection on HTTP packets. The purpose of this is to collect HTTP payload data and then create some proxy/cache-independent reports. Following this, the idea is to ...
3
votes
1answer
59 views

Artificially prime buffer cache?

Is it beneficial to artificially prime the buffer cache when dealing with larger files? Here's a scenario: A large file needs to be processed, line by line. Conceptually, it is easy to parallelize ...
3
votes
0answers
28 views

Figuring out physical cache layout in FreeBSD

I'm trying to figure out they physical cache layout of my CPU in FreeBSD 10. I see the following from sysctl kern.sched.topology_spec kern.sched.topology_spec: <groups> <group level="1" ...