Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Sep 2020 22:04:39 +0000
From:      Colin Percival <cperciva@tarsnap.com>
To:        Riccardo Lombardi <ric.lombardi@gmail.com>, freebsd-cloud@freebsd.org
Subject:   Re: EC2 AMI size of Freebsd 12 (and maybe a feature request)
Message-ID:  <010001748ea604b7-67a61380-0272-4a14-94e3-e2d80f02c763-000000@email.amazonses.com>
In-Reply-To: <CAAr7tvFrBuNWK2t2c1z3EGuU%2BhvhUjZ-s5FwkeAa3XvEj5QFTw@mail.gmail.com>
References:  <CAAr7tvFrBuNWK2t2c1z3EGuU%2BhvhUjZ-s5FwkeAa3XvEj5QFTw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2020-09-14 08:35, Riccardo Lombardi wrote:
> First of all, thank you for all your efforts for making FreeBSD usable in
> EC2 environments, and sorry for my english.

Your English seems fine to me!

> I'm mainly a hobby web developer, with limited (end-user) experience in
> Unix systems.
> I recently switched to FreeBSD for my web server and noticed that the
> "out-of-the-box" FreeBSD 12 AMI in AWS uses a lot of disk space (3.8Gb
> using the df -h command) in comparison with other Linux distributions,
> which usually start with 1-1.5Gb disk space.
> I also wanted to point out that the size of the FreeBSD 11 AMI is strangely
> quite smaller (2.4G).
> The largest directories I could find in FreeBSD 12 are:
> /usr/lib/debug: 1.5G
> /var/db/freebsd-update: 508M

You're seeing two things here:
1. FreeBSD 12 has far more space used for debug symbols than FreeBSD 11 (and
FreeBSD 13 has even more -- over 2 GB).
2. When you launched FreeBSD 12 it downloaded updates -- including kernel
updates and the associated updated debug symbols.  Assuming the FreeBSD 11
you launched was 11.4, it didn't have nearly as many updates to download.

> My aim (and I suppose this could be useful for many developers and EC2
> users) was originally to shrink the AMI size by eliminating things that are
> not necessary in a production environment (maybe the kernel-debug tools).
> Unfortunately I don't think i have enough knowledge to make my own custom
> light AMI.
> 
> So, if this could be useful for the community, and I think so, it would be
> very nice to see some of the following things / features:
> - First of all check it there's some problem with the disk size of the
> FreeBSD 12 (compared with the 11, maybe there are old unused libraries from
> the update), and eventually publish a new, "clean", AMI
> - OR/AND maybe implement a "lightweight" version of the FreeBSD AMI,
> without some non essential components.

I'm seriously considering providing "minimal" AMIs without debug symbols (and
maybe other stuff; I'm not sure if there's anything else worth excluding).
Right now this and other "flavoured FreeBSDs" is blocked by Amazon not
enabling the SSM Parameter Store for FreeBSD to register AMIs.

> - Reduce the minimum EBS volume size from the current 10G to 8 or maybe 5
> (accordingly with the final size of the new AMI)

That is already done -- while we have 10 GB as the *default* size, you can
launch FreeBSD instances with any size as long as it's large enough for the
disk image (between 3-5 GB depending on version).

... with the exception of the AWS Marketplace, because they couldn't figure
out how to copy our disk snapshots properly, that is.  Nothing I can do to
fix them. :-/

-- 
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?010001748ea604b7-67a61380-0272-4a14-94e3-e2d80f02c763-000000>