Sun buys MySQL for $1bln!

Wednesday, January 16th, 2008

Updated: March 18th, 2008

"Didn't see that one coming. Their blog contains details to what this could mean for both companies. May as well be one of the most important takeovers of 2008 already!"

read more | digg story

Could this mean that the mysql cluster is finally going to get proper development attention? I don't know but sure as hell hope so. Congratulations to all mysql employees!

Make Screen and YaST Work Together

Sunday, November 4th, 2007

Updated: March 19th, 2008

I don't know about you but I've had a lot of problems making screen work nicely with YaST. Both putty and SecureCRT had major problems displaying YaST's ncurses interface. The screenshots below depict the problem quite clearly. If at this point you don't see anything like this, you are most likely not affected and can go get a beer.

image

image

If you are seeing similar problems, here's the fix. After digging around a bit, I have discovered that the problem was incorrect data encoding. My character set was set to KOI8-R while ncurses expected UTF-8. Here is how to change the corresponding setting in putty:

image

image

… and SecureCRT:

image

image

Now restart YaST and voila:

image

image

P.S. You may be wondering why my screen (the GNU one) has a handy footer bar and how to configure it. Not to worry, I will be posting more info on it soon.

cpan - The Perl Module Manager

Friday, October 12th, 2007

Updated: March 19th, 2008

cpan is a perl module manager. To get into cpan, login as root and type in

cpan

Install a module:

cpan install MODULE

Upgrade a module:

cpan upgrade MODULE

Reinstall a module or force install in case of failed tests:

force install MODULE

See a list of upgradable modules:

r

See cpan configuration (that's the letter 'o'):

o conf

Update an option in cpan configuration:

o conf OPTION_NAME OPTION_VALUE

It is always nice to:

upgrade CPAN
install Bundle::CPAN

If there's an error making a Perl module, it can be caused by a missing make path in cpan configuration. In cpan, type in:

o conf

which will show all cpan options, then:

o conf make /usr/bin/make
o conf commit

A good option is:

o conf prerequisites_policy follow

By default, cpan will prompt to install every dependecy while installing a module. This option will automatically install dependencies without prompting.

sysbench - Linux Test Bench

Friday, October 12th, 2007

Updated: July 23rd, 2008

sysbench - Linux test bench. Easy as pie to test CPU, memory, threads, mysql, and disk performance.

Full description is available here: http://sysbench.sourceforge.net/docs/

install mysql, mysql-devel
wget http://superb-west.dl.sourceforge.net/sourceforge/sysbench/sysbench-0.4.8.tar.gz
tar xvzf sysbench*gz
cd sysbench*
./configure && make install

mysql tests

This will run 10 separate consecutive mysql tests using an InnoDB table type, each with 100 mysql threads, doing a total of 1000 various SQL operations per test. Then it will print the total time they took to finish:

sysbench --test=oltp --mysql-user=USER --mysql-password=PASS --mysql-db=test \
  --mysql-host='HOST' --mysql-table-engine=innodb prepare
 
time perl -e "foreach(1..10){print \`sysbench --max-requests=1000 --test=oltp \
  --mysql-user=USER --mysql-password=PASS --mysql-db=test --mysql-host='HOST' \
  --mysql-table-engine=innodb --num-threads=100 run\`}"
 
sysbench --test=oltp --mysql-user=USER --mysql-password=PASS --mysql-db=test \
  --mysql-host='HOST' cleanup

I've recently installed eAccelerator on the web server that hosts this site and I wanted to share some of my impressions after a few days.

  • What does it do? Nobody put it better than the eAccelerator team itself: "eAccelerator is a free open-source PHP accelerator, optimizer, and dynamic content cache. It increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution. eAccelerator typically reduces server load and increases the speed of your PHP code by 1-10 times."
  • Does it work? Hell yes. beerpla.net loads on average twice as fast as before. The results are consistent, so I'm very impressed.
  • Ease of installation. Extremely easy. Compilation from source tarball, adding a few lines into php.ini, and apache restart is all it takes. Full instructions here.
  • Feedback from companies who have installed eAccelerator is here. It's hosted by eAccelerator themselves but seems to be legit.

/End of short note