Upgrading FreeBSD 6.3 to FreeBSD 7.0
This is a surprisingly simple process. I just upgraded my development system and it took me about 10 minutes to be completely back up and running. As of FreeBSD 6.3 the freebsd-update utility supports upgrading to new binary releases. All of this can be done in one simple step.
freebsd-update upgrade -r 7.0-RELEASEEnjoy!
FreeBSD 7.0 Released
This is a monumental day for FreeBSD users. The long awaited version 7.0 of FreeBSD has finally arrived. There are many great improvements like 350% - 1500% performance increase with SMP machines. Read the release notes for more details.
-Ron
Ruby Performance Revisited 6
For this post I used a code snippet I found from a fellow programmer, Antonio Cangiano, that ran the tests again myself because I couldnt believe my eyes of the benchmarks run by that user.
Fibonacci Language Shootout:
Languages
- Ruby 1.8.6
- Ruby 1.9.0 (Development Release)
- Python 2.5.1
- Perl 5.8.8
- Java 1.5.0
- C++
Below are the languages and the times that each took to run the code. The code for each languages is below near the end of the post.
Ruby 1.8.6
real 0m44.965sPython 2.5.1
real 0m28.283sRuby 1.9.0
real 0m11.352sC++
real 0m0.765sJava
real 0m0.638sPerl
real 0m70.383sI will be comparing this performance of Ruby and Python to a program written in C. Below is the code used in these examples. Feel free to comment. I am running further tests using statistical analysis to make the output exhibit less of a standard deviation.
Python
def fib(n):
if n == 0 or n == 1:
return n
else:
return fib(n-1) + fib(n-2)
for i in range(36):
fib(i)Ruby
def fib(n)
if n == 0 || n == 1
n
else
fib(n-1) + fib(n-2)
end
end
36.times do |i|
fib(i)
endBelow is the source code for the fib sequence written in C++. Paul Solt recommended that the tests be performed without and writing to STDOUT due to the variability and slow down caused by writing to STDOUT. Since this was done for the C++ code it was done for the rest of the examples above. For the record there was no increase in speed when the output was removed.
C++
#include <stdio.h>
#include <iostream>
int fib( int n ) {
if( n== 0 || n == 1 ) {
return n;
} else {
return fib( n -1) + fib( n-2);
}
}
int main() {
for( int i = 0; i < 36; i++ ) {
fib(i);
}
return 0;
}Java
public class fibtest {
public static void main(String[] args) {
for(int i=0; i<36; i++) {
fib(i);
}
}
public static int fib(int n) {
if( n == 0 || n == 1 )
return n;
} else {
return fib(n-1) + fib(n-2);
}
}
}Perl
sub fib { return $[0] if $[0] == 0 || $_[0] == 1; fib($[0]-1) + fib($[0]-2); }
for($i=0;$i<36;$i++) { fib($i); }I would like to extend my thanks to the developers that submitted, or contributed to this post in anyway.
Java & Perl Code - Jason Koppe
Tip of the Day 2 - Ifconfig Polling Option and FreeBSD 6.3
In FreeBSD 6.2, you could add the polling option in /etc/rc.conf for a given interface or specify it manually when using ifconfig. This enabled device polling if you enabled it when recompiling your kernel. In FreeBSD 6.3 polling is no longer an option for ifconfig. So, make sure it is not specified in /etc/rc.conf for your network interfaces, otherwise when you restart, your network interfaces will not have an IP address set. Thus, leading to a rather annoying walk over to the server room.
Tip of The Day - Custom Kernel and FreeBSD-Update
When upgrading from FreeBSD 6.2 to FreeBSD 6.3 with freebsd-update (detailed here) and using a custom built kernel, there is one extra step to be fully upgraded. After you follow the three steps from the instructions and reboot for the second time, you will be unpleasantly surprised to see that you are still using a 6.2 kernel. In fact all you need to do now and go rebuild your customized kernel, install it and reboot. Now you will have a customized 6.3 kernel installed.
Older posts: 1 2