Thursday, June 30, 2005

Upgrading Perl

If you are going to upgrade perl (currently, if you go to 5.8.7), be sure to read the /usr/ports/UPDATING note:


20050624:
AFFECTS: users of lang/perl5.8

lang/perl5.8 has been updated to 5.8.7. You should update
everything depending on perl. The easiest way to do that is
to use perl-after-upgrade script supplied with lang/perl5.8.
Please see its manual page for details.


In other words:



run "perl-after-upgrade" (note the remarks)


run "perl-after-upgrade -f" (to make the changes)





Tuesday, June 28, 2005

Syncing /usr/ports

Say you have two machines that you want to keep up to date with /usr/ports. Rather than running cvsup on both of them, you have a couple of options:


  • Use rsync for /usr/ports from the fast machine to the slower machine.

  • Use pkg_create's -b option, then use those packages on the other machine(s).







Stop package from upgrading

Question: How do I tell portupgrade to not upgrade a particular port? Say, an upgraded app breaks on my system and I want it to be ignored when I do an "upgrade all" via portupgrade.

Answer:

  • Use the '-x' option

  • Long term solution - HOLD_PKGS in /usr/local/etc/pkgtools.conf






Thursday, June 16, 2005

Keeping FreeBSD up to date

An excellent article on keeping FreeBSD up to date, especially remotely (as I will be doing in the next few days):


TaoSecurity: Keeping FreeBSD Up-To-Date



Friday, April 29, 2005

New BSD "distro"

A cool looking BSD "distro" called PC-BSD, is discuss here on Dru's site:

FreeBSD Desktop



Tuesday, April 5, 2005

HZ Value

There's been some discussion on the freebsd-questions mailing list about the "HZ" value you can set in the kernel. It basically is a setting for how often the kernel gets invoked to do its kernel thing. HZ=100 is a very common and normal setting, it can be modified. Here's a great posting by 'cpghhost' about it:


On Mon, Apr 04, 2005 at 11:17:19AM +0200, Dick Hoogendijk wrote:

>> I read about polling and HZ=1000. The latter is not high enough for
>> vmware3 (it complains..). I read 'man polling' and learn something about
>> this, but I really want to know more about 'hz=1000'
>>
>> The GENERIC has hz=100 as I recall (fbsd-4.11). Can somebody explain I
>> "human language" what happens if you raise this HZ? Is there a processor
>> related issue here? What exectly happens if you have 'hz=1000' or is it
>> maybe better to have 'hz=2000' ? I can't decide now because I don't
>> understand what happens.. So, anybody?


This is the frequency of the heart beat. Superficially, every 1/HZ second,
a clock tick happens and the kernel is invoked. Then stuff like cleanup and
scheduling a new thread happens (this is not the only time when threads
get scheduled though).

HZ=100 is good enough for most purposes. If the kernel needs to poll
some data faster and more frequently, you can crank up HZ to 1000 or
even higher. A system with higher HZ is usually also more responsive,
but this comes at a price:

* The overhead is higher (you need more time to do internal housekeeping,
and there's less time available for userland threads)
* Processor caches are flushed more frequently, resulting in slower
RAM access.

A high value for HZ is also not a good idea for slow(er) hardware
either.

Interestingly, HZ=100 has remained constant for decades (!), despite
CPUs getting faster all the time. This is an excellent value for most
typical usage patterns. Cranking it up should only be required for
special cases. Anyway, the HZ knob is there. Experiment with it until
you get optimal performance.



Tuning your FreeBSD installation

A good place to start when you begin the move to tweaking your FreeBSD system performance is the tuning(7) man page:


tuning