What does Blink in-memory cache store? What does Blink in-memory cache store? google-chrome google-chrome

What does Blink in-memory cache store?


Blink in-memory cache works

Blink has four memory allocatorsPartitionAlloc, Oilpan, tcmalloc, and system allocator

So the team working on Chrome Blink has removed tcmalloc and system allocators from Blink

Blink (PartitionAlloc+Oilpan) is the second largest consumer of renderer’s memory which consumes 10 - 20% in typical cases and retains some of the memory in Discardable, CC and V8

Inside Blink, the primary memory consumers are:

  • Large StringImpls (used by JavaScript source code)
  • shared buffers (used by Resources)
  • Vectors and HashTables

The recommendation is to: "identify caches that have an impact on Blink’s total memory and implement purgeMemory() only on them."

  • Reducing the size of (DOM object) won’t have an impact
  • Discarding caches won’t affect in most cases

They are working on getting rid of "DiscardableMemory" items which will help to do things like forcibly detaching all layout objects which in turn will release memory retained by the layout tree.


I believe it is a result of optimization in chrome, and they make it verbose to you.

The files are always go into disk cache. And they also goes into memory, and flushed very soon.

Chrome is smart enough to ask running process that do they still have a loaded copy of them in memory before seek on disk.The step has a high hit rate, as those images/js are actively using for something.

You will not have any control how chrome manage TTL of them/capacity of memory could be used to keep blob hot. Chrome dev team doing quite a lots on dynamic tuning based on actual hardware capacity and system loading.

P.S. If you are asking for keep YOUR APP in memory. You are failing into Sun/Adobe way of evil: making their app DLL hot in memory(by tray icon/service) and slow everyone else down.

P.P.S. If it is the app end-user might want to use, use electron and follow Whatsapp/Slack/etc to build an app always running.