Some ideas for FreeBSD

Ted Mittelstaedt tedm at
Fri Feb 8 07:14:29 UTC 2008

> -----Original Message-----
> From: owner-freebsd-questions at
> [mailto:owner-freebsd-questions at]On Behalf Of
> millueradfa at
> Sent: Wednesday, February 06, 2008 9:23 AM
> To: freebsd-questions at
> Subject: Some ideas for FreeBSD
> Dear FreeBSD Developers,
> I have a few suggestions for how FreeBSD can be
> improved in an upcoming release. 
> My first is to allow for dynamically resizeable swap
> file of some sort, and via kqueue, a notification
> facility to notify a program when swap is about to run
> out, when a program has made a memory request which
> requires more swap space than is avialable, and when
> swap space is run out. There should also be commands
> that can shrink the swap files, and see how much is
> being used in the swap files. This allows for the user
> to write customised programs that can manage and
> allocate new swap space as needed. The OS can come
> with a standard version of such a program that allows
> a user to specify a maximum swap file size (including
> infinite).

At my job we run lots of FreeBSD servers doing various things.

Very, very few of them ever have more than a token
amount in swap.  For example here's top from our busiest mailserver:

Mem: 830M Active, 660M Inact, 1121M Wired, 99M Cache, 214M Buf, 7896K Free
Swap: 2048M Total, 14M Used, 2034M Free

I can spare 2GB off a 300GB array to allocate to swap, and
if the OS wants to throw 14MB into the 2GB file for some
reason or other, that's fine with me.

> The third idea is for more of a move to Linux and, SUS
> , and POSIX source compatability in regards to
> additional features supported by these systems. I
> still in 6.0 run into some calls that are not
> supported by FreeBSD that is a real headache. I ran
> into this with posix_memalign in some software.
> Although posix_memalign is more modern, If it would be
> trivial to add support for linux specific valloc and
> memalign why not do so as well, to maintain
> compatability with older Linux software.

> It is better
> to just make FreeBSD be as compatable and for stuff to
> compile out of box, as possible than to haggle over
> conditional ifdefs and changing lines of code in
> software. 

I disagree - the users who don't understand such things shouldn't
be rolling their own stuff, they should be using the ports
system.  And the people who do understand such stuff are the
ones creating the ports.

It is one thing to add support for a POSIX call into FreeBSD.
That's fine.

It's quite another to break a header or supply hacky 32-bit-only
code in a library or some such just because Linux does the same
brain-dead stuff and the Linux maintainers are too stubborn or
stupid to fix Linux.


More information about the freebsd-questions mailing list