Forum OpenACS Q&A: Best OS for OpenACS - FreeBSD or Linux?

My company is in the beginning stages of implementing OpenACS and I have just gotten a very strong recommendation from a friend that I use FreeBSD instead of Linux as an OS. His arguments are that when you want extreme reliability FreeBSD is better. His proof, check the

uptime logs.

I assume that Open ACS will work on either OS, but is there a preferred OS? We are likely to be running on Intel machines. Any thoughts?
Collapse
Posted by Don Baccus on
There are many, many sites in the world running Linux that are staying  up for very long periods of time.  My own personal OpenACS-backed site has been up for 145 days now.  I forget exactly why I rebooted it  but I'm sure I had a good reason and am absolutely positive it was voluntary and intentional.  The openacs.org site's been up for 118 days.  The machine running my photo site (donb.photo.net) has been up for 139 days.

These are reasonable figures for most people's websites.

The main argument for running Linux is that we know for certain that all the pieces needed for OpenACS install with absolutely zero hassle on RH 6.2 and similar vintage 2.2 kernels and the associated glibc.  Most of the ACS folks who are running on x86 hardware are running on RH 6.2 because Oracle supports Linux and in particular documents and tests against RH releases.  While you're using PostgreSQL rather than Oracle, I'd say your chances of getting instantaneous help from folks here are higher with the Linux platform.

Note my argument isn't based on the least on "which operating system's better".  My argument is based on the fact that most of us here, for better or worse, are running Linux and therefore you're less likely to  run into installation hassles if you do, too.

Also, my arguments against running FreeBSD apply equally strongly to RH 7.0 Linux.

Collapse
Posted by Stephen van Egmond on
My focus on operating systems is how easy it is to administer, in particular for security patches and new software distribution. I agree that FreeBSD seems more stable. If you don't mess with it, it will stay up forever. In my experience with a real live production site, it is impossible to avoid messing with them. There is a terrifying complexity curve as traffic goes up.The winner for administration in my books is Debian linux. Security updates are usually about as simple as typing
apt-get updateapt-get -u upgrade
New packages (e.g. you need squid because your server is running out of spare connections):
apt-get install squid
Deinstallations are clean, and dependencies are just magically taken care of. The Debian project members are obsessive about keeping the tree labelled "stable" stable. RPMs, in contrast, are a terrible mess. I'm saying this after a few years of trying Slackware and Red Hat.
Collapse
Posted by Edmund Lian on
My experience mirrors Stephen's. I've tried all the Linux distributions, and even ran FreeBSD for awhile. Debian is the easiest to keep updated. FreeBSD is great too, but the ports system it uses lacks the sophisticated dependency resolution system that Debian has. The regression testing that the Debian project goes through is excellent, and this is why it takes longer for Debian to fold in the latest/greatest revisions of anything.

If stability and reliability are important to you, you can't go wrong with either FreeBSD or Debian. I'd say FreeBSD is ahead in this regard, but not by much.

If you want a brainless upgrade/installation mechanism for your bad-hair days, I'd say Debian has the edge over FreeBSD.

In addition, Debian is a good compromise between stability, and the desire to benefit from the widespread device support and rapid evolution that Linux in general exhibits.

The only downside with Debian is that the initial install is not as smooth as other distributions. With the good documentation out there these days however, this should not be a problem.

Collapse
Posted by Talli Somekh on
I _strongly_ warn against using FreeBSD. We tried it for a few months and it regularly kicked our ass until we switched back to RH6.2. AOLserver simply is not well supported on that platform yet.

Perhaps we did something wrong, but everything we did do never worked. It got to the point where we were rebooting our servers 2 or 3 times a day because of memory leaks and hung processes.

If you can figure out a way to get it to work or can submit a patch, booya. We'd love to be able to use a *BSD for no other reason than greater familiarity.

But as Don said, what works is best. Strip out all the default security holes in RH 6.2 and you can feel secure your system will run.

tal

Collapse
Posted by Jacques Williams on
Just to add some detail to Talli's post about our experience with OpenACS on FreeBSD (actually, of course, the issue is AOLServer on FreeBSD):
  • AOLServer will compile and run (mostly) fine on FreeBSD. The problem is with the tcl "exec" command, which executes whatever command is called from it, but returns an incorrect value. This causes programs to return an error page, even though the command has executed properly, thereby causing confusion, alarm, and despair. The folks at AOLServer have assured me that this will be fixed Real Soon Now.
  • As a workaround, we tried running AOLServer on FreeBSD under Linux emulation. This is where we ran into the problems Talli was talking about. In this mode, threads do not exit properly, filling the process table with thousands of zombie processes, many of which hold locks on core that can't be released except by a reboot.
