Tag Info

New answers tagged

1

I do not have access to dnsmasq but according to this thread titled: dnsmasq is it caching? you can send the signal USR1 to the dnsmasq process, causing it to dump statistics to the system log. $ sudo pkill -USR1 dnsmasq Then consult the system logs: $ sudo tail /var/log/syslog Jan 21 13:37:57 dnsmasq[29469]: time 1232566677 Jan 21 13:37:57 ...


-1

If you want to force a file to always use O_DIRECT you can mark it as so in the extended attributes with chattr +S $file: man chattr: When a file with the S' attribute set is modified, the changes are written synchronously on the disk; this is equivalent to the sync' mount option applied to a subset of the files.


7

Potential Method #1 - F_DROP_CACHES I found a method from 2012 that discusses a proposed patch to the Linux kernel in this mail thread titled: Re: [RFC Patch] fs: implement per-file drop caches. excerpt Cong> This is a draft patch of implementing per-file drop caches. Interesting. So can I do this from outside a process? I'm a SysAdmin, so my ...


1

Use dd to read a section of a file without reading everything preceding it.  For your example (reading bytes 4,120,000-4,120,400) you could use dd bs=400 skip=10300 count=1 if=your_input_file of=your_output_file This defines a logical block size of 400 bytes, and then tells dd to skip the first 10300 “logical blocks” of the input file (if).  10300 is ...


0

Expanding @geekosaur's answer you can force the use of O_DIRECT by using LD_PRELOAD and the program here: http://arighi.blogspot.com/2007/04/how-to-bypass-buffer-cache-in-linux.html That code forces O_DIRECT for all files. However, simply adding some more strncmp logic in __do_wrap_open you can selectively apply O_DIRECT. Disclaimer: I have not tested ...


1

The linux kernel does cache management automatically. Everthing that is loaded into RAM, stays there until another process needs RAM and there is no more available. So in the linux kernel RAM should always be full. You system has 128GB of RAM, thats more than enough for a 100-1000MB file. To load a huge file into RAM just cat it: cat huge_file > ...


0

You need to enable the headers module, assuming debian: sudo a2enmod headers then for changes to take effect, you must reload or restart apache: sudo service apache2 reload If this does not have an effect, there is also several other parts of your configuration that may override the Cache-Control directive, for example in a .htaccess served from your ...


0

We have set up flashcache to write back aggressively. We see dirty block counts burst up to several tens of thousands, but it rapidly works its way down to a few thousand or even a few hundred once things calm down. Here are our settings: dev.flashcache.sdb1+md0p3.cache_all=1 dev.flashcache.sdb1+md0p3.clean_on_read_miss=0 ...


1

One installs memcached to the compute node or webserver -- that way it can cache queries before they'd have to hit the wire. Your apache instance will be faster if (eg) php can hit a rich cache before going out on networking. It's better to devote spare memory on the db box to the db instance anyway, so that it can use as much mem as possible and buffer ...


0

As user johntex has noted in a comment to the answer by user Tobu, the simplest practical action in Bash is to rehash just your program: hash svnsync That's all.



Top 50 recent answers are included