MongoDB...
So far with my testing its been going pretty well. I did have a minor issue with connections though. Turned out it was a bug in the version 0.26 driver available from CPAN. There is a fix for it in git already, but not CPAN. So if you need RPMs like I do this becomes an issue. Forutnately I use cpan2rpm and can make patch files. I've attached the patch and I also put it on git and here as mongodb_perl_0.26_close.patch for people to view.
For me this was a simple process to fix:
- copy patch file to /root/ on build machine
- cpan2rpm --release custom --force --make-no-test --patch="/root/mongodb_perl_0.26_close.patch" MongoDB
Then just re-install the RPM on the test servers. Now I'm not running out of threads on the MongoDB server (due to open connections not being closed during DESTROY) and getting semi-decent stats. E.g.:
[jstephens@host (15:11:14) ~/test]$ perl test_mongo_doc.pl
Comparison of NFS to MongoDB for reading/writing while updating a key on a data hash
All times in seconds
Event Total Avg Max Min
NFS Read 1000 0.001090 0.009237 0.000720
NFS Write 1000 0.001703 0.009273 0.001063
Mongo Get 1000 0.001473 0.012552 0.001293
Mongo Set 1000 0.000499 0.003426 0.000441
The data is delimited text files on NFS filers like INI files and converted back and forth to hashes. Storable would potentially be faster than parsing text strings but it's less portable. In the case of MongoDB I'm just using a simple wrapper library to control configuration/connection/set/get with error checking, etc. In this case NFS has an advantage because of the NFS client which has built in caching. These are on the 1.1.3 server by the way with a sample of 23 document ids and incrementing a key in the document each time (full read and write).