Refracta Development, Scripts, etc.
Post a reply
Mark9

- Mark9
- Posts: 22
- Joined: Thu Feb 02, 2017 4:23 pm

## Automatic swap file/swap partitioning.

Fri Feb 17, 2017 11:58 pm

Testing memory usage with my loaded remastered live DVD of Debian-Mate.
By running FF, Caja, and VLC playing a movie file from my hard drive; my memory usage went nearly to 1.5 Gb. I bet I could run this memory usage up to 2 Gb fairly easily.
Not an issue where I have 4 Gb; it is unlikely I would come near to using 4 Gb, so no swap partition is needed and only a small swap file would be needed; if software expects to see a swap.
Using this data I will make suggestions for the installer and for running the live DVD.
If a computer has 4 or more Gb ram, then only a small, almost symbolic, swap file need be created. Do not bother to search for a swap partition for running live nor for installations.
If 2 to 4 Gb ram, create a larger swap file for the install, say 500 Mb. Running live may be ok with 2 Gb??? but search for and use a swap partition, if exists, just in case.
If 1 to 2 Gb of ram, search for and mount a swap partition, both for running live and during installs. If no swap partition is found, create a 1.5 Gb swap file for the install. Running live may fail if only 1 Gb ram, with no swap partition.
If under 1 Gb of ram, automatically search for and mount a swap partition, both for running live and for installations. Without a swap partition, running live DVD is very likely to fail. Installer should mount and use a swap partition of 2 Gb, or create a swap file same size, if no swap partition is found.
Something like this could be used for rules to automate the installer, to ask less questions, and be certain to have sufficient memory.
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: Automatic swap file/swap partitioning.

Sat Feb 18, 2017 5:17 pm

Memory usage will vary greatly from one setup to another. I have 2G ram, and I can have a browser with several tabs, a couple of file managers and terminals open, watch two movies and listen to an audio file all at once, and I'm using a 256MB swap file. I don't run into problems until I start running two VM's. That's with xfce.
The systems in the VM are running xfce, and I give them 384MB each. That's not enough to run a browser, but it's more than enough to build a system and make an iso. I've run Centos 6 with Gnome2 in a VM, and I have to give it 640MB to get it to work.
I tend to leave decisions up to the user. If someone wants a swap partition, they can make one. The installer does not create any partitions - that must be done by the user in gparted or cfdisk/cgdisk. If you're installing to a new hard drive or one that doesn't have a swap, and you want a swap partition, select "use existing swap" at the options menu, then create one in gparted. The partition will exist in time for the installer to find it and use it.
As for auto-sizing the swapfile, I'll think about that. At the very least, I could make it more obvious that you can change the size of the swapfile, maybe even do it from within the gui.
Mark9

- Mark9
- Posts: 22
- Joined: Thu Feb 02, 2017 4:23 pm

## Re: Automatic swap file/swap partitioning.

Wed Feb 22, 2017 11:29 pm

Just to be clear, the memory usage I showed above is while running my live DVD.
I can run much more with the remaster installed to hard drive. Running several more applications, than above, with the remaster installed, I still use about 500 Mb less ram.
Just bouncing the ideas off of you. I get that you want everyone to have the choice to setup their computers as they want. I also was thinking about how you wanted the CLI installer to ask as few questions as possible.
I thought therefore, there may be ways to have the installer make decisions based on the capabilities of the computer being installed to; good for those who can't or do not want to make these setup decisions. It would also be nice to maintain the options to do everything manually.
Just ideas; your the programmer, and clearly a good one. I am just a mechanical genius who is very fussy about how my desktop looks and functions.
I have noticed some distros make automatic decisions during installation about how much eye candy is turned on. based on the computer capabilities. Thought partitioning and swap sizes could also be automated as an option?
I am not asking for you to implement this fsmithred, just brainstorming.
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: Automatic swap file/swap partitioning.

Thu Feb 23, 2017 2:53 am

Brainstorming is good. If people didn't give me their ideas, a whole lot would be missing from the tools and from the isos. Thanks.
FOSSuser

- FOSSuser
- Posts: 29
- Joined: Mon Dec 05, 2016 7:19 pm

## Re: Automatic swap file/swap partitioning.

Thu Feb 23, 2017 12:49 pm

If you're not on a laptop, you don't need swap, unless you have less than 1GB, & that is just to keep Firefox happy.
(Firefox loads about 600mb when it starts up. )
If you use the sleep modes of a laptop, then you require swap of at least the equivalent of your ram.
Most of the ram usage you see is cached data.
I'm not averse to having a newbie type of install; as long as there is an override for others to install how we want to.
golinux

- golinux
- Posts: 663
- Joined: Thu Nov 08, 2012 1:23 am

## Re: Automatic swap file/swap partitioning.

Thu Feb 23, 2017 2:46 pm

> FOSSuser wrote:(Firefox loads about 600mb when it starts up. )

Huh? I'm still using the last Iceweasel but it loads less than 300mb at startup. Even my FF 45 that's been running for days is just over 700mb atm.
Post a reply
Jump to:

Powered by phpBB © phpBB Group.

phpBB Mobile / SEO by Artodia.