Tag Archives: Fedora

Redis, Memcached, Tokyo Tyrant and MySQL comparision

I wanted to compare the following DBs, NoSQLs and caching solutions for speed and connections. Tested the following

My test had the following criteria

  • 2 client boxes
  • All clients connecting to the server using Python
  • Used Python’s threads to create concurrency
  • Each thread made 10,000 open-close connections to the server
  • The server was
    • Intel(R) Pentium(R) D CPU 3.00GHz
    • Fedora 10 32bit
    • Intel(R) Pentium(R) D CPU 3.00GHz
    • #1 SMP
    • 1GB RAM
  • Used a md5 as key and a value that was saved
  • Created an index on the key column of the table
  • Each server had SET and GET requests as a different test at same concurrency

Results please !

Work sheet

throughput set

throughput get

I wanted to simulate a situation where I had 2 servers (clients) serving my code, which connected to the 1 server (memcached, redis, or whatever). Another thing to note was that I used Python as the client in all the tests, definately the tests would give a different output had I used PHP. Again the test was done to check how well the clients could make and break the connections to the server, and I wanted the overall throughput after making and breaking the connections. I did not monitor the response times. I didnt change absolutely any parameters for the servers, eg didn’t change the innodb_buffer_pool_size or key_buffer_size.


MySQL lacked the whole scene terribly, I monitored the MySQL server via the MySQL Administrator and found that hardly there were any conncurrent inserts or selects, I could see the unauthenticated users, which meant that the client had connected to MySQL and was doing a handshake using MySQL authentication (using username and password). As you could see I didn’t even perform the 40 and 60 thread tests.

I truncated the table before I swtiched my tests from MyISAM to InnoDB. And always started the tests from lesser threads. My table was as follows

CREATE TABLE `comp_dump` (
  `k` char(32) DEFAULT NULL,
  `v` char(32) DEFAULT NULL,
  KEY `ix_k` (`k`)


For Tokyo Tyrant I used a file.tch as the DB, which is a hash database. I also tried MongoDB as u may find if u have opened the worksheet, But the server kept failing or actually the mongod failed after coming at an unhandled Exception. I found something similar over here. I tried 1.0.1, 1.1.3 and the available Nightly build, but all failed and I lost my patience.

Now what

If you need speed just to fetch a data for a given combination or key, Redis is a solution that you need to look at. MySQL can no way compare to Redis and Memcache. If you find Memcache good enough, you may want to look at Tokyo Tyrant as it does a synchronous writes. But you need to check for your application which server/combination suits you the best. In Marathi there is a saying “मेल्या शिवाय स्वर्ग दिसत नाही”, which means “You can’t see heaven without dieing” or need to do your hard work, can’t escape that 😉

I’ve attached the source code used to test, if anybody has any doubts, questions feel free to ask

Fedora 11 on Acer 4736Z

I finally managed to get a new Laptop, Acer 4736Z. I’d to wait before Fedora 11’s download was complete and I could install it.


  • Graphics card works out of the box (1366×768 resolution)
  • Sound is detected well
  • Wireless and bluetooth are working
  • The Web Camera is detected and working well
  • The Brightness control doesn’t work
  • The gsynaptics had to be installed to enable tap on the touchpad

All and all it looks good. Here is a screenshot.
Fedora 11 on Acer 4736Z

Pulseaudio CPU usage
Great work, Pulseaudio in F11 uses lesser CPU as compared to Fedora 10 Pulse Audio

Fedora 10 Pulse Audio High CPU Usage

Guys using Fedora 10, must’ve seen this problem of Pulseaudio taking high CPU usage. After a lot of tweaking, I came to this. From System -> Preferences -> Hardware -> Sound

Change all the drop downs to ALSA. Just make sure u “Test” and hear the tone before applying the changes.

pulseaudio with lower cpu usage


I’ve done this yum remove pulseaudio. This removes the root cause 🙂

Adding Fedora 9 DVD as repository

Adding a Fedora 9 DVD as a yum repository is extremely easy in Fedora 9.

For slow internet connections, using yum could be pain, as most of the software can be installed from the DVD itself. But yum resolves dependencies from the net. Adding a Fedora 9 DVD as a repository is like a boon to such users.

Follow the steps using a root user

  1. Pop in your Fedora 9 DVD, It should be automatically mounted on /media/Fedora 9 i386 DVD/ folder
  2. Create a new file fedora-dvd.repo in /etc/yum.repos.d/ folder.
  3. Put the following contents in the file

    name=Fedora 9 DVD
  4. Disable fedora.repo and fedora-updates.repo, by assigning the parameter enabled=0.
  5. Run the command yum repolist
    You should be able to see fedora-dvd as enabled.

Thats should be it. You are free to install packages from the DVD directly.