[haiku-bugs] Re: [Haiku] #7742: SWAP file constantly recreated, takes up alot of space

  • From: "kallisti5" <trac@xxxxxxxxxxxx>
  • Date: Thu, 30 Aug 2012 16:02:22 -0000

#7742: SWAP file constantly recreated, takes up alot of space
-----------------------------------------+----------------------------
   Reporter:  Cypress                    |      Owner:  axeld
       Type:  bug                        |     Status:  new
   Priority:  normal                     |  Milestone:  R1
  Component:  Preferences/VirtualMemory  |    Version:  R1/Development
 Resolution:                             |   Keywords:
 Blocked By:                             |   Blocking:
Has a Patch:  0                          |   Platform:  All
-----------------------------------------+----------------------------

Comment (by kallisti5):

 Confirmed...

 http://cgit.haiku-
 os.org/haiku/tree/src/system/kernel/vm/VMAnonymousCache.cpp#n1343

 Is there a swap setting?
   Init it.
 Does the swap setting not exist?
   size = (off_t)vm_page_num_pages() * B_PAGE_SIZE * 2;

 There are several issues with this:
   * The swap space can be very large without taking into account the
 filesystem size
   * The automatically chosen size is never written anywhere so the swap
 preference panel
     isn't aware of it.

 I'm seeing if there is a logical way to fix this without breaking anything
 :)

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/7742#comment:3>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: