Live data from Hacker News

Explaining top(1) on FreeBSD

klarasystems.com

1–10 of 14 posts

Re: Explaining top(1) on FreeBSD

#2
Off topic question: what's the current process to make extremely small "minimal" freebsd server install? Is it NanoBSD[1], because the unfortunate downside is that the base can't change (I realize that's a feature) and for a web server or database server that might not be ideal.

[1] https://docs.freebsd.org/en/articles/nanobsd/

Re: Explaining top(1) on FreeBSD

#3
post #2

Off topic question: what's the current process to make extremely small "minimal" freebsd server install? Is it NanoBSD[1], because the unfortunate downside is that the base can't change (I realize that's a feature) and for a web server or database server that might not be ideal. [1] https://docs.freebsd.org/en/articles/nanobsd/

If you're building from source, then I'd just disable what you don't need via src.conf(5)'s various WITHOUT_FOO settings. They are described in the man page itself.

Re: Explaining top(1) on FreeBSD

#4
post #2

Off topic question: what's the current process to make extremely small "minimal" freebsd server install? Is it NanoBSD[1], because the unfortunate downside is that the base can't change (I realize that's a feature) and for a web server or database server that might not be ideal. [1] https://docs.freebsd.org/en/articles/nanobsd/

I did this a while ago. the .iso.xz came in at 22.1 MB and the .iso at ~80MB.

That's for a ro image with tmpmfs and varmfs[0], a minimal kernel, base and the packages nginx-lite, jansson, re2, curl, acme.sh and some services.

The system boots from an ISO into running nginx and hosting a basic network scanner[1] at a VPS provider.

I basically built from source with a custom SRCCONF[2], KERNCONF[3] and some other cleanup[4].

There may be easier ways to do it but it worked out pretty well for me.

[0] https://www.freebsd.org/cgi/man.cgi?rc.conf(5) [1] https://disco1.sajber.se/ [2] https://github.com/sebcat/yans/blob/master/tools/freebsd/vm/... [3] https://github.com/sebcat/yans/blob/master/tools/freebsd/vm/... [4] https://github.com/sebcat/yans/blob/master/tools/freebsd/vm/...

Re: Explaining top(1) on FreeBSD

#5
post #2

Off topic question: what's the current process to make extremely small "minimal" freebsd server install? Is it NanoBSD[1], because the unfortunate downside is that the base can't change (I realize that's a feature) and for a web server or database server that might not be ideal. [1] https://docs.freebsd.org/en/articles/nanobsd/

You may be asking for something different, but FreeBSD Jails can be extremely small, even down to just a single process[0][1].

[0] https://docs.freebsd.org/en/books/handbook/jails/

[1] https://gist.github.com/hiway/2b526fc64748e8d6e9f36f289003f8...

Re: Explaining top(1) on FreeBSD

#6
> The topic of load average is generally very broad and it is calculated differently on various UNIX systems, so a separate article may be dedicated for just that.

I have never seen an article explaining how the load average in Linux is calculated.

Re: Explaining top(1) on FreeBSD

#7
post #2

Off topic question: what's the current process to make extremely small "minimal" freebsd server install? Is it NanoBSD[1], because the unfortunate downside is that the base can't change (I realize that's a feature) and for a web server or database server that might not be ideal. [1] https://docs.freebsd.org/en/articles/nanobsd/

This may not be the answer you are looking for, but OccamBSD seems to be a way to produce a minimal image for use in FreeBSD jails, FreeBSD bhyve and Xen: https://github.com/michaeldexter/occambsd

Re: Explaining top(1) on FreeBSD

#8
post #6

> The topic of load average is generally very broad and it is calculated differently on various UNIX systems, so a separate article may be dedicated for just that. I have never seen an article explaining how the load average in Linux is calculated.

The traffic analogy is a good explanation. Here you go: https://scoutapm.com/blog/understanding-load-averages

Re: Explaining top(1) on FreeBSD

#9
post #6

> The topic of load average is generally very broad and it is calculated differently on various UNIX systems, so a separate article may be dedicated for just that. I have never seen an article explaining how the load average in Linux is calculated.

Tangentially related: modern kernels have a much better metric (PSI, or pressure stall information)

https://lwn.net/Articles/759781/

https://lwn.net/Articles/775971/

Re: Explaining top(1) on FreeBSD

#10
post #6

> The topic of load average is generally very broad and it is calculated differently on various UNIX systems, so a separate article may be dedicated for just that. I have never seen an article explaining how the load average in Linux is calculated.

One thing about load average on Linux which I never really understood was the inclusion of processes waiting for I/O, I never really got a satisfying explantation until I bumped into this post a few years ago: https://www.brendangregg.com/blog/2017-08-08/linux-load-aver...
Post reply on HN