[MySQL]: how to do MySQL Sysbench testing on Linux
SysBench is a modular, cross-platform and multi-threaded benchmark tool for evaluating OS parameters that are important for a system running a database under intensive load. The idea of this benchmark suite is to quickly get an impression about system performance…
[MySQL]: SysBench Installation procedure
SysBench: System evaluation benchmark Why ? The idea is to quickly get an impression about system performance for MySQL usage without setting up complex benchmark and even without installing MySQL. In some cases this is very helpful. This is also the…
[Elasticsearch ]: Performance Considerations for Indexing
Elasticsearch users have delightfully diverse use cases, ranging from appending tiny log-line documents to indexing Web-scale collections of large documents, and maximizing indexing throughput is often a common and important goal. While we try hard to set good general defaults…
[MongoDB]: Sharded cluster script
Shell script to run a 3 sharded cluster (3 ReplicaSet) on a single server. [root@dbversity.com bin]# cat shard_creation_script.sh ##### Killing the existing Mongo processes ################ for i in `ps -ef | egrep ‘shardsvr|configsvr|replSet|configdb’ | grep -v egrep | awk -F”…
[MongoDB-Hadoop]: Connectivity testing
Install Hadoop CDH 4/5, Hive, Pig, Java & MongoDB and set environment variables as below. [root@dbversity.com ~]# cat ~/.bashrc | grep “export” export PATH=$PATH:/opt/mongodb/bin export JAVA_HOME=/usr/java/jdk1.8.0_05 export PATH=$JAVA_HOME/bin:$PATH export HADOOP_HOME=/hadoop export PATH=$HADOOP_HOME/bin:$PATH export HIVE_HOME=/hadoop/hive-0.12.0-cdh5.0.0 export PATH=$HIVE_HOME/bin:$PATH export PIG_HOME=/hadoop/pig-0.12.0-cdh5.0.0 export PATH=$PIG_HOME/bin:$PATH…
[Linux]: To set JAVA/HADOOP env variables permenently
[root @ dbversity /tmp]# java -version java version “1.8.0_05” Java(TM) SE Runtime Environment (build 1.8.0_05-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode) [root @ dbversity /tmp] [root @ dbversity /tmp]# which java /usr/java/jdk1.8.0_05/bin/java Otherway to know the installed…
[MongoDB]: _tmp significance in MongoDB dbpath
What is the significance of _tmp directory is used for in MongoDB and why it gets created? There are at least two ways from MongoDB to create a _tmp directory. INITIAL FILE ALLOCATION : – ======================== During the file allocation,…
[MongoDB] : How Indexes works !
> use dbversitydb switched to db dbversitydb > > > for(i = 1; i <= 1000; i++) db.dbversity_website.insert( { post_id : i, comment_id : i, likes : i}); WriteResult({ “nInserted” : 1 }) > > > > db.dbversity_website.findOne() { “_id”…
[MongoDB]: dropDups to remove duplicate records
MongoDB dropDups option in Index creation will be useful to remove duplicate records that already exist in the collection. > use foo switched to db foo > > > > db.test.insert({ a:1 , b:1, c:1 }) WriteResult({ “nInserted” : 1…
[MongoDB]: Unique Index
MongoDB allows you to specify a unique constraint on an index. These constraints prevent applications from inserting documents that have duplicate values for the inserted fields. > db.dbversity.createIndex( { “dbversity.post_id” : 1 } , { unique : true } )…