[Discuss] Discuss Digest, Vol 94, Issue 3

Mike Small smallm at sdf.org
Sat Mar 9 11:45:02 EST 2019


Mayuresh Rajwadkar <m.m.rajwadkar at ieee.org> writes:

> Ubuntu Install & Swap & Partitions.
>
> I understand that the typical Linux kernel takes up about 1GB of RAM, so
> assume it will run easily in 2GB of RAM
> If your host station has  16GB or more of RAM, for most applications you
> really dont need any swap partition.
>

16GB is a lot of RAM, but if I had it I'd still create a swap partition
of some size. Linux will put it to good use if you have it:

    The casual reader may think that with a sufficient amount of memory,
    swap is unnecessary but this brings us to the second reason. A
    significant number of the pages referenced by a process early in its
    life may only be used for initialisation and then never used
    again. It is better to swap out those pages and create more disk
    buffers than leave them resident and unused.

    -- https://www.kernel.org/doc/gorman/html/understand/understand014.html#chap:%20Swap%20Management

An interesting bug report on this topic:

https://github.com/kubernetes/kubernetes/issues/53533

Scroll down to anguslees's comment on Oct 5, 2018. He discusses similar
reasons to what I quoted above for why it's good to get the inactive
pages out to swap.

But then the question is what size should the swap partition be?  I
recall seeing advice that the 2 x RAM recommendation is outdated, but
when I was looking up the other info above, I noticed this blog about
SAP and Linux. According to the author, SAP also feels that 2 x RAM is
obsolete, but their cut off is way higher than I would have thought
(granted, I'm not trying to run SAP software), recommending 2 x RAM if
you have 32 GiB or less:

http://sapbasiskishore.blogspot.com/2014/08/note-1597355-swap-space-recommandation.html

Oh, in case you didn't follow the link and need to know, 320 GiB of swap
is the most you should ever need, even if you have more than 8 TiB of
RAM. Phew.

- Mike

>
>
> On Fri, Mar 8, 2019 at 12:00 PM <discuss-request at blu.org> wrote:
>
>> Send Discuss mailing list submissions to
>>         discuss at blu.org
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>>         http://lists.blu.org/mailman/listinfo/discuss
>> or, via email, send a message with subject or body 'help' to
>>         discuss-request at blu.org
>>
>> You can reach the person managing the list at
>>         discuss-owner at blu.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of Discuss digest..."
>>
>>
>> Today's Topics:
>>
>>    1. Re: Ubuntu Install Question (Mike Small)
>>    2. Re: Ubuntu Install Question (Rich Pieri)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Thu, 07 Mar 2019 20:50:03 +0000
>> From: Mike Small <smallm at sdf.org>
>> To: Jerry Feldman <gaf.linux at gmail.com>
>> Cc: Boston Linux and Unix <discuss at blu.org>
>> Subject: Re: [Discuss] Ubuntu Install Question
>> Message-ID: <chxh8ceflz8.fsf at sdf.org>
>> Content-Type: text/plain; charset=utf-8
>>
>>
>> That's good to hear. The parted developers certainly don't lack in
>> bravery or ambition when it comes to what features to try to implement
>> and maintain. In a different context while tracking down a bug I noticed
>> that parted probes filesystem superblocks checking for everything from
>> nilfs2 to amiga's filesystem to Apple's HFS. I'd never even heard of
>> nilfs. All useful features to someone I guess.
>>
>> Jerry Feldman <gaf.linux at gmail.com> writes:
>>
>> > Over the years running installfests I have used a number of partitioning
>> > tools. Today, GPARTED is included in most Linux distros and is used by
>> the
>> > installers, I generally trust both the Fedora installers (anaconda) and
>> the
>> > Ubuntu installers to shrink windows partitions. In recent years I have
>> not
>> > had an issue. Sometimes I may boot live USB and use gparted to resize the
>> > partitions. Then I run Windows to double check.
>> >
>> > On Thu, Mar 7, 2019 at 3:28 PM Mike Small <smallm at sdf.org> wrote:
>> >
>> >>
>> >> Hi Ivan,
>> >>
>> >> The Linux partitioning tools (that the installation programs use) claim
>> >> to be able to shrink existing partitions to make room for a Linux
>> >> partition, but I've never trusted that. Could be paranoia on my
>> >> part. I'd be especially careful when Windows is involved, but I have no
>> >> recent experience with it. If it were me I'd put Ubuntu on the 2nd drive
>> >> and leave Windows with what it originally had. I haven't installed
>> >> Ubuntu in this situation, so I don't know how much help it gives you,
>> >> but I believe the boot loader (Grub) has the ability to do this. Someone
>> >> else could give better advice here.
>> >>
>> >> As a general comment, whenever you partition, make filesystems or
>> >> install 2nd systems, you want to know in advance that if you make a
>> >> mistake what you lose is no big deal. For most people that means that
>> >> everything you care about (including what you didn't remember you had
>> >> and would care about) needs to be backed up and the back up confirmed to
>> >> some degree to be recoverable. Another answer I often flirt with is to
>> >> know in advance that I'll be able to shrug off accidents thinking,
>> >> "well, I didn't really need that anyway -- how many times do I need to
>> >> listen to Cortez the Killer or all those other old songs anyway," but
>> >> now that I have child photos that's a less interesting disaster recovery
>> >> strategy than it used to be.
>> >>
>> >> - Mike
>> >>
>> >> Ivan Klimov <iklimov87 at gmail.com> writes:
>> >>
>> >> > Hi Mike,
>> >> >
>> >> > Thank you for the clarification.
>> >> >
>> >> > I thought of swap partition to be more for temp file storage/exchange.
>> >> > Thank you for introducing the concept. When you said shuffle parts of
>> >> > programs... I have not done it and do not envision how it is done.
>> Maybe
>> >> it
>> >> > is an advanced concept for me;) I have installed FULL programs on
>> >> different
>> >> > partitions -never parted programs out.
>> >> >
>> >> > Do you think it is a good idea to partition 50/50 SSD where windows
>> 10 is
>> >> > already installed ?.. and install Ubuntu on the second partition ? Is
>> it
>> >> > safe ?
>> >> >
>> >> > Best,
>> >> > Ivan
>> >> >
>> >> >
>> >> >
>> >> > On Thu, Mar 7, 2019, 12:10 PM Mike Small <smallm at sdf.org> wrote:
>> >> >
>> >> >> Ivan Klimov <iklimov87 at gmail.com> writes:
>> >> >> ...
>> >> >> > Excerpt from the post:
>> >> >> > On this step we?ll create our custom partition layout for Ubuntu
>> >> 18.04.
>> >> >> On
>> >> >> > this guide will recommend that you create two partitions, one for
>> root
>> >> >> and
>> >> >> > the other for home accounts data and a partition for swap (use a
>> swap
>> >> >> > partition only if you have limited RAM resources or you use a fast
>> >> SSD).
>> >> >> >
>> >> >> > My thought was
>> >> >> > DISC C (SSD):
>> >> >> > Partition 0:
>> >> >> > Win10 : ~60 GB SSD
>> >> >> > Partition 1:
>> >> >> > UBuntu: ~ 200 GB SSD
>> >> >> >
>> >> >> > Disc D:
>> >> >> > Partition 2:
>> >> >> > 650 GB HD
>> >> >> > Partition 3:
>> >> >> > 350 GB HD
>> >> >> >
>> >> >> > home accounts data and a partition for swap (use a swap partition)
>> >> >> > What is swap partition ?
>> >> >> >
>> >> >>
>> >> >> A swap partition is disk space the operating system can use to
>> >> >> temporarily shuffle parts of programs out of the way when memory gets
>> >> >> low or when it can think of better ways of using memory than holding
>> a
>> >> >> part of a program that isn't used much. Sometimes the OS will even
>> swap
>> >> >> out whole programs when you're really pushing your memory usage.  The
>> >> >> suggestion used to be to make it twice the size of your RAM, but I've
>> >> >> seen advice more recently to cap it at some amount smaller than
>> >> >> that. New machines have so much ram that if you ever activated that
>> much
>> >> >> swap, well the experience would not be pleasant, waiting for all that
>> >> >> I/O.
>> >> >>
>> >> >> >
>> >> >> > Any input is welcome.
>> >> >>
>> >> >> I'm not going to try to give much advice on how to lay out your
>> >> >> partitions, since I always regret my choices later. One nice piece of
>> >> >> advice I read on an openbsd mailing list once was to only create
>> >> >> partitions holding the space you imagine right now that you'll need.
>> The
>> >> >> rest leave to create partitions with later, when you'll know what it
>> >> >> should be used for. This advice maybe applies more to OpenBSD since
>> it
>> >> >> has no options like LVM, ZFS, or btrfs. On the other hand, maybe you
>> >> >> don't feel like learning how to exercise those options right now,
>> plus
>> >> >> if you're splitting with Windows, something like LVM won't help you
>> if
>> >> >> you wanted that space instead for Windows.
>> >> >>
>> >> >> >
>> >> >> > Best,
>> >> >> > Ivan
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > On Tue, Nov 20, 2018, 12:39 AM Ivan Klimov <iklimov87 at gmail.com>
>> >> wrote:
>> >> >> >
>> >> >> >> Eric,
>> >> >> >>
>> >> >> >> Greatly appreciate it !
>> >> >> >>
>> >> >> >> I will refer to the guide once will have some time to go through
>> the
>> >> >> >> process.
>> >> >> >>
>> >> >> >> Best regards,
>> >> >> >> Ivan
>> >> >> >>
>> >> >> >> On Mon, Nov 19, 2018 at 10:39 PM Eric Luther <luther84 at gmail.com>
>> >> >> wrote:
>> >> >> >>
>> >> >> >>> I found this comprehensive and up to date walkthrough of the
>> steps
>> >> >> needed
>> >> >> >>> which includes pictures.
>> >> >> >>>
>> >> >> >>> https://askubuntu.com/a/1031994
>> >> >> >>>
>> >> >> >>> On Mon, Nov 19, 2018 at 10:34 PM Ivan Klimov <
>> iklimov87 at gmail.com>
>> >> >> wrote:
>> >> >> >>>
>> >> >> >>>> Eric and Greg,
>> >> >> >>>>
>> >> >> >>>> Many thanks for your reply.
>> >> >> >>>>
>> >> >> >>>> I went to Microcenter and grabbed $1000 machine with 6 cores (12
>> >> >> threads)
>> >> >> >>>> 16 Gb RAM SSD -- awesome specs for the money.
>> >> >> >>>> If someone shops for a laptop, it is good time now.
>> >> >> >>>>
>> >> >> >>>> Now, I need to install Linux. The machine has 1 TB + 256 SSD
>> (with
>> >> >> >>>> Win10).
>> >> >> >>>> Any recommendations on how to prepare for Ubuntu install ? How
>> to
>> >> >> divide
>> >> >> >>>> HD/SSD, etc.?  I would like to make it dual-boot.
>> >> >> >>>>
>> >> >> >>>> FYI.
>> >> >> >>>> I clarified with my colleague and compatibility problem was with
>> >> the
>> >> >> >>>> motherboard - not the chip itself. Let's hope that this machine
>> >> will
>> >> >> not
>> >> >> >>>> have the same issue.
>> >> >> >>>>
>> >> >> >>>> Best,
>> >> >> >>>> Ivan
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>> On Mon, Nov 19, 2018 at 8:47 AM Greg Rundlett (freephile) <
>> >> >> >>>> greg at freephile.com> wrote:
>> >> >> >>>>
>> >> >> >>>> > On Sun, Nov 18, 2018 at 9:58 PM Ivan Klimov <
>> iklimov87 at gmail.com
>> >> >
>> >> >> >>>> wrote:
>> >> >> >>>> >
>> >> >> >>>> >> Dear Linux Group,
>> >> >> >>>> >>
>> >> >> >>>> >> Background:
>> >> >> >>>> >> Friend of mine upgraded PC with new motherboard and RAM some
>> >> time
>> >> >> ago
>> >> >> >>>> and
>> >> >> >>>> >> could not install Ubuntu due to some conflicts with hardware.
>> >> >> >>>> >>
>> >> >> >>>> >> I am just about to buy a laptop with the following spec. Do
>> you
>> >> see
>> >> >> >>>> any
>> >> >> >>>> >> problems/conflicts  installing Ubuntu on this machine as dual
>> >> boot
>> >> >> ?
>> >> >> >>>> >
>> >> >> >>>> >
>> >> >> >>>> >
>> >> >> >>>> > You could compare details of your hardware with the official
>> >> >> >>>> "certified"
>> >> >> >>>> > hardware for Ubuntu desktops listed at
>> >> >> >>>> > https://certification.ubuntu.com/certification/
>> >> >> >>>> >
>> >> >> >>>> >
>> >> >> >>>> >> Is
>> >> >> >>>> >> there a way to check it beforehand ?
>> >> >> >>>> >>
>> >> >> >>>> >
>> >> >> >>>> > If you can put a LIVE CD into the product, you can boot it
>> >> without
>> >> >> >>>> > installing Ubuntu.  However, I'll assume you don't have
>> physical
>> >> >> >>>> access to
>> >> >> >>>> > the machine (ie. buying online).
>> >> >> >>>> >
>> >> >> >>>> > HTH. Some others on the list have more experience with
>> >> >> installations,
>> >> >> >>>> so
>> >> >> >>>> > perhaps they'll offer advice too.
>> >> >> >>>> >
>> >> >> >>>> > Greg Rundlett
>> >> >> >>>> > https://eQuality-Tech.com <https://equality-tech.com/>
>> >> >> >>>> > https://freephile.org
>> >> >> >>>> >
>> >> >> >>>> >
>> >> >> >>>> _______________________________________________
>> >> >> >>>> Discuss mailing list
>> >> >> >>>> Discuss at blu.org
>> >> >> >>>> http://lists.blu.org/mailman/listinfo/discuss
>> >> >> >>>>
>> >> >> >>>
>> >> >> > _______________________________________________
>> >> >> > Discuss mailing list
>> >> >> > Discuss at blu.org
>> >> >> > http://lists.blu.org/mailman/listinfo/discuss
>> >> >> >
>> >> >> >
>> >> >>
>> >> >> --
>> >> >> Mike Small
>> >> >> smallm at sdf.org
>> >> >>
>> >>
>> >> --
>> >> Mike Small
>> >> smallm at sdf.org
>> >> _______________________________________________
>> >> Discuss mailing list
>> >> Discuss at blu.org
>> >> http://lists.blu.org/mailman/listinfo/discuss
>> >>
>>
>> --
>> Mike Small
>> smallm at sdf.org
>>
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Thu, 7 Mar 2019 18:05:36 -0500
>> From: Rich Pieri <richard.pieri at gmail.com>
>> To: discuss at blu.org
>> Subject: Re: [Discuss] Ubuntu Install Question
>> Message-ID: <5c81a3c1.1c69fb81.8cbff.a501 at mx.google.com>
>> Content-Type: text/plain; charset=US-ASCII
>>
>> On Thu, 07 Mar 2019 20:27:46 +0000
>> Mike Small <smallm at sdf.org> wrote:
>>
>> > The Linux partitioning tools (that the installation programs use)
>> > claim to be able to shrink existing partitions to make room for a
>> > Linux partition, but I've never trusted that. Could be paranoia on my
>>
>> I've used resize2fs to shrink and expand filesystems on a number of
>> occasions where booting a gparted image was not a good option. Works
>> reliably although as always have a backup in case something does go
>> wrong. Bonus: at some point in the recent past the LVM tools acquired
>> the ability to invoke resize2fs directly saving the need to resize in
>> multiple steps.
>>
>> ZFS and Btrfs avoid the problem entirely since they don't use
>> traditional partitions or volumes.
>>
>> XFS filesystems cannot be shrunk.
>>
>> > part. I'd be especially careful when Windows is involved, but I have
>> > no recent experience with it. If it were me I'd put Ubuntu on the 2nd
>> > drive and leave Windows with what it originally had. I haven't
>>
>> If you don't go the WSL route then do this. Keep the two separate. EFI
>> dual booting can tricky anyway, but doing it on a single device is extra
>> tricky.
>>
>> Running your Ubuntu in Hyper-V is also an option to consider. Not only
>> do most Linux distros run just fine in Hyper-V, installing Ubuntu
>> 18.04.1 LTS in Hyper-V is formally supported.
>>
>> --
>> Rich Pieri
>>
>>
>> ------------------------------
>>
>> Subject: Digest Footer
>>
>> _______________________________________________
>> Discuss mailing list
>> Discuss at blu.org
>> http://lists.blu.org/mailman/listinfo/discuss
>>
>>
>> ------------------------------
>>
>> End of Discuss Digest, Vol 94, Issue 3
>> **************************************
>>
> _______________________________________________
> Discuss mailing list
> Discuss at blu.org
> http://lists.blu.org/mailman/listinfo/discuss
>

-- 
Mike Small
smallm at sdf.org



More information about the Discuss mailing list