Vanilla 1.1.8 is a product of Lussumo. More Information: Documentation, Community Support.
What version of CentOS at ServerBeach do use as in x86 or amd64? As the 64bit version of binarys always use more memory then 32bit versions. All of slicehosts distros are 64bit versions. But besides that it still seems 100M memory is still alot compared to the others.
Good post on this
http://forum.slicehost.com/comments.php?DiscussionID=1275&page=1#Item_0
What number are you looking at in top? I’m running several mongrel instances on a CentOS 4 slice. They all claim 100 MB of virtual memory, but most only claim ~50 MB resident. The RadiantCMS site that gets hit fairly often (maybe 10 views/min peak?) has around 70 MB resident.
edit: it’s a 1024slice, fwiw
7678 mongrel 15 0 161m 56m 3644 S 0 22.1 0:03.10 /usr/bin/ruby18 /usr/bin/mongrel_rails start -d -e production -a 127
7675 mongrel 15 0 160m 56m 3652 S 0 22.0 0:03.37 /usr/bin/ruby18 /usr/bin/mongrel_rails start -d -e production -a 127
7672 mongrel 15 0 160m 55m 3636 S 0 21.7 0:02.92 /usr/bin/ruby18 /usr/bin/mongrel_rails start -d -e production -a 127
total used free shared buffers cached
Mem: 256 245 10 0 1 34
-/+ buffers/cache: 209 46
Swap: 511 25 486
On my CentOS 5 512slice, I was able to compile a 32-bit ruby binary after first installing glibc-devel.i386 with yum. I had to export CFLAGS=-m32 and LDFLAGS=-m32 before running configure. I also added —target=i686-unknown-linux-gnu, but I’m not sure if that was necessary. The result is this:
$ file ruby
ruby: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.
6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
$ ./ruby --version
ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-linux]
Might be worth trying it with your app to compare the memory usage. Realistically, comparing memory usage of your app to mine or anyone elses isn’t too scientific…
I'm running mephisto via one mongrel and 3 php-cgi processes behind nginx (2 processes) as well as mysql. My mongrel process is currently at ~62M res/135M virtual. I don't really think 64bit architecture is your problem. Is your app on Slicehost running in development mode?
Hmm…with my fresh install, mongrel’s http11.so library is already 32-bit:
$ file usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/http11.so
usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/http11.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped
I wonder if that’s because I still had CFLAGS/LDFLAGS=-m32 exported when I ran gem install, or because gem is somehow configured to build in 32-bit instead of 64…‘gem environment’ lists this:
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
Posted By: gobigdaveI figure that was the issue. Now, I need dig into gem install to figure out how to do that. I have a feeling, however, that I may need to simply accept it. Although, I still question the need for 64 bit for any slice under 2gig.
Posted By: slamb
I believe you’re right that with Xen paravirtualization, the domU and dom0 architecture must match. But you can definitely use i386 userspace binaries inside an x86_64 kernel (Xen or not), and that’s what I was referring to. In fact, I have a mix on my slice now.
The memory limit for 32bit architecture is 4GB (3.5GB if you're running a less than superior OS), not 2... just, FYI :)
Yeah on x86, Linux requires you to enable large memory support in the kernel if you have more than a gig. I suspect on x86_64 that configuration option is ignored since it’s pointless…
When I tested this, I just compiled as a regular user and installed under my home directory. This is pretty painless…all you need is something like ‘—prefix=${HOME}/usr’ passed to the configure script for ruby. Just make sure you have ‘${HOME}/usr/bin’ in your PATH variable before anything else (and also the other stuff I talked about in previous posts, like CFLAGS/LDFLAGS and perhaps the ‘—target’ parameter, and also glibc-devel.i386 installed on the system).
edit: I should mention I had a problem with Rails 2.0.2 and the openssl external module from Ruby. On our production web server, I ran into the same problem when I upgraded to 2.0.2: mongrel refused to start because I hadn’t enabled ext/openssl and ext/digest/md5 when I first installed Ruby. After I enabled them and recompiled Ruby, mongrel was happy again. When I was playing with compiling for 32-bit on the new server, I also encountered this problem (because I forgot to enable those extensions). However, when I tried to enable them, ext/openssl wouldn’t compile. It wasn’t throwing an error, the Makefile simply wasn’t issuing any compile commands. I have no idea why…I have both versions of the openssl and openssl-devel packages installed. Rather than trying to diagnose this, I just downgraded to Rails 1.2.6, since it didn’t really matter for my basic test. If your app requires Rails 2.0.2…you may run into this. Let me know and I’ll go back and poke it again (which a bigger stick, perhaps).