Difference between revisions of "FreeBSD"

From Hackepedia
Jump to navigationJump to search
(open issues and observances)
Line 53: Line 53:
  
 
Once you have these two scripts, run each at your convenience.
 
Once you have these two scripts, run each at your convenience.
 +
 +
 +
== Open Issues and Observances ==
 +
 +
A FreeBSD 7.2-RELEASE [[vmware]] instance takes up more CPU than other vmware instances on the same host.  In a top from the host operating system:
 +
 +
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND         
 +
  3363 pjp        5 -10  653m 574m 558m S 13.0 14.6  1000:22 vmware-vmx       
 +
15789 pjp        5 -10  518m 294m 283m S  8.7  7.5 489:56.54 vmware-vmx       
 +
28973 pjp        5 -10  373m 274m 267m S  5.7  7.0  0:46.29 vmware-vmx       
 +
15815 pjp        5 -10  391m 286m 277m S  1.0  7.3  45:01.09 vmware-vmx       
 +
15823 pjp        5 -10  380m 295m 284m S  1.0  7.5  34:11.55 vmware-vmx       
 +
 +
FreeBSD is pid 28973.  [[DragonflyBSD]] is pid 15823.  Both idle but huge difference in CPU usage.  On the hosts themselves what was noticed was there was higher context switch rates on FreeBSD compared to DragonflyBSD (on the order of 3 to 4 times what it is on dflybsd).  Since DragonflyBSD is based on FreeBSD 4 it's possible that FreeBSD 7.2 is so cpu intensive due to its fine grained kernel locking (not sure).  Google mentions other people seeing high context switches and wondering about them as well.

Revision as of 08:40, 9 August 2009

FreeBSD is an operating system based on 4.4BSD lite2.

FreeBSD 7.2-RELEASE

The FreeBSD Project

The current version of FreeBSD is 7.2-RELEASE

FreeBSD Release page

rc.conf recommendations

/etc/rc.conf recommendations:

This will stop syslog from opening a socket. This is highly recommended unless you do remote syslogging. If you're unsure, you can safely make this change.

syslogd_flags="-ss"

Ports

Cleanup hints if you're using ports. Once in a while look for:

# ls /usr/ports/distfiles/

which is leftover packages you've downloaded to install. You can remove these if the install is complete

# find /usr/ports/ -name work -type d -print 

this is old work directories left around from an install you've done. When you install from ports if you do:

# make install distclean

the distclean will clean this work directory as well as the distfiles.

Also make sure you have a regular patching process.


FreeBSD:php Help with installing php from ports on FreeBSD. FreeBSD:apache22:ssl Getting SSL working with apache22.

Hints

Unlike cat(1) on most OS', the cat on FreeBSD can't handle cat'ing directories:

$ cat elcheapo/
Ê
 .

and then the terminal will appear to lock up. If you type "reset" (even though you will not see your typing) when this happens you will rescue your session so you don't have to quit it and start over.


Patching

# cat /bin/update
portsnap fetch && portsnap update && pkg_version  -v -l "<"
# cat /bin/upgrade
portaudit -Fda
/usr/local/sbin/portupgrade -a

Once you have these two scripts, run each at your convenience.


Open Issues and Observances

A FreeBSD 7.2-RELEASE vmware instance takes up more CPU than other vmware instances on the same host. In a top from the host operating system:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND           
 3363 pjp        5 -10  653m 574m 558m S 13.0 14.6   1000:22 vmware-vmx         
15789 pjp        5 -10  518m 294m 283m S  8.7  7.5 489:56.54 vmware-vmx         
28973 pjp        5 -10  373m 274m 267m S  5.7  7.0   0:46.29 vmware-vmx         
15815 pjp        5 -10  391m 286m 277m S  1.0  7.3  45:01.09 vmware-vmx         
15823 pjp        5 -10  380m 295m 284m S  1.0  7.5  34:11.55 vmware-vmx         

FreeBSD is pid 28973. DragonflyBSD is pid 15823. Both idle but huge difference in CPU usage. On the hosts themselves what was noticed was there was higher context switch rates on FreeBSD compared to DragonflyBSD (on the order of 3 to 4 times what it is on dflybsd). Since DragonflyBSD is based on FreeBSD 4 it's possible that FreeBSD 7.2 is so cpu intensive due to its fine grained kernel locking (not sure). Google mentions other people seeing high context switches and wondering about them as well.