Tag Archives: centos

news: inital xtradb vs innodb benchmarks are in

22 Dec

From: http://www.mysqlperformanceblog.com/2008/12/18/xtradb-benchmarks-15x-gain/

I guess it is first reaction on new storage engine – show me benefits. So there is benchmark I made on one our servers. It is Dell 2950 with 8CPU cores and RAID10 on 6 disks with BBU, and 32GB RAM on board with CentOS 5.2 as OS. This is quite typical server we recommend to run MySQL on. What is important I used Noop IO scheduler, instead of default CFQ. Disclaimer: Please note you may not get similar benefits on less powerful servers, as most important fixes in XtraDB are related to multi-core and multi-disks utilization. Also results may be different if load is CPU bound.

Check It Out:
XtraDB benchmarks – 1.5X gain in IO-bound load | MySQL Performance Blog

install jre on centos 5.2

28 Nov

Looking at my blog statistics shows that my post on “Installing the latest JRE 6 on CentOS” is one of the top positions. Also a lot of search engines referrals come to this post.

Thus I would like to give a short update to the blog post, since some things have changed since then. Also CentOS has been updated to Version 5.2 in the meantime.

The way I have done it with modifying the symbolic link in “/usr/bin/java/” still works, but it is not the recommended way to do it. Thus I follow here the path that the CentOS project has outlined. Where applicable I updated the link information. So, without further ado, let’s install JRE 6 or update it to the latest

jump:
SixSigns Blog » installing JRE on CentOS 5.2

Building somethng scalable: language / frameworks aka use ror or php

13 Nov

When I first started this experiment I planned on using a custom php framework. Recently I realized that its kinda pointless to attempt to do something like this and at the same time lock myself into something that may not be the best solution….

enter google, research, testing, and little sleep. Result: codeigniter was the best choice. Huh? Here’s why.

snakes not on the plane

I should say from jump: If I knew and had the time to learn python / django it would have been the winner, sadly I do not.

ruby, rails, hype

I’m a fan of ror, and of course when I decided to take what I’ve created so far and migrate it into something usable I of course thought of ruby on rails. Sadly I saw more than a few hurdles.

First off ror doesn’t play we’ll with others, meaning you shouldn’t run rails in a shared environment. The whole concept behind this experiment is a small start-up with a shoe string budget and 2-3 websites / apps. Yes its possible to host multiple rails apps on one server / vps, but it’s not recommended. There is of course passenger, but that leads into the next point. php +1

Ror is a resource hog, there I said it. When compared to php, rails is more resource intensive than php. Of course the answer is to optimize and scale out, but remember I’m trying to keep the monthly hosting budget under 100-120 bucks (yes seriously shoe string). So php was the choice here.

So far php seems like the best choice for what I’m trying to do, but I needed more than just a few issues I could work around. You can’t work around speed and optimizing. ruby is faster than php via command line, but ror is not amazingly faster when used via web. When you add an opcode cache into the picture ror gets is butt kicked hands down. Of course this is comparing a language to a framework, enter codeigniter.

Codeigniter still out performs ror with an opcode cache. That is just one optimization and php shows drastic improvement.

I wasn’t ready to abandon ror yet, simply put: why use an imitator if you can have the real deal. Codeigniter is a great framework, but it makes more since to actually use rails right?

In the end the answer is no. Rails has a higher level of maintainability out the box, but does less code, easier maintenance, and of course the ror cool factor out weight slower speed, higher cost to deploy, and fewer production optimizations? No.

MVC while not as strict in codeigniter, is there. That combined with OOP will make using a php framework easier to maintain, not ror easy, but easy enough for production imho.

framework, shamework

So we now know why php won over ruby, but why pick codeigniter? I originally started out writing a custom framework, which is always fun to do from time to time to push yourself, but in the end you see the downside and benefits of doing so. Since this entire idea revolves around a small start-up we also need to take development time into consideration.

A custom framework takes alot of trial and error, coding, and recoding, and still more coding. Using a php framework I can reduce the time it takes to get up and running, while still building what I want and need. Yes there’s some overhead compared to a custom framework, but in the end a start-up isn’t yahoo. You should be back at the planning table long before you reach yahoo numbers. Thats not to say you shouldn’t plan for massive growth (hence scalable), just that traffic / users / data on yahoo’s scale is far beyond my scope of experience and even I know its another elephant to eat.

When comparing php frameworks, i was originally looking at cakephp, but after some research found it to slow and with to much overhead. There are other frameworks, but only codeigniter and cakephp met my needs. 2-1=1 (or less than one mr. V), so codeigniter was the winner.

One thing I should note is how poor most of the php frameworks I looked at perform out the box. Yes rails (and merb) are better out the box. Luckily a few simple optimizations speeds things up.

all your base are belong to theory

So far everything has been pretty much all theory, research, and testing. No worries, the meat and potatoes are coming shortly.

the next few posts will cover setting everything up(centos5): memcached / memcachedb, ngninx, apache, varnish, mysql, s3 + rsync, varnish -> s3 relations, etc.

If you feel like following along head over to http://linode.com and setup a few machines, or setup a team in vmware.

Worth Reading

Here are few articles that I came across while researching, some are more on topic than others, but all have some value.

PHP vs Java vs Ruby:
http://www.cmswire.com/cms/industry-news/php-vs-java-vs-ruby-000887.php

Ruby vs PHP performance (cli)
http://izumi.plan99.net/blog/index.php/2008/01/17/ruby-vs-php-performance/

Ruby on Rails Fans
http://shiflett.org/blog/2006/feb/ruby-on-rails-fans

The performance test of 6 leading frameworks
http://www.alrond.com/en/2007/jan/25/performance-test-of-6-leading-frameworks/

And back to centos

22 Oct

Well once again ubuntu has turned into a much larger headache than needed, so now its back to centos :|

microsoft: our os sucks so badly we need to trick people into thinking its cool

6 Sep

I’m watching tv, only to see a commercial where windows is market testing a new os. “Holy crap” , I thought to myself, “they realized zista is shite and are already releasing a new os, thats gonna piss off some people”, but a smart move since as mentioned, vista is shite.

Then again, I’d never heard of the code name they used. Well guess waht it was vista.

So I’ve decided due to my all nighter, lack of sleep, and for everyones amusement, to tell you how my demo would have went.

I’m running a core2duo 2ghz with 4gigs of ram. I dual boot into vista 64 from time to time because, well actually i have not sane reason: I just do.


Loading vista: hmm looks kinda sweet
login screen: nice look
login: is this slower than xp?
system startup: crap this is slow

-I should note I only have firefox, antivirus, vmware, a firwall, pidgin, and the adobe web / creative suite installed. This is an install thats at best 2 months old, and rarely used.

start firefox: system hangs, kill firefox
start firefox: system hangs, wait 10 minutes

start vmware centos image: system degrades to p4 (pre ht) running xp, and under heavy load
check load : cpu 100%, ram 60%,

say crap why did I load into vista

reboot

opensuse 11 loads

I start up an xp vmachine with 313mb of ram, centos5 vmachine with 256 of ram, firefox, evolution, utorrent, gimp, pidgin, exalie, and a bunch of folders (forgot to mention opening my downloads folder almost crashes vista) including my downloads folder. Oh yeah I should mention I normally have 10-30 tabs open in firefox3.

open flash cs3, dreamweaver cs3, and virtual folders in xp

check my stats: cpu1 26%, cpu2 31%, ram 41%, swap 0%, upload 84k.

wonder why an xp machine thats barely using my cpu, and that has almost no ram out performs vista…..

and now to code, and eventually find sleep

linux: openSuse compared after some time

17 Aug

Its been over a month, so i figured its time to do an after action report.

Simply put I still LOVE openSuse. Of course theres a few things that need work, but overall its a wonderful distro that I strongly recommend.

Ok so for a bit of back story I’ve been using windows since i think 3.1. When i was a kid my dad taught me to use the green screens, and i’ve been using linux off and on since about 2000. Also I’ve rarely used kde.

Umm so wheres the review

Sorry if your expecting stats, screen shots, etc. Its is pretty much nothing more than opinion. Take it as you like, I’m just hoping to share my experience – hopefully helping someone else find their ideal os sooner.

4 machines – similar experiences

I’ve installed opensuse on the 4 machines: a new toshiba core2duo laptop, a p4 (pre ht) dell laptop, an amd x2 hp desktop, and a p4 ht dell desktop.

my experience has been pretty consistent acroos all machines with the following exceptions:

  1. There is no audio on the dell laptop. I’m sure this could be fixed, but the dell is more of a toy than something i actually use.
  2. Wifi refuses to work during initial setup on the x2. I’ve used both a linksys pci card and belkin usb device. Both are detected, but no signals are detected. As an fyi I’m able to stabily connect to my network from 50-80 (rough estimate )  feet from my place, so there are no signal issues here.
  3. Media support can be a bit annoying to get up and running.
  4. firefox / internet seems to run slower

now on to detials

Wifi

The wifi support in openSuse is by far awesome, for the most part it puts windows wireless support to same, and of course any and all of my past experiences with wireless on linux.

On the p4 dell I plugged in a wireless card that on ubuntu doesn’t even get reconigzed. Guess what? It worked, no drivers to install, no new device settings, it was up running and displaying my network quickly.

I have yet to have any wireless device not install and display in my connections list. This is a big plus for me as I’ve had bad experiences with wifi on ubuntu.

networking

I have yet to actually setup my network (sorry I’ve been lazy), but as far as getting a basic network setup it’s been no problem.

Theres really nothing to say here other than it works, I haven’t setup myth servers, file servers, etc. I do however have lamp servers running with no issues (disclaimer: I only use centos for development / production lamp servers).

Graphics

You knwo how they say a cool comp won’t help you pick up chicks? Their right, but it sure as hell looks cool when you bring someone over.

Compiz + emerald work damn near flawless. I’m not a gamer so i tend to get your basic video card. I’ve had no issues with eye candy. And to all you mac users: yes my eye candy kicks your eye candy in the arse.

I have the majority of my rendering set to medium levels and only experience lags when recording desktop.

You do not need a top of the line graphics to enjoy good eye candy. Running awn, compiz, and emerald barely taxes any of my systems except the dell p4 laptop which only has 512mb of ram.

Also of note: DUAL SCREEN SUPPORT! yes i know thats in caps, but seriously why can’t everyone handle dual screens like this. I briefly tried ubuntu 8.01 after a few months of 7.10 and honestly opensuse jsut feels more natural to me. Yes i prefer openSuse’s dual screen support to windows.

Eye candy

As already mentioned eye candy is everywhere in openSuse, imho they have the best layouts / designs for the bootscreen, login, everything, etc.

Speed

Fast – that simple, I experience occasional program hangs, and in total 3-4 system hangs, but then again i was messing with stuff.

So compare something already

Here is a list of os and what they do better than opensuse. Understand I’m comparing this way because it’s easier to just point out what another os does better, than to point out everything it does worst.

mint linux : media support, newbie friendly

Seriously I don’t think there’s another distro thats handling media support better than mint linux right now. That said the same support can be installed on openSuse fairly easily.

ubuntu : newbie friendly, media support

mint linux is based on ubuntu, so of course ubuntu is gonna beat openSuse in the same areas. media support is better on mint linux, but again open suse can be setup witht he same media support.

Where i think opensuse loses the majority of its newbie friendly points is yast. Yes yast is powerful, but dependency support is lacking. While ubuntu allows a newer linux user to quickly get a feel, we all know where and when its lacking so I’ll leave that alone. If openSuse improves their package management, denpency support, and loses the one-click installs for something less annoying, imho it will be on par with ubuntu. I should however point out that the stability of packages has not been a problem at all on openSuse as it was on ubuntu.

fedora : nada

I haven’t touched fedora in years, but based on feedback, theres no need to compare. If your looking at fedora look at either ubuntu or openSuse. also does anyone remember when fedora was the centos of linux?

slackware: old school

openSuse is slackware based, but much easier to use. Slackware however has more of the old school linux feel.

centos: anything lamp

centos imho is the only os to host on (well other than rhel). So simply put its better as a lamp envirnoment. Most software is tested on rhel / centos so you’ll have less install issues on centos. Lastly centos has been the most stable hosting os i’ve used. I left ubuntu after 3 days when i tried using it as a hosting envirnoment

rhel: see centos

mandrake linux:

to me openSuse just feels more linuxy – i know thats not a word but hopefully it makes since

closing thoughts

sorry I’m not really big on testing everything, just testing till you find what works best. There are plenty of new and old distros that may work for you. look around, google and ask around. openSuse might not be the best distro for you, but i highly recommend it to everyone. If your a developer that deals with lamp i highly recommend you try openSuse. I’m basing this on the fact that i’m a lamp developer.

That said my ex roommate was a windows network admin, he loved ubuntu, and prob will love opensuse. Speaking of which I should shoot him an email.

elsid Out

At last ffmpeg / ffmpeg-php installation for any linux distro

15 Jul

Ok so in the last 2 weeks I’ve written 3-4 ffmpeg installation tutorials (centos, ubuntu, source, ffmpeg-php). Yes I know I haven’t posted any of them. Today I ran across this

http://www.sherin.in/ffmpeg/index.php?option=com_content&task=view&id=14&Itemid=1

Guess that that link goes to? Yeap an auto installer that installs ffmpeg and ffmpeg-php. So basicly all the searching I’ve had to do to find dependencies, bug fixes, spefic distor packages, etc: was pointless

I’ve tested this on centos 5, ubuntu 7.10, and will test on openSuse shortly.

ffmpeg / ffmpeg-php installer:

http://www.sherin.in/ffmpeg/index.php?option=com_content&task=view&id=14&Itemid=1

Sid

install build tools on centos 5

7 Jul

When you first install centos 5, you’ll notice your unable to build from source (make / make install)

On ubuntu theres a package called build-tools that contains everything you need to build from source.

On centos you install them individually :

yum install gcc gcc-c++ autoconf  automake rpm-build make which libtool 

Or install everything you’ll need to build just about anything:

yum groupinstall "Development Tools"

Bye, Bye ubuntu

22 Jun

So I’m now pretty much fed up with Ubuntu. It’s a great os, but I’m having nothing but issues with it.

First were the wireless issues. For some reason ubuntu dropped the connection every 20min-2hours. I eventually got that fixed.

Next we’re the repo issues. If you pull a file from the main repo it should work, not be full of bugs. I like building from source, but thats seriously time consuming. On top of which finding where the bugs are is a pain in the ass

Then came the php5 issues, and now the latest issue with apache. I can have 5 different machines run the same conf, and the only ones having issues are the ubuntu server and my ubuntu desktop.

So now I’m back in vista, till I have time to install and setup openSuse. I’m also having to wipe my new server (again) and setting it up on centos. I was worried about going with ubuntu in the first place, but hey – what can ya do.

Sid

Install yum and subversion on media temple dv 3.5

29 Mar

Just upgraded one of my clients servers to dv 3.5. dv 3.5 uses centos 5 so when you install yum you’ll need to use that version

 

rpm -Uvh http://mirror.centos.org/centos/5/os/i386/CentOS/yum-3.0.5-1.el5.centos.5.noarch.rpm

Subversion is now included in the developer tools package. Login to your account center and install developer tools from there.

via hello, hellm