Handbook Talk:Parts/Blocks/DesigningPartitionScheme

From Gentoo Wiki
Jump to:navigation Jump to:search

Size of Gentoo repository

Talk status
This discussion is done as of 2017-05-17.

Consider the following sentence: "the Gentoo repository alone takes around 500 MB excluding the various sources that are stored in it."

On my system:

user $du -s --block-size=MiB /var/portage/repos/gentoo
1417MiB	/var/portage/repos/gentoo
user $du -s --block-size=MB /var/portage/repos/gentoo
1486MB	/var/portage/repos/gentoo

I think the size of the Gentoo repository should be updated. Fturco (talk) 18:11, 13 May 2017 (UTC)

First, I believe this statement is supposed to be excluding the distfiles and packages directories, so that would make the size much smaller:
user $du -s --exclude='distfiles' --exclude='packages' --block-size=MB /usr/portage
649MB   /usr/portage
This shows the in-text reference is still about 150MB off, so I will increase the reference to 650MBs and clarify distfiles/ and packages/ directories are not included in this disk space estimate. --Maffblaster (talk) 18:33, 15 May 2017 (UTC)
Well my number actually excludes distfiles and packages since I put them in /var/portage/distfiles and /var/portage/packages respectively, which are not subdirectories of /var/portage/repos/gentoo. Anyway I update my Gentoo repository with git, not rsync. sync-uri = https://github.com/gentoo-mirror/gentoo Fturco (talk) 07:27, 16 May 2017 (UTC)
That makes sense, then. git doesn't count because it only will grow larger more quickly with time (all history is saved), whereas rsync grows, but only as new packages get added to the repo. --Maffblaster (talk) 20:49, 16 May 2017 (UTC)
I forget about git history:
user $du -s /var/portage/repos/gentoo --exclude=.git --block-size=MB
636MB	/var/portage/repos/gentoo
So my size is pretty compatible with yours Fturco (talk) 10:08, 17 May 2017 (UTC)

Swap

Talk status
This discussion needs a response from its author.

The purpose of swap space is to provide disk storage to the kernel when internal memory (RAM) is under pressure. A swap space allows for the kernel to move memory pages that are not likely to be accessed soon to disk (swap or page-out), freeing memory.

That's not complete, I'll suggest the following

The purpose of swap space is to provide disk storage for dynamically allocated memory to the kernel when internal memory (RAM) is under pressure. A swap space allows for the kernel to move dynamically allocated memory pages, that have no permanent home on disk, to disk, freeing memory.

The kernel has other ways of 'swapping' too. Clean buffers can be dropped, dirty buffers can be flushed to disk before being dropped. Executable code can be dropped. All these things can be reloaded when required. They are never written to swap as they all have permanent locations on disk.

Not having swap at all robs the kernel of one of its options for swapping and puts pressure on the others as dynamically allocated RAM has to stay in RAM.

--NeddySeagoon (talk) 21:52, 3 May 2020 (UTC)

I think most of the information you provided is out of scope (it's not essential information for someone trying to install Gentoo).
Section What about swap space? has changed a lot since you posted this discussion. Are you satisfied with the current state?
Waldo Lemmer 14:01, 11 May 2024 (UTC)