Discussion:
Resolving OpenBSD Bloat: Unpuffing Puffy
francisco
2005-04-01 18:42:41 UTC
Permalink
Original document at: http://www.blackant.net/other/docs/unpuffed/



Resolving OpenBSD Bloat: Unpuffing Puffy
by francisco luis roque, April 1, 2005


Talk

It is a well known fact that OpenBSD is currently one of the largest
Operating Systems available. Graph 1 [1] shows that OpenBSD (in
light blue) can use up to 10 times more of a disk than other OS's.

Additionally, since OpenBSD's inception both the kernel and the install
sets have grown exponentially.

For example, the 2.5 i386 kernel was 2281 KB small whereas the 3.5 i386
kernel was 4957 KB large; in only 5 years the kernel more than doubled in
size. In addition, i386 base25.tgz was 17775 KB small whereas i386
base35.tgz was 30271 KB large, again almost a doubling in size. Graph 2
[2] shows the growth in kernels and install sets over the past 5 years.

It should come as no surprise that OpenBSD is so bloated; after all, the
OpenBSD mascot is the pufferfish [3], also known as the blowfish or
fugu, known for its bloated appearance.

Yet it must also be noted that the blowfish does not need to be bloated,
it also has an "unpuffed" state during which it looks normal [4].

That the fugu has an unpuffed states begs the question: can OpenBSD have a
less bloated state as well; can puffy be unpuffed?

One other common complaint about OpenBSD is how useless a default install
is. Though the default install allows for remote logins, little else is
running by default, leaving a relatively useless install for no apparent
gain. Contrast this with more robust OS's which run many more services.

But the lack of running services by default can help as well. Though
OpenBSD has over 350 commands in the default path, only around 50 are used
by default, the rest are excess baggage. For example, reboot and halt
aren't needed on real servers, ls is rarely used because `echo *` covers
most needs and even cat can be replaced by `while read line; do echo
$line;done < file`.

In other words, we can eliminate approximately 85% of the installed
binaries and their respective libraries and control files and still have a
completely usable system.

But what about the few times someone might need to add on rarely used
software like pf, apache, or tcpdump? Since OpenBSD already has a great
ports and package system, we can extend this to include the rarely used
extras found in base OpenBSD.


Summary

We must unbloat OpenBSD by having base include only the software that is
actually run in a default install. For the odd people who need some other
functionality currently found in base, we must create packages.


Work

To move towards this unbloatedness, here is an i386 site37.tgz [5] that
contains only the programs and files actually referenced during a default
boot as well as pkg_add and its requirements. During a common install,
select only this tarball and the kernel, and leave all other choices at
their default. The end result will be a bootable system will a very lean
install. It is now possible to ssh in and pkg_add more software (provided
you have a means to get these packages to the system - a cd or other media
will work).

Graph 3 [6] shows a comparison of the size difference between this
unbloated install versus a standard 3.7 install. Note that 30% of the
space used by the unbloated install is the kernel. Reducing kernel bloat
by compiling a custom kernel at install time is a project for next year.

If you would rather compile your own site37.tgz containing this unbloated
install set, follow these directions:

* Apply this patch (just adds site to the tarball build list) [7]
* create src/distrib/sets/lists/site and put this file [8] in that dir
* complete a make release

You should now have a similar site37.tgz in your $RELEASEDIR.

One other necessary step will be to redo most of OpenBSD base into the
port system. As a beginning, here are a few i386 packages of the more
esoteric OpenBSD features:

* pfctl-3.7.tgz [9]
* useradd-3.7.tgz [10]
* reboot-3.7.tgz [11]
* sshclient-3.7.tgz [12]



References/Thanks/Related

* Many thanks to ftp://ftp.stacken.kth.se/pub/OpenBSD/ for release
sets back to 2.0
* If you're looking for a tried & tested embedded OpenBSD install,
check out flashdist [13]




[1] Loading Image...
[2] Loading Image...
[3] Loading Image...
[4] Loading Image...
[5] http://www.blackant.net/other/docs/unpuffed/site37.tgz
[6] Loading Image...
[7] http://www.blackant.net/other/docs/unpuffed/maketars.patch
[8] http://www.blackant.net/other/docs/unpuffed/site.mi
[9] http://www.blackant.net/other/docs/unpuffed/pfctl-3.7.tgz
[10] http://www.blackant.net/other/docs/unpuffed/useradd-3.7.tgz
[11] http://www.blackant.net/other/docs/unpuffed/reboot-3.7.tgz
[12] http://www.blackant.net/other/docs/unpuffed/sshclient-3.7.tgz
[13] http://www.nmedia.net/~chris/soekris/
Bill Chmura
2005-04-01 14:52:56 UTC
Permalink
Hi Francisco...

Is there a typo on the chart for "Disk Space Used By Operating Systems
as Percent of Disk Used"?

The key shows that windows xp, solaris and Fedora are shown as a % of
100GB disk, while OBSD is shown as a % of 1GB disk.

Should that be on a 100GB obsd disk, or should the other O/S's be 1GB
disks... after all it is a comparision chart


On Fri, 1 Apr 2005 13:42:41 -0500 (EST)
Post by francisco
Original document at: http://www.blackant.net/other/docs/unpuffed/
Resolving OpenBSD Bloat: Unpuffing Puffy
by francisco luis roque, April 1, 2005
Greg Thomas
2005-04-01 20:32:44 UTC
Permalink
Post by Bill Chmura
Hi Francisco...
Is there a typo on the chart for "Disk Space Used By Operating Systems
as Percent of Disk Used"?
The key shows that windows xp, solaris and Fedora are shown as a % of
100GB disk, while OBSD is shown as a % of 1GB disk.
Should that be on a 100GB obsd disk, or should the other O/S's be 1GB
disks... after all it is a comparision chart
Ummm, the joke wouldn't work as well that way.
Post by Bill Chmura
On Fri, 1 Apr 2005 13:42:41 -0500 (EST)
Post by francisco
Original document at: http://www.blackant.net/other/docs/unpuffed/
Resolving OpenBSD Bloat: Unpuffing Puffy
by francisco luis roque, April 1, 2005
s***@jpberlin.de
2005-04-02 03:29:01 UTC
Permalink
Looks crazy....

But maybe he thought htis way:
Just a clue: 100GB/0.25 (Solaris9)=400MB used

But for the 1GB HDD only (pls. notice: 1000, not 1024):
35% of 1GB == 350MB used by OpenBSD

Hey.. it's April the 1st (yesterday..)
So I think Francisco did a April joke...

Kind regards,
Sebastian
Post by Bill Chmura
Hi Francisco...
Is there a typo on the chart for "Disk Space Used By Operating Systems
as Percent of Disk Used"?
The key shows that windows xp, solaris and Fedora are shown as a % of
100GB disk, while OBSD is shown as a % of 1GB disk.
Should that be on a 100GB obsd disk, or should the other O/S's be 1GB
disks... after all it is a comparision chart
On Fri, 1 Apr 2005 13:42:41 -0500 (EST)
Post by francisco
Original document at: http://www.blackant.net/other/docs/unpuffed/
Resolving OpenBSD Bloat: Unpuffing Puffy
by francisco luis roque, April 1, 2005
Brandon Mercer
2005-04-01 19:17:04 UTC
Permalink
Post by francisco
Original document at: http://www.blackant.net/other/docs/unpuffed/
haha, April Fools!
Brandon
Bill Chmura
2005-04-01 15:33:52 UTC
Permalink
D'oh!

Man that got me good... I thought it was serious!

Well, at least I got a link off the page for installing on soekris :)




On Fri, 01 Apr 2005 14:17:04 -0500
Post by Brandon Mercer
Post by francisco
Original document at: http://www.blackant.net/other/docs/unpuffed/
haha, April Fools!
Brandon
James Herbert
2005-04-01 19:41:47 UTC
Permalink
Post by francisco
Resolving OpenBSD Bloat: Unpuffing Puffy
by francisco luis roque, April 1, 2005
*snip*

HOLY CRAP! Was it a public holiday today? Did you really have THIS much
time to waste? :D

Nicely constructed though ;)

-James
Loading...