Questions tagged [page-caching]

95 questions
2
votes
0 answers

C code to generate cache-misses in page cache?

A cache (also refer to as L1, L2 or L3 cache) is a SRAM near the CPU that help improving DRAM data access. In the other hand, a page cache (or disk cache) is a transparent cache for the pages originating from a secondary storage device such as a…
Fopa Léon Constantin
  • 11,863
  • 8
  • 48
  • 82
2
votes
2 answers

Page Cache and Mode Switch

I read that when an OS call is executed, the process only undergoes a mode switch as opposed to a context switch. From my understanding, this will elevate the privilege of the process and allow it to access the kernel code which is mapped into it's…
Phelodas
  • 3,853
  • 5
  • 25
  • 30
2
votes
2 answers

How to enable page caching in a functional test in rails?

Is it possible to turn on page caching for a functional test? The following didn't work: class ArticlesControllerTest < ActionController::TestCase def setup ActionController::Base.public_class_method :page_cache_path …
deb
  • 12,326
  • 21
  • 67
  • 86
1
vote
0 answers

How can I specify multiple address_space structs for an inode?

Say that two different processes each open two different files. Normally, they would each have their own inode and each inode would have their own struct address_space (this is the guy who remembers where the page cache pages are in memory). But,…
Robert Martin
  • 16,759
  • 15
  • 61
  • 87
1
vote
0 answers

boost mapped_file and page fault

I have done the following test using boost::iostreams::mapped_file and encountered some page fault (detected using getrusage). The page faults in step 4 are something I could not understand. the file is in disk, the size is exactly 1 page (4096…
doraemon
  • 2,296
  • 1
  • 17
  • 36
1
vote
0 answers

How can I keep file-backed executable pages evicted from RAM in Linux?

I tried using madvise(MADV_DONTNEED) and verified with /proc/pid/pagemap that pages are unmapped correctly. Although none of the functions in the page is accessed, some of the pages are mapped back pretty soon. From what I read, there are two lists…
pcp
  • 11
  • 1
1
vote
3 answers

Render a page as a saved HTML file using Rails 3.0?

I'm building a simple website generator application in Rails 3.0. I'd like a "publish" action in a controller that works just like an ordinary "show" action, but instead, saves a page as an HTML file in the "public" directory instead of displaying…
Daniel Kehoe
  • 10,952
  • 6
  • 63
  • 82
1
vote
0 answers

What does log flush rate in kafka means exactly?

Kafka write the logs to page cache and relies on os to flush it periodically to disk. Log flush rate metric in kafka measures the rate of that. The value is in time. So what does a 10 sec log flush rate means? I was load testing our kafka servers…
Nithin Mohan
  • 182
  • 4
  • 13
1
vote
1 answer

Can I prevent a file page eviction without using mmap?

My understanding is that I can keep a file in memory by doing an mmap on the file and then calling mlock on the mapped memory. Is there a way to keep file data in the page cache without doing an mmap? Specifically I want to ensure that when I'm…
Thomas Johnson
  • 10,776
  • 18
  • 60
  • 98
1
vote
0 answers

.htaccess RewriteCond to use cached pages if they exist is not working

I have a laravel application installed on a shared hosting package and I'm using https://github.com/JosephSilber/page-cache to cache pages. The cached pages are stored in the following server folder…
Eico
  • 11
  • 2
1
vote
2 answers

Is it a safe to use Direct-IO write and Page Cache read at the same time?

For instance, open a file twice, direct-io writes with one fd, and page cache reads with the other? How to define safe: Write some data from direct-io fd and then expect to read them immediately from page-cache fd
Bob
  • 105
  • 1
  • 12
1
vote
1 answer

Dynamic page caching failing in Rails 5

I'm updating a site from rails 4.2 to 5.1 In the previous setup I have page caching on a generated stylesheet (per tenant), all working perfectly. After upgrading to 5.1 this is no longer working Using latest version of…
Craig McGuff
  • 3,968
  • 6
  • 30
  • 35
1
vote
1 answer

cache issue on shopify app

We are developing an app which will display a button on product details page to perform some actions. We are using product.metaifields for displaying the same based on a condition. So basically the button display toggles depending upon the metafield…
akhil
  • 119
  • 7
1
vote
0 answers

Reserving a large virtual address space within a kernel module

In my research project, I have to reserve a large virtual memory address space inside a kernel module and handle memory accesses to that area (in a 64-bit system). I have modified do_page_fault function in arch/x86/mm/fault.c so that I can handle…
1
vote
0 answers

Is it possible to turn off automatic flushing within the page cache in Linux?

I am trying to write a C library, and, in short, I need to maintain a cache between the application and underlying non-volatile memory. Linux already does this with a page cache. It would be useful for me to use this instead of creating my own…
Eric Lee
  • 11
  • 4