Apache 2.2 on Ubuntu 8.10


 
Thread Tools Search this Thread
Operating Systems Linux Ubuntu Apache 2.2 on Ubuntu 8.10
# 1  
Old 01-13-2009
Apache 2.2 on Ubuntu 8.10

Hello,

Does anyone know or know how to check if the Apache 2.2 version you can get with the Synaptic Package manager in Ubuntu 8.10has been optimized for 486 or higher processors?

I would think one would have to optimize the executable for 486 or higher processer baed on the Apache optimization guide below. I am a little new to Apache so I do not know if I have to do what they say below since I run on a processor greater than a 496(it is a little confuzing). Any advice?

Atomic Operations

Some modules, such as mod_cache and recent development builds of the worker MPM, use APR's atomic API. This API provides atomic operations that can be used for lightweight thread synchronization.

By default, APR implements these operations using the most efficient mechanism available on each target OS/CPU platform. Many modern CPUs, for example, have an instruction that does an atomic compare-and-swap (CAS) operation in hardware. On some platforms, however, APR defaults to a slower, mutex-based implementation of the atomic API in order to ensure compatibility with older CPU models that lack such instructions. If you are building Apache for one of these platforms, and you plan to run only on newer CPUs, you can select a faster atomic implementation at build time by configuring Apache with the --enable-nonportable-atomics option:

./buildconf
./configure --with-mpm=worker --enable-nonportable-atomics=yes

The --enable-nonportable-atomics option is relevant for the following platforms:

* Solaris on SPARC
By default, APR uses mutex-based atomics on Solaris/SPARC. If you configure with --enable-nonportable-atomics, however, APR generates code that uses a SPARC v8plus opcode for fast hardware compare-and-swap. If you configure Apache with this option, the atomic operations will be more efficient (allowing for lower CPU utilization and higher concurrency), but the resulting executable will run only on UltraSPARC chips.
* Linux on x86
By default, APR uses mutex-based atomics on Linux. If you configure with --enable-nonportable-atomics, however, APR generates code that uses a 486 opcode for fast hardware compare-and-swap. This will result in more efficient atomic operations, but the resulting executable will run only on 486 and later chips (and not on 386).
# 2  
Old 01-14-2009
Try "httpd -V". HTTPD 2.2.9 does not have the "atomics" compile-time option, so I cannot determine if this would work for you.

UPDATE: Oh oh. This seems to be a configuration bug of some sort AND the documentation is out of date. The configure code now (since long before 2.2.9) tests if the architecture being compiled for is greater than i486 and if so, it provides you with "generic" hardware atomics -- ie, pthread mutex locking. It looks like it should have used assembly atomics, but someone goofed and got it the other way around. SO unless your package is specifically for the "i386" architecture, it will have use the pthread calls, not the assembly calls. If you have the APR "libtool" installed (search your filesystem for apr-1/../libtool) check the file for what it sets "host" to. If it's not i386, I'm pretty sure you're not using mutexes.

I'm going to see what Apache developers say about this.

UPDATE2: I found the instance on the mailing archives where the configure code was changed. It was changed according to the comments, but I don't see why.

Last edited by otheus; 01-14-2009 at 10:18 AM..
# 3  
Old 01-14-2009
Quote:
Originally Posted by otheus
Try "httpd -V". HTTPD 2.2.9 does not have the "atomics" compile-time option, so I cannot determine if this would work for you.

UPDATE: Oh oh. This seems to be a configuration bug of some sort AND the documentation is out of date. The configure code now (since long before 2.2.9) tests if the architecture being compiled for is greater than i486 and if so, it provides you with "generic" hardware atomics -- ie, pthread mutex locking. It looks like it should have used assembly atomics, but someone goofed and got it the other way around. SO unless your package is specifically for the "i386" architecture, it will have use the pthread calls, not the assembly calls. If you have the APR "libtool" installed (search your filesystem for apr-1/../libtool) check the file for what it sets "host" to. If it's not i386 or not x86_64, I'm pretty sure you're not using mutexes.

I'm going to see what Apache developers say about this.

I am a little new to UBUNTU. When using the synaptic package manager, are the packages pre-compiled? I ask since since you say the "arhictecture being compiled for is greater than 486". Does syaptic download the package, check for the architecture and the compile or as I ask above are they pre-compiled.

Last edited by otheus; 01-14-2009 at 10:46 AM..
# 4  
Old 01-14-2009
That's a Ubuntu specific question, so I've moved the thread. I don't know the answer.
# 5  
Old 01-14-2009
Ubuntu packages are precompiled. The only Linux distributions that I know of that use local compiles are Gentoo and LFS.
But you can always install the source package and create a new binary package tailored for your system.
# 6  
Old 01-14-2009
Quote:
Originally Posted by pludi
Ubuntu packages are precompiled. The only Linux distributions that I know of that use local compiles are Gentoo and LFS.
But you can always install the source package and create a new binary package tailored for your system.
Well Otheus that answers my question. I will use the precompiled version of Apache then and then use httpd -V to make sure I am using pthreads then.
# 7  
Old 02-05-2009
I've been waiting for a while and still don't have an answer from the Apache community whether atomics are actually enabled on most x86 platforms. *sigh*
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Ubuntu

Re-install Ubuntu 14.04 from system with Ubuntu on it

I need to re-install ubuntu on a system with ubuntu 14.04 already installed. I have the cd but can not seem to boot from it or find the installer. Is there a way to re-install from the command line or how do I do a fresh re-install? Thank you :) ---------- Post updated at 10:13 AM... (2 Replies)
Discussion started by: cmccabe
2 Replies

2. Web Development

Apache module development on apache 2.2

Hi, I'm new to developing modules for Apache. I understand the basics now and can develop something simple which allows a 'GET' request to happen, but what I want to do is actually 'POST' information to my site. I know the basic POST Request works and I can see that it is post by looking at... (2 Replies)
Discussion started by: fishman2001
2 Replies

3. Ubuntu

[UBUNTU] mount.nfs fails in Ubuntu / Works on Red Hat!!!

Gurus, I want log in locally to my Lucid (10.04) workstation and have my code saved over the network on my samba account At work, all developers have samba user ids and when we were running Red Hat, we went thru the following procedure to get setup. * open a shell session to NFS server... (2 Replies)
Discussion started by: alan
2 Replies

4. Ubuntu

Ubuntu / Ubuntu File Manager / Config

I am using Ubuntu 9.10 with Gnome 2.28. I use the default Nautilus File Manager to view / manage files. Is there a way to add icons or customize the icons that are above the location bar and below the menus? There is a bar that has icons for "Back" "Forward" "Parent" above the location bar. I... (6 Replies)
Discussion started by: drewk
6 Replies

5. UNIX for Dummies Questions & Answers

Would like to install x86 desktop Ubuntu over AMD64 Ubuntu server

My intention was to build a dual boot XP Pro 64 and Ubuntu media server. I had installed the AMD64 version of Ubuntu 8.10 server and thought that I would be able to install Apache server. I need a GUI to work in. I tried to boot and install Mythbuntu 32 bit 8.10, but my machine now won't recognize... (0 Replies)
Discussion started by: docflyboy
0 Replies

6. Ubuntu

Zoneminder 1.23X, Apache and Ubuntu Intrepid -----No Video Output

I have install Ubuntu Intrepid and Zoneminder 1.23X. I have setup all of the all of the cameras and every time I try and run the cameras is cycle or montage mode I get no picture and I see a little emblem that resembles a broken connection. I checked /var/log/apache2/error.log and I can see that... (1 Reply)
Discussion started by: metallica1973
1 Replies
Login or Register to Ask a Question