FreeBSD beginner (NetBSD advanced)

Wojciech Puchar wojtek at tensor.3miasto.net
Thu Jul 15 14:50:46 PDT 2004


> 
> Wojciech Puchar wrote:
>> i installed FreeBSD once to do quick performance tests, and at least in 
>> disk I/O and fair scheduling it's MUCH better (tested 4.10 and 5.1).
>
> It's nice to be welcomed by higher performance when you switch OSes.  :-)
>

while high performance is always cool, stable performance is even more 
important under load. I mean if i do 5 things it shouldn't slow down 100 
times.

in NetBSD especially if you start large file copying whole system slows 
down terribly. not true with FreeBSD.

softdeps in NetBSD is very buggy. putting very high load like deleting 
huge tree or unpacking it easily triggers DDB with ffs_something panic :(

>> my questions:
>> 
>> 1) what is Buf and Cache in top exactly? why buf on 96MB machine gets to 
>> near 20MB and never goes down? it's almost 1/4 of memory size.
>
> Cache: number of pages used for VM-level disk caching
> Buf:   number of pages used for BIO-level disk caching
>

can you explain more? (or redirect me to URL about it)

is all things double-buffered?!!!!!! it would be lots of memory traffic.


BTW is mfs usable and stable in FreeBSD? and does it make real sense?

in NetBSD mfs is terribly unstable. especially large mfs disks easily 
crash things.


>> 2) can i compile kernel with -march=pentium,pentium[234] -O2 optimization?
>> in NetBSD 2.0 doing -march=pentium produces kernel that doesn't boot at 
>> all, just resets.
>
> If you want to tune your system, tweaking the options from GENERIC by 
> removing at least:
>
> cpu             I386_CPU
> cpu             I486_CPU
>

did this.

> ...will probably result in the greatest improvement, along with disabling 
> WITNESS and such if using -CURRENT.  See "man tuning".

oh - i never did it...

>
> Using -march=pentium is likely to be worthwhile (assuming you don't have a

with heavy CPU-bound userland binaries i measured 10-25% gain.


> 386 :-), higher than that may run into problems.  Higher optimizations than 
> -O are not supported, although work is underway to fix the remaining code 
> issues (mainly in libalias used by NAT), as I understand.
>
> If you want to try -O2, give it a shot, but you might consider using either 
> "-Os" rather than "-O2", or try "-O2 -fno-strict-aliasing".
>
why -Os? it makes slower but smaller code?

will lower memory traffic/better cache hitting give more gain than it's 
lost because of slower code.


>> 3) how can i disable compiling, using etc.. all that LKM (KLD) stuff?
>> 
>> i really prefer one static kernel.
>
> Read the handbook on building the kernel.

what i missed?

i already built a kernel, found how to disable modules but all kld stuff 
is still compiled in!

yes i can just do rm *.ko but removing kld from kernel would be even 
nicer.

>
>> 4) is IPv6 working well? (i mean no crashes etc...) i will get real IPv6 
>> zone allocation soon and want to use it.
>
> IPv6 seems to work well, yes.
>
>> 5) what is used in FreeBSD for traffic management. NetBSD has altq - 
>> please just give me a name i will RTFM.
>
> If you want to use that, ipf/altq should be available in -CURRENT. 
> Otherwise, ipfw & dummynet is another choice.
>
>> 6) how to turn using serial port as console on i386? my home machine is 
>> headless, i'm using X terminals to access it.
>
> See the handbook.
>
>> 7) does FreeBSD support 2 CPUs on i386?
>
> Sure.  See the SMP section of the kernel config file.
>
>> should i go to 4.10 or better 5.2.1? stability is really important to me.
>
> 4.10, unless there's a feature from -CURRENT that you don't want to live 
> without.

i don't think it is unless 4.10 has:

1) multiCPU
2) traffic shaping
3) nat
4) firewalling
5) IPv6
6) tun device

i don't think i need anything more


More information about the freebsd-questions mailing list