[ros-bugs] [Bug 924] Please implement swap file settings dialog.

ReactOS.Bugzilla at reactos.org ReactOS.Bugzilla at reactos.org
Fri Dec 2 18:19:29 CET 2005


http://www.reactos.org/bugzilla/show_bug.cgi?id=924





------- Additional Comments From tiago.freire at gmail.com  2005-12-02 18:19 CET -------
It is true that we can't divine what the user wants, but don't even have to. We
only have to give a reasonable value for them to start with. By looking around,
every desktop distribution gives swap space to the user. Advanced users are the
ones who will want to change to muck with swap configuration. Joe Sixpack and
Auntie don't even know what it is.

I propose a gradual solution, feature-completing in several steps:     
     
1) The no-brainer: change 1 SINGLE LINE in the default registry, to read 
"c:\reactos\pagefile.sys 16 256". That will make the system much more useable
for starters. Only people trying to install huge stuff or running huge software    
will run into problems. You devs know that ROS has plenty of really really ugly
hacks to work, like stubbing functions returning always the same value,
sacrificing virgins on every boot etc. Changing a registry value into a valid
setting cannot be that ugly, and neither can be considered 'wrong' per se. And
it won't hurt users who don't need swap at all.
    
2) Making it better: Set a sensible default on installation. One possible    
algorithm:    
2.1) Look at the size of the partition ROS is being installed on.    
2.2) Look at memory size.    
2.3) Minimum swap value: memory + swap must add to 512 MB (why? because it's   
reasonable. 384 or 256 MiB are good values too, but for smaller programs). if   
memory is 512MB or more, minimum size is 1 MiB.    
2.4)Maximum value: Swap should not take more than 10% of free disk space if   
possible, or 1 GiB, whichever is smaller.    
2.5) If 10% of free space is less than 256MiB, see if 256 Mib fits taking at   
most 25% free space. If it does not fit, try 192, 128, 64, 32, 16, or simply   
disable it and warn the user.   
2.6) If minimum value is greater than maximum value, min = max.    
   
2.7) Side note: ROS should recomend a reasonable disk size to accomodate ROS +    
Swap + Programs (IMO at the very least 1 GiB).    
   
3) Another thing windows does: When you are running out of swap space, but   
BEFORE it happens, say when it's 90% full, RoS will warn 'You are running out   
of swap space! Repent or die! Do you want RoS to increase the swap size?'   
How to resolve the swap increase:   
3.1) Look at free disk space.  
3.2) Ask the user whether he wants to let RoS increase the file size for him.  
3.3) If the user agrees, try to add 64 MiB to the swap. If it does not fit,  
try 32 and 16, or give up.   
3.4) Regardless of changing the swap size or not, see if you have at least 256  
MiB of free disk space. If not, warn the user that there is too little free  
disk space, and that he should backup/remove files and/or uninstall some apps.  
    
4) Implement interface mentioned on Comment #4 so that the user can set the 
minimum and maximum values, on which disk the swap file(s) will reside, how 
many swap files will be there, which one has priority, etc.

-- 
Configure bugmail: http://www.reactos.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
You are the QA contact for the bug, or are watching the QA contact.


More information about the Ros-bugs mailing list