As soon as I get to a point where I feel comfortable taking on additional responsibilities, I will volunteer with the OpenNSD project to try and clear up *BSD related bugs. The AOLServer team apparently focuses their development efforts on Solaris and Linux, and supporting other platforms is not a high priority for them.
Collapse
Posted by Don Baccus on
Jacques - do you have any insight as to why the Tcl exec command's screwing up?  It seems like one of those things that should be easy to fix for someone with a running FreeBSD (not me!)

If that's really the only problem with AOLserver on FreeBSD I'd hope we can get it fixed for opennsd.  At least we'd be willing to include such a fix in our version!

Collapse
Posted by Jacques Williams on
The command called by exec usually seems to run just fine, but the OS returns an "incorrect system call" error. I do have a running FreeBSD system at home, and it's possible that I will be able to take a look at this in the next week or so.
Collapse
Posted by guido van driel on

flame fest at 9.

Seriously, I run OpenACS on FreeBSD and sometime this weekend i'll be adding an OpenBSD box to the mix. I expect to find just as little problems doing that as i've found installing OpenACS on FreeBSD.

here's a little howto:

  • Install FreeBSD (I assume you know how to do this, excelent information on this subject is all over the internet).
  • create a user for running openacs.
  • install aolserver, qmail, and postgresql from the ports (if you are installing over FTP you will have the latest ports otherwise get the individuhal ports from freshports.org)
  • cd /usr/ports/mail/qmail ; make install ; make disable-sendmail ; make enable-qmail.
  • cd /usr/ports/databases/postgresql ; make install
  • cd /usr/ports/web/aolserver ; make install
  • add kern.maxfiles=4096 to /etc/rc.sysctl

as the newly created openacs user:: get the source through cvs from cvs.pg-acs.sourceforge.net.

now follow the documentation.

That is (admitted in a nutshell) what I had to do to get FreeBSD prepared to run OpenACS.
see, that wasn't hard :-p)

What it comes down to IMNHO is wheter or not you consider yourself to be a *NIX hacker (as opposed to cracker) or a competent system administrator, if you are a hacker go with Debian GNU/linux. Are you a system administrator that depends on a consistent and stable system run with the *BSD crowd.

Collapse
Posted by Roberto Mello on
Both FreeBSD and GNU/Linux are great OSs. BSD-religious will usually say the BSD is "more stable" than Linux, or that Linux people only do "hacks" instead of "good programming".

Frankly, I don't think this is true. Mostly it's jealousy for the popularity of Linux. The comment above that "if you are a hacker go with Debian GNU/linux. Are you a system administrator that depends on a consistent and stable system run with the *BSD crowd" is a perfect example of this.

Both OSs are plenty stable. Both OSs require quite a bit of mastery of system administration. The poster just has a skewed view since he's used to FreeBSD. But Linux has better support from the industry (hence your machine will have better support), and has grabbed more mindshare.

As a side note, you can easily install Debian if you have unix experience. If you don't have that much experience, you can install Progeny Debian (www.progeny.com), to have a system with the quality of Debian that is easy to install.

The sites pointed as "most reliable" by Netcraft on the link posted on the first post of this thread are all obscure sites that probably get few hits per day, or that are really only serving .jpgs (many sites in that list are porn sites). Windows 98 will serve a few jpgs  a day fine with personal web server just as well.

I've seen Linux machines running for years without reboot. It's not a question if Linux is stable or reliable. It IS stable and it IS reliable. Now if an MCSE grabs a CD with RH 7 (it happens very often), installs it and gets cracked into, it's not really Linux's fault (you can argue it's RH's fault for releasing such buggy distro).

BTW, have the threading issues been resolved in latest versions of FreeBSD? AFAIK multithreaded apps had trouble running on FreeBSD because of it.

Collapse
Posted by Don Baccus on
Well, guido ... you've just volunteered yourself to write aFreeBSD-specific installation doc, haven't you? :)

Our docs are mostly RH 6.2 Linux specific.  Write us good docs that allow folks to  simply and reliably install under FreeBSD and we'll say "our docs  are written with RH 6.2 linux and FreeBSD in mind".

That's all it takes.

For the PG version of OpenACS, anyway.  Those wanting to run Oracle with OpenACS 4.x will have to deal with linux compatibility libs and the attendant and aforementioned problems they seem to have.

Oracle's direct support of Linux rather than *BSD is why I've stuck with Linux, I gotta be able to run both Oracle and PostgreSQL on the same box.  Oracle's hassle enough without begging for trouble and straying from their reference platform.

there is also this nasty problem with EXEC that jacques mentions.

Have you tried the tcl exec command to see if it works correctly on your installed aolserver?  We won't be able to run OpenACS 4.x on Free BSD without a fix for this problem as the bootstrapper relies on EXEC to load datamodels, etc.

Collapse
Posted by Mario P. Bontempi on
We tested both systems for a few months, intensely.

Frankly, FreeBSD "felt" much better to manage, was quite a bit
faster (same hardware box), and a bit more stable.

