Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1732913

Re: Detecting page cache trashing state

From Daniel Walker <danielwa@cisco.com>
Newsgroups linux.kernel
Subject Re: Detecting page cache trashing state
Date 2017-09-15 16:40 +0200
Message-ID <upZWF-4c0-5@gated-at.bofh.it> (permalink)
References <upMG5-3I4-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 09/14/2017 05:16 PM, Taras Kondratiuk wrote:
> Hi
>
> In our devices under low memory conditions we often get into a trashing
> state when system spends most of the time re-reading pages of .text
> sections from a file system (squashfs in our case). Working set doesn't
> fit into available page cache, so it is expected. The issue is that
> OOM killer doesn't get triggered because there is still memory for
> reclaiming. System may stuck in this state for a quite some time and
> usually dies because of watchdogs.
>
> We are trying to detect such trashing state early to take some
> preventive actions. It should be a pretty common issue, but for now we
> haven't find any existing VM/IO statistics that can reliably detect such
> state.
>
> Most of metrics provide absolute values: number/rate of page faults,
> rate of IO operations, number of stolen pages, etc. For a specific
> device configuration we can determine threshold values for those
> parameters that will detect trashing state, but it is not feasible for
> hundreds of device configurations.
>
> We are looking for some relative metric like "percent of CPU time spent
> handling major page faults". With such relative metric we could use a
> common threshold across all devices. For now we have added such metric
> to /proc/stat in our kernel, but we would like to find some mechanism
> available in upstream kernel.
>
> Has somebody faced similar issue? How are you solving it?


Did you make any attempt to tune swappiness ?

Documentation/sysctl/vm.txt

swappiness

This control is used to define how aggressive the kernel will swap
memory pages.  Higher values will increase agressiveness, lower values
decrease the amount of swap.

The default value is 60.
=======================================================

Since your using squashfs I would guess that's going to act like swap. 
The default tune of 60 is most likely for x86 servers which may not be a 
good value for some other device.


Daniel

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Detecting page cache trashing state Taras Kondratiuk <takondra@cisco.com> - 2017-09-15 02:30 +0200
  Re: Detecting page cache trashing state Zdenek Kabelac <zkabelac@redhat.com> - 2017-09-15 14:00 +0200
  Re: Detecting page cache trashing state Daniel Walker <danielwa@cisco.com> - 2017-09-15 16:40 +0200
    Re: Detecting page cache trashing state Taras Kondratiuk <takondra@cisco.com> - 2017-09-15 18:50 +0200
      Re: Detecting page cache trashing state Daniel Walker <danielwa@cisco.com> - 2017-09-15 19:40 +0200
  Re: Detecting page cache trashing state Michal Hocko <mhocko@kernel.org> - 2017-09-15 16:40 +0200
    Re: Detecting page cache trashing state Taras Kondratiuk <takondra@cisco.com> - 2017-09-15 19:30 +0200
    Re: Detecting page cache trashing state vcaputo@pengaru.com - 2017-09-15 23:20 +0200
      Re: Detecting page cache trashing state Taras Kondratiuk <takondra@cisco.com> - 2017-09-16 01:50 +0200
      Re: Detecting page cache trashing state Michal Hocko <mhocko@kernel.org> - 2017-09-18 08:00 +0200

csiph-web