View Single Post
  #3   (View Single Post)  
Old 11th October 2008
ducu_00 ducu_00 is offline
Real Name: Alexandru Cristea
Port Guard
 
Join Date: May 2008
Location: Romania
Posts: 12
Default

Quote:
2. Why counting v_cache_count twice: one time for the free memory and one time for the cached memory?
The reasons are:
- the 'cached' vm objects count as free memory because they could be immediately used for allocation, being clean;
- the 'cached' vm objects count as cached memory because they contain data existing on the backing store (disk, etc.);
- the 'inactive' vm objects are dirty (i.e their contents were not flushed to the backing store), so they _could not_ be used immediately for allocation but they count as cached memory, because they contain data which will exist (they _must_ be flushed) on the backing store.

These being said, there is no reason to sum 'free memory' and 'cached memory' on FreeBSD.

This is not the case under linux, where:
available memory <- free pages + cached pages + buffer cache

As far as I understood, in FreeBSD the vfs.bufspace could not be freed so it never counts as available memory.
Reply With Quote