
The Move from Linux to FreeBSD - pmoriarty
http://nileshgr.com/2013/06/07/the-move-from-linux-to-freebsd
======
LeonidasXIV
It's odd, because he says that GNU can't run without Linux (it can, see Debian
kFreeBSD, which has a FreeBSD kernel and GNU userland, also see the numerous
GNU ports to Win32, starting with Cygwin and MinGW). He also says that Linux
requires GNU which is AFAIK not true either (Android uses Linux but replaces
the userland with its own Apache-licensed tools).

~~~
justincormack
Not surprised people dont know that - Debian kFreeBSD is pretty obscure, and
he had heard of HURD. And Android is still slightly a Linux fork, even if it
is gradually converging, while the other non Gnu userspaces are not mostly
entirely non GNU yet.

~~~
agumonkey
Also, few monthes ago kFreeBSD was discussed if it may be supported or not in
the future.

[https://lists.debian.org/debian-devel-
announce/2014/09/msg00...](https://lists.debian.org/debian-devel-
announce/2014/09/msg00002.html)

[http://www.reddit.com/r/linux/comments/2hvikt/kfreebsd_port_...](http://www.reddit.com/r/linux/comments/2hvikt/kfreebsd_port_is_in_danger_of_being_dropped_from/)

~~~
justincormack
I do find it a bizarre thing, cutting yourself off from the main FreeBSD
community.

------
dorfsmay
I suspect the high memory usage OP saw on Linux was a combination of:

\- swappiness: they said they switched swappiness to zero but my guess is that
by that time their mind was made up. Also, from the mention of swapping and
the mention of apps being slow to come back to life, I really think this was
the main reason for their memory issues. For reference, high swappiness will
make the kernel will push memory for apps into swap to the benefit of caches.
Default is 40, I have not seen one single case where that is a good thing in
12 ro 15 years. Do yourself a favour, make your first CM rule to switch
swappiness to zero!

\- the myriad of small apps in a lot of modern Linux distro (pieces of
systemd, pieces of gnome (even on servers!), dbus, etc...). They are
minimalistic distors out there which use a very small footprint

\- the way memory is reported: If you look at free, the first line shows free
memory as what's not in use by apps, cache nor buffers. If anything, free
memory on the first line is memory that the OS is wasting (not using). If you
want to know what is available for use by apps, you have to look at the second
line (-/\+ buffers/cache)

------
sneak
He claims it saved him $3500, but I just read a story about a guy squandering
a few grand in billable time screwing around swapping one POSIX OS for
another.

~~~
danieldk
You know, life gets pretty hollow when everything is 'billable time'. It's
also fun to just hack and tinker.

Also, if maximizing billable time _is_ the goal, maybe the guy learnt a lot
playing with another UNIX and increases his worth :p.

~~~
ac2u
You've put it better than I ever could. It's frustrating to see someone share
an experience along the lines of "I earned X this weekend by exploiting a
niche I completely ignored before and learned loads!", only for a commenter to
inevitably come along and say "well, thats all well and good, but if you value
your time at Y per hour you've actually lost money, not to mention the wasted
opportunity cost of not using that time to become a rocket scientist and
earning even more!"

~~~
bradleyland
Well, you can't have it both ways. If you (in the general sense, not you
specifically) do a project for your own reasons, great. The problem is when
you try to make an ROI case that only represents one side of the equation. If
you don't want people to poke holes in your ROI argument, then avoid framing
your projects in a way that creates opportunities for that discussion.

------
fulafel
The TLDR:

The biggest difference was memory usage: "FreeBSD is just too good at managing
memory. My server earlier used to consume over 1 GB of memory for running PHP,
MySQL and Nginx. Now, it doesn’t even touch 500 MB! It’s always less than 500
MB. Everything is just same, configuration, etc. Only OS changed"

Later in the article, a recount of desktop memory shortage issues under Linux
and much improvement under FreeBSD. He even reports single applications like
Chromium performing better and with no swapping.

~~~
gerow
One has to be careful when looking at memory usage to judge these kinds of
things, though. Linux has a tendency to use memory unused by applications for
its own purposes, because it's not being used anyway and it might as well do
something useful with it.

Oftentimes this ends up being something like aggressively caching file data so
that it doesn't have to write to disk very often. While this does get labeled
as "used" memory, it can very quickly be freed up by the operating system by
evicting this cached data back to disk if that memory is needed elsewhere.

This can make Linux appear more memory-hungry, but in actuality a better
description might be that Linux is more effectively using the resources at its
disposal. I'm not saying that this is what's happening in this case, but it's
a possibility.

~~~
Flow
You think Linux is alone in acting like that?

~~~
andreasvc
No, but maybe others don't report such memory as used, which seems unfortunate
to me.

~~~
Flow
FreeBSD has many labels for how it uses memory. Active, Inactive, Cache etc,
to specify the purpose. See this question and answer:
[http://unix.stackexchange.com/questions/134862/what-do-
the-d...](http://unix.stackexchange.com/questions/134862/what-do-the-
different-memory-counters-in-freebsd-mean)

~~~
Freaky
They're less labels for purpose and more labels for lifecycle - data you'd
consider "cached" can appear just about anywhere. From what I remember
(corrections more than welcome):

Active is fully-fledged in use memory, mapped into one or more processes

Inactive is where Active goes when it's less in-use. Cheap to reactivate, but
relatively costly to free: can still be mapped into processes, and may be
dirty (modified) and thus require writing to disk before being unmapped and
cleared for reuse.

Cached is where lesser used Inactive cached data goes before it dies. More
costly to reactivate, but cheap to free: No longer mapped directly into any
process, and strictly consists of only clean (unmodified) pages that don't
need writing back to disk before clearing.

Wired is pinned-down memory that can't be swapped out. ZFS's data and metadata
caches are counted here, since it maintains its own (known as the ARC -
Adaptive Replacement Cache, after the algorithm it's based on) instead of just
relying on the traditional VM page cache.

------
Touche
I really love FreeBSD and use it for servers, but I wouldn't use it for
desktop. It lags behind Linux quite a bit (which itself lags behind
proprietary OSes) in things like driver support. I've found it very hard to
use with modern hardware.

------
moron4hire
This guy's issues aside, if you're interested in trying FreeBSD, but would
like for a more turnkey experience, there is the PC-BSD distro that has the
modern conveniences like a graphical installer and preinstalled window
manager.

------
zobzu
Linux memory management is actually quite good. In particular the unified fs
cache. I would think this guy had weird settings/tweaks and or more things
enabled since he ran gentoo but misconfigured swapiness.

The apps code is very close and linux doesnt magically needs to allocate more
memory. What changes is just libc.

Freebsd is one of my favorite OSes regardless.

------
ausjke
I applaud for this move, but I do embedded linux, need checkout NetBSD which
is typically the embedded BSD, the concern is about all those drivers'
support.

~~~
justincormack
It doesnt have as many drivers as Linux, but it is pretty easy to add them -
does Linux always have the ones you want? It rather depends on platform.

------
chx
> like how to tweak fontconfig to get clean & beautiful fonts, etc.

That's quite something to drop just like that. Any links?

~~~
XorNot
I just discovered the infinality patches. They are amazing and so easy on the
eyes.

------
jestinjoy1
I tried switching to BSD (PC-BSD) from Debian and then went back because I
couldn't find out any better performance from BSD as compared to Debian.

------
olgeni
> The only things I miss are: Dropbox and Android SDK

I am actually using devel/android-tools-adb with the SDK under Linux emulation
and it works quite well.

------
stefantalpalaru
> GNU is the userland

Although important, GNU projects are a very small percent of the 2376 packages
that make up my desktop's userland right now.

------
erkose
Many people are moving from linux to *bsd in protest of systemd.

~~~
lowglow
That's weird. I haven't kept up with the latest *nix gossip, but isn't the
very principle of the system is that it is open and fully
configurable/modular/extensible? What does it really matter in the end what
system you use if you can make whatever system your own? (serious question)

~~~
hobofan
It matters because if it "invades" your distribution of choice. Imagine you've
been useing a distro for years and grown to love it and now systemd is being
forced upon you of you make the next major upgrade.

Right now it isn't really that bleak, because some distros still give you a
choice, but people are worried that the choice will be sacrificed in favor of
easier maintanability in the future.

~~~
danieldk
_It matters because if it "invades" your distribution of choice. Imagine
you've been useing a distro for years and grown to love it and now systemd is
being forced upon you of you make the next major upgrade._

Like ELF, glibc2, egcs, devfs, hotplug (the old script-flavored version),
udev, eglibc, etc.

I am mentioning these, because all of them caused a controversy with a vocal
minority. It is evolution. None of these are controversial anymore. Some of
them were replaced, because they were bad ideas in hindsight (devfs).

By definition any fundamental part of the system (such as init or the C
library) that changes is 'forced upon' the user.

~~~
na85
Your quotes around 'forced upon' make it seem like it is not really being
forced onto users. Gnome users for example are getting shafted now that
systemd is a dependency for the gnome DE.

------
grigio
Google for "Freebsd vs Linux 2014 performance and features" to see other
considerations about the current status.

------
tux
Here we go again, some one telling us one os is better then the other ^_^
Never listen to anyone saying that. Simply use the OS that works best for YOU
period. Few replies here where correct, linux uses more memory because it
works like a cache, to not use HDD so much and if you have enought memory like
8GB+ you don't have to use swap at all.

~~~
danieldk
First of all: what makes you think that FreeBSD does not do disk caching?

[https://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-
handb...](https://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-
handbook/vm.html)

 _enought memory like 8GB+ you don 't have to use swap at all._

...depending on usage. We have 64GB+ machines at work that regularly go
swapping. It depends on various factors: how quick do you want the OOM killer
to kick in, how slow do you want the system to get as a result of swapping,
and how much budget is there available to buy machines that can take more
memory.

------
execat
> FreeBSD gave my computer a new life, otherwise I was nearly going to get a
> new desktop because of shitty performance. In other words, it saved me
> ₹35000+

No, it didn't save you any money. Delaying a purchase is NOT saving money.

~~~
daurnimator
sure it is. if you buy new hardware on a regular schedule (e.g. every 3
years), extending that cycle out (e.g. to every 5 years) saves you money.

~~~
keithpeter
And you can do things like refresh (say) the one third of the desktop
computers that need a higher spec (Cad, Video &c) every two years and then
'hand down' the older boxes to the other two thirds in stages. Worked quite
well in one College I worked in a few years ago.

