Date: Tue, 13 Jan 2015 01:41:51 +0000 From: RW <rwmaillists@googlemail.com> To: freebsd-questions@freebsd.org Subject: Re: Calculating Dirty Memory Message-ID: <20150113014151.742c1aa1@gumby.homeunix.com> In-Reply-To: <54B45465.7040501@gmail.com> References: <54B45465.7040501@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 12 Jan 2015 15:10:29 -0800 Lacey Powers wrote: > Hello Everyone, >=20 > I was working on trying to improve some database benchmarking tools > for PostgreSQL, to work better on FreeBSD. >=20 > One of the things that the tools do under Linux is > read /proc/meminfo, and grab the value of the Dirty parameter, which > is this: >=20 > "Dirty ? The total amount of memory, in kilobytes, waiting to be > written back to the disk." according to the CentOS documentation and > other sources. AFAIK the word "dirty" can refer to any page that isn't synchronized with it's backing store, including swap-backed memory that may never be written to disk. > Poking around the FreeBSD documentation, Google, and sysctls, I came > to this calculation: >=20 > (vm.stats.vm.v_page_size * vm.stats.vm.v_inactive_count) / 1024 =3D=20 > Inactive (Dirty) kB (page size in bytes *number of pages) / 1024 v_inactive_count includes dirty and clean pages.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150113014151.742c1aa1>