Overall, I would consider them equal: we chose FreeBSD
becuase of the many little niceties helping considerably
managing the system.

I do not want to seem silly, but I was almost getting the same
difference in "feeling" that I have using MacOS vs Windows...

Priyadarshana

Collapse
Posted by Mario P. Bontempi on
Guido,

that would be great!

We really would like to use ACS on our FreeBSD server...

Collapse
Posted by guido van driel on

Don: Guess I have :)

Roberto: Please take all of this lightheartedly, your comments on *BSD religion apply to linux zealots aswell.

I've gone through RH 5x, suse, slackware and Debian GNU/Linux before switching to OpenBSD and FreeBSD. What I found was that _I_ (let me stress that again, for _ME_) the quality of the documentation sets the two beasts apart.

If you do not have a C inclination or a CS background i.e. are not a hacker out to discover this wonderfull world we call GNU/Linux then _I_ would suggest *BSD but thats just me. YMMV

Haven't run into any EXEC probs, but will check.

(check http://zer02-9.cortex.nl/openacs-freebsd in a few days.)

Collapse
Posted by David Touitou on
I've setup a FreeBSD server (stable) running Postgresql 7.02, AOLServer and OpenACS 3.2.4 yesterday. Took me the whole day : morning to setup FreeBSD and "stable" it, afternoon for OpenACS and co (using the ports, as Guido said).
I'm a totally newbie to OpenACS, I've taken notes and hope to be able to put them on the web quite soon.
The _only_ thing I can see against FreeBSD is its Java non-support (I've understood Java is needed for the OpenACS WebMail)...
Collapse
Posted by Talli Somekh on
Nobody said you _couldn't_ set up a FreeBSD server. It's just that when you get into development or production and need to use things like the tcl "exec" command the system starts getting unbearably buggy.

When you guys solve the problem, everybody will be extremely grateful.

tal

Collapse
Posted by Connie Hentosh on
Okay.. I think I have a valid solutions for the tcl exec problem. Can anyone tell me other problems occured with OpenBSD and OpenACS/Aolserver?

Here is the patch for aolserver3_3_1 (which compiles cleanly for OpenBSD without the mods to include/Makefile.global that 3.2 needed)

diff -u aolserver3_3_1/tcl8.3.2/unix/tclUnixPipe.c aolserver3_3_1_patched/tcl8.3.2/unix/tclUnixPipe.c
--- aolserver3_3_1/tcl8.3.2/unix/tclUnixPipe.c  Thu Aug 17 17:46:15 2000
+++ aolserver3_3_1_patched/tcl8.3.2/unix/tclUnixPipe.c  Mon Apr  9 13:52:39 2001
@@ -949,13 +949,16 @@
      * possible, if the channel is in blocking mode. If the channel is
      * nonblocking, the read will never block.
      */
-
-    bytesRead = read(GetFd(psPtr->inFile), buf, (size_t) toRead);
-    if (bytesRead > -1) {
-        return bytesRead;
+    while (1) {
+        bytesRead = read(GetFd(psPtr->inFile), buf, (size_t) toRead);
+        if (bytesRead > -1) {
+           return bytesRead;
+        }
+        if ( errno != EINTR ) {
+           *errorCodePtr = errno;
+           return -1;
+        }
     }
-    *errorCodePtr = errno;
-    return -1;
 }
 ^L
 /*

Connie,

That patch works great for me on FreeBSD as well, and allows me to
install OpenACS 4.  Thanks.

It's irritating that *BSD are still getting a black eye for this --
I found my first failure-to-check-for-EINTR in AOLserver back in
February 2000, in ns_sendmail.  I wonder what's different on
seemingly every other OS, that this problem doesn't show up.

Here is another patch that solves the same problem (interrupted system calls). With this, as with Connie's patch, I can now install OpenACS 4 on FreeBSD 4.3 with AOLserver 3.4.

This patch is more general -- with luck it will catch all instances of the problem. Does anybody see anything wrong/broken with this approach? (I just sent this to the AOLserver mailing list as well; we'll see what they say.)

*** thread/signal.c~    Tue Aug 14 20:25:26 2001
--- thread/signal.c     Tue Aug 14 20:26:15 2001
***************
*** 114,120 ****
  {
      struct sigaction sa;
  
!     sa.sa_flags = 0;
      sa.sa_handler = (void (*)(int)) proc;
      sigemptyset(&sa.sa_mask);
  
--- 114,120 ----
  {
      struct sigaction sa;
  
!     sa.sa_flags = SA_RESTART;
      sa.sa_handler = (void (*)(int)) proc;
      sigemptyset(&sa.sa_mask);
  

Matt:

Why don´t you apply the these patches to the port of aolserver?

Collapse
Posted by Marc Spitzer on
I just sent the 3.4 patch to the freebsd port owner