fun with random uptimes

I’m still pushg my little virtual server account to the limits, and it’s learning to push back. I’ve been playing with it all day, and the site and database have been up and down many times.

I did find one interesting thing that helped a lot, a blog post that talks about how to tell GCC not to use the 4g of RAM that the machine has, but rather the 232 mb that are allocated to me. Or something like that. It works rather well setting my ulimit and CFLAGS, but as the author notes in a later post, that doesn’t work on everything. I can confirm that. Changing the ulimit helps out a lot of stuff, but changing the CFLAGS will only help on small packages, and make stuff like PHP or MySQL come to a grinding halt with fun messages like this:

cc1: out of memory allocating 64649136 bytes after a total of 3051520 bytes

Unfortunately, distcc isn’t really an option right now anyway, since the connection at home is so spotty. Speaking of which, I called up Speakeasy today and signed up for an account. It’ll cost me around $90 a month after taxes for a nice fast connection, but I think I’m okay with that. Besides, I don’t mind paying a premium in order to not have anything to do with Qwest (our local Ma Bell conspiracy).

One thing I did change is the CFLAGS from march=i686 to mtune=pentium4.  That seems to have helped, but it could just be my imagination.

So, the moral of this story is that a virtual server is fun and all, but you’re really going to have a tough time compiling everything. I’d say it’s not worth the hassle at this point, but I already signed up for a three month haul, so I’m gonna stick it out. What’s really interesting is that while the compiles are slow, the disks and network are still incredibly fast, so serving up webpages is nice and snappy. There’s a lot of tradeoffs.

If you’re looking to get one, I’d say go with a provider that will give you a personal swap space. That might make a difference. I’m going to try and find out if there’s some way I can create one on my current filesystem (the disks come pre-partitioned). I gotta do something.

# vpsfree
VPS Memory:
total: 232 mb used: 154 mb free: 78 mb


3 thoughts on “fun with random uptimes

  1. Infirit: That doesn’t work. You simply can’t have swap inside a VPS on OpenVZ. You get a nice fat “swapon: swapfile: Operation not permitted” when you try.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s