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

  • From: "kallisti5" <trac@xxxxxxxxxxxx>
  • Date: Tue, 04 Sep 2012 12:17:11 -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:  1                          |   Platform:  All
-----------------------------------------+----------------------------

Comment (by kallisti5):

 Ok... here are some ideas for a more long-term fix:

  * If swap is undefined (we can call this "automatic" the future)
    * Swap size defaults to (ram * 2)
    * If (ram * 2) is > 25% of the freespace, use the 25% of the free space
 as swap
      * If 100MB free, top swap is 25MB
      * If 1GB free, top swap is 250MB
      * If 10GB free, top swap is 2.5GB (this is however limited by the
 (ram * 2))
  * If swap is defined:
    * If swap larger then free space
      * Log this event
      * Set swap to 98% of free space for this boot only.
        * We could have a low disk space notification that would give an
 overall alert that freespace is low.

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

Other related posts: