It's been round two years since our project took off, many things has been done (will be covered in next posts) but somehow i feel next step in pursuit of speed will be migrating some of our data tables to noDB land. I have read lot's about this topic and somehow decided to try http://www.mongodb.org/ at first. This decision was made on ease of use (in terms of instalation) and good support in php (remeber php on windows). Installation was very simple although i had to open port 11371 on firewall to get 10gen gpg key into my apt repositorie.
After that I was ready to go.
We have very special table in our DB called server_cache. It's actually key value table with some 20k lines and 50Mb of data, holding hashes for hotel/room/date records, filtered and sorted by some 10 or something parameters. We populate this table with users requests if record is not in table and just return hashes if desired combination already exists.
So i populate mongoDB collection with all records from MySQL and made a little script that gets 1000 random (predefined in script) hashes form this table.
I start to measure results with ApacheBench tool:
I stared with 100 requests and one thread, slowly increasing number of requests. Server "Time taken for test" increased linear and MySQL was lagging behind by twice the time mongoDB needed to complete the test.
Then i started increasing threads where mongoDB showed all of it's potential and leave MySQL far behind.
With such a fabulous preformace by mongoDB im shure we will implement in production soon.
Technical spec of our DB server:
bl4z@ubuntu:~$ uname -a
Linux ubuntu 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux
bl4z@ubuntu:~$ mysql --version
mysql Ver 14.14 Distrib 5.1.62, for debian-linux-gnu (x86_64) using readline 6.1
bl4z@ubuntu:~$ mongo --version
MongoDB shell version: 2.0.4
sobota, 28. april 2012
sreda, 18. april 2012
Background
We start new project on our beloved LAMP stack, only this time it was
WAMP // W was the server waiting for us at clients "data-room" so no
tools that we are using daily (apt, terminal, putty, winscp, cron, ps
-aux,...) just GUI, RDC and Windows tools...
The server now serving up to 10k visitors per day at peaks we get 50 active users with decent speed - but it wasn't always so. ill try to write down optimisations we already did, and future plans to serve visitors in nice manner.
Our database at the moment is round 1.2 GB with 4 million records in total. At the beginning everything was running on same server with Xeon X3210 CPU and 4GB RAM, Windows server 2003 X64 SP2.
The server now serving up to 10k visitors per day at peaks we get 50 active users with decent speed - but it wasn't always so. ill try to write down optimisations we already did, and future plans to serve visitors in nice manner.
Our database at the moment is round 1.2 GB with 4 million records in total. At the beginning everything was running on same server with Xeon X3210 CPU and 4GB RAM, Windows server 2003 X64 SP2.
Naročite se na:
Objave (Atom)