Now running with nginx!

I was really fed up with Apache on this server. It would use huge amounts of RAM, even after all the visitors left the website. Having done all tweaks to the memory usage of Apache and PHP, the amount of RAM used would never get below 450MB (out of the 512MB this VPS has). Hell, Apache was consuming even more memory than MySQL!

For those who don’t know, nginx is an alternative, lightweight webserver which is generally used (by many popular websites) as a load balancer. However, it can also act as the single web server on a system, like what Apache and Lighttpd do. I had worked with nginx before on some small websites on low-resource servers, and I was quite satisfied with it. As I explained with an earlier blog post, nginx is great as long as the website you want to serve with it does work with nginx – that is, doesn’t heavily depend on Apache rules or some Apache-specific thing. Sure, those rules can be converted to nginx config options, but I never succeeded on making eyeOS 1.x work fully with nginx.

WordPress is one of the scripts that works best with nginx. Since this website is mainly powered by nginx (although I have some custom scripts laying around, mainly the scripts providing alternative WiiMC internet media), I made my mind and decided I would go through the hassle of switching from Apache to nginx. It wasn’t a big hassle after all: apart from having to restart the server at some point due to a RAM outage, the website wasn’t offline much time, and there was no data loss.

After putting Apache off-use and starting nginx, the server was still using 300MB of RAM. I though nginx couldn’t be using so much RAM, and there was another problem laying around. Turns out to be a problem in MySQL config: I don’t need InnoDB functionality, so usually I add a “skip-innodb” line to my.cnf. The problem was, this line needs to be added under the [mysqld] section and in my case, it was somewhere else. So I moved skip-innodb to the right place, restarted MySQLd, and that’s it:

The server is now using 240MB of RAM, which still fits inside the dedicated RAM (256MB), so I’m not taking any of the burst RAM, which resides in the server swap space. The RAM usage is still high, because I have other things running such as dovecot for mail delivery.

It also looks faster to load pages, but probably someone with a faster connection than me will notice a bigger difference.

Ubuntu updates are killing me

OK, not really. But I thought it’d be a great title for this post.

This is a personal opinion/story post and won’t help you much if you came here from a search result page, while looking for a solution for a problem on your Ubuntu installation. If that’s your case, don’t waste more time reading this post, as probably it won’t help you (but you might find your situation similar).

For those who don’t know, I use Ubuntu on my main desktop as the main OS. Yes, I know how to work with Microsoft Windows, but I don’t use it much at home.

The problem in my case, I think, comes in part from having a lot of packages installed due to the fact that I have both Gnome and KDE installed, although I never use KDE nor its apps. Sometimes, some conflicts with the package updates appear, specially because I have packages from PPAs and other unofficial repositories.

Since the release of Ubuntu 11.04, which I won’t update my PC to too soon, Ubuntu updates manager keeps bothering me about a “partial update”, that basically would just update my Ubuntu 10.10 install to a semi 11.04, something I don’t want. I hate these package updates. I know it won’t install Unity and set it as default Desktop Environment, but still, I don’t want to have a half-10.10-half-10.04 Ubuntu specially when such updates will delete for sure certain “mods” I did to my install like the custom bootsplash, the mintmenu (yes, it was on the list of packages to remove with the partial update), and the custom repositories and PPAs (now you know why I put “mods” between quotes, it’s because these really aren’t mods).

Well, I ended up doing the “partial update”. I lost the Linux Mint menu, obviously, but not the bootsplash. Now you ask, if I was so bothered about updating, why did I proceed? Because I eventually know I’ll switch to another Linux distro soon.

Fedora was a possibility, but since I saw the new version, it’s out of the list. Reason: it brings Gnome 3 and it’s basically a copy of Unity, so now I’m hating both of them: Unity for being a copy of Gnome 2 with flashy effects, a dock, and other MS-Windows-7-style “innovations” that would make sense in a tablet or mobile phone, or even an interactive coffee table, but that I hate having on my desktop –  it’s just not productive; and Gnome 3 for being a copy of Unity – or is Unity a copy of Gnome 3? Doesn’t matter: I find either of them unproductive and too eyecandy, to not say that I need two or more clicks to perform an action that on Gnome 2 I do with one click: for example, switching from one window to another (fortunately, they have kept Alt+Tab!).

Seeing as I’m very exigent with the Desktop Environment of the distro I use, perhaps I’ll just stick with this Ubuntu and its malfunctioning updates… well, if I weren’t lazy, I have the knowledge to fix it, but it’s simply too much work, I repeat, I’m lazy…

Ubuntu 11.04 – But is it Ubuntu or MacOSX?

I just took the time to download the latest version, 11.04, of Ubuntu Linux, burn a the image to a CD and boot the live CD – which is where I’m writing this from.

What I’m seeing and using really disappoints me. To simplify this post in a single line, I only need to say:

If I wanted a straight copy of Apple’s Mac OSX operating system user interface with the predominance of purple and orange, I would buy a Mac or at the very least hackintosh a PC then install a purple theme on it.

But let’s start from the beginning. The CD booted into a purple (an horrible color that Canonical keeps on choosing since version 10.04, to contrast, perhaps, with the orange of the default theme) screen with just two icons at the bottom, a keyboard and an accessibility one. This was the boot manager, who would say? – not only a single line of text. I was trying to figure out how to work with that screen (keyboard left, right, up, down, enter, escape and even tried the mouse with no success in any of these inputs) when, from nothing, the system starts booting: first the usual cursor blinking at the top left corner, then the cursor gets smaller because the resolution of the screen was increased, and the bootsplash is shown.

The bootspash keeps being very, very similar to the one used in the two previous versions of Ubuntu. A purple background with the Ubuntu in white at the very center with five white dots below, blinking into orange sequentially. One thing new in this bootspash might be, and I say “might” because I can’t remember very well the latest version’s splash, a little white glow around the Ubuntu logo.

The bootsplash doesn’t go away in the traditional way, that is, disappearing the Ubuntu logo and then appearing the login screen. First, the background fades into a purpleish image, keeping the Ubuntu logo fading even more slowly… after some time, the logo has completely vanished, a black bar at the top appears with some icons (network, clock and shutdown options), and I call it black bar, because it’s not a panel anymore, since it’s not Gnome anymore, but yes Ubiquity. Then a window appears asking me if I want to Try Ubuntu or Install Ubuntu.

I chose to Try Ubuntu: the window disappears, and the screen goes into the old white on black Linux system log (saying things about filesystems and etc.) for about a second and a half and then a black screen with the mouse cursor in the middle appears – it looks like X server had been restarted. Just a note for the guys at Canonical, this is not a really polished approach to “Try Ubuntu” option, leaving users waiting on a black screen with a mouse – if users should wait at all, but hey, I understand the CD has to be loaded sometime.

Finally, the purpleish background image appears again, the top black bar appears too, but now with more icons, some icons in the desktop appear and a kind of dock with a bunch of icons appears on the left. Get ready: this will be the base for the Ubiquity desktop. I took a screenshot, but note that this is after I was running Firefox, but it lets you have an idea of what I’m talking about:

[Image not available due to data loss, during a server change that forcibly took place on 1st December 2011. You can find images similar to the one that was here by searching for images about “ubuntu 11.04 default desktop”]

I played around a bit just to get to one conclusion: this is almost MacOSX with a dock on the left. By the way, the dock appears if you move the mouse to the top left corner of the screen, and also if you move the mouse to the complete left of the screen and let it there for some time – I hate this approach.

Ubuntu, years ago accused of trying to implement Windows UI and feel on Linux, in my opinion seems to be trying to bring MacOS UI to the Linux kernel since some versions ago – but in a much more shameless and obvious way. I don’t like Linux this way, I liked Ubuntu the way it was before: with Gnome and the windows closing, maximizing and minimizing icons on the right and not on the left. So, I’m sticking with Ubuntu 10.10 for now, and when it gets too outdated, I’ll switch to some distro with Gnome (even KDE is better for me than Ubiquity, even if I don’t like KDE as much as Gnome).

It seems my Ubuntu days are ending. In my opinion, version 11.04 of Ubuntu by Canonical was like Vista version of Windows by Microsoft: too much focus on the looks and few productivity.