Monthly Archives: October 2013

Jalapeno : 5 GH/s Bitcoin Miner

:: To be honest, I've already forgot that I ordered this 🙂 it's been so long. But let it be known : Butterfly Labs delivers ! Albeit very, very LATE. But that's a lesson for me to learn. Now, onto the Jalapeno !

First, I was not happy when I first turned it on & heard very noisy sound from inside the unit. I guessed that a cable got into the cooling fan, and I was right – after I disassembled the unit, clearly the fan's own power cable was stuck into itself. That's rather sloppy .
Anyway, after that it runs with no problem.

Actually, it ran at 110% of its advertised speed :)

Pretty nice !
Now with Bitcoin at USD$ 200, definitely looking forward to start seeing the mining results of this machine 🙂

It's pretty easy to setup too, especially in Ubuntu. 
Just follow this tutorial :

With two additions to that :

# Before compiling cgminer, install libudev : sudo apt-get install libudev-dev

# If you encountered error -3 with cgminer, even after doing all the instructions there, then try running cgminer as root.

That's all.

Let's mine ! :)

Post imported by Google+Blog for WordPress.

Dog & Human

:: I've been puzzled that in Islam, we're basically prevented to be able to enjoy dogs as pet. The way I see it, dogs are better than cats – we can train them better, they're more caring, etc.

Reading this quote from Mark Twain, made me think; could it be because they (dogs) are indeed too good ?

I've known people who prefer dogs than people. And I'd probably have adopted some dogs myself too (if it's allowed).

Also, in many developed countries, more people chose to stay single, causing the native population to decline. 
In many cases, the country's population & birth rate is still normal, however most of them are from immigrants, not from the native people.

Dogs can help accompany these people to stay single. They are loving & loyal companion. Unlike many people. 

However, it may help us to drive ourselves into extinction.

Some more readings :

Post imported by Google+Blog for WordPress.

Bahaya Obat Herbal

:: Tulisan yang sangat bagus, dan menjelaskan dengan gamblang berbagai kesalah pahaman seputar penobatan "herbal" dan "thibbun nabawi" : 

"Ada anak kawan saya sudah positif demam tifoid (tifus) menolak antibiotic karena zat kimia, tetap diobati herbal terus masuk kondisi memburuk… Akhirnya takdir Allah pun berlaku, ia wafat. Innalillah… "

"Barangsiapa berpraktik kedokteran padahal ia belum dikenal menguasai ilmu kedokteran, maka ia harus bertanggung jawab." 
(HR. Abu Dawud, Ibnu Majah, an-Nasai)

"Apakah pengobatan modern itu mengandung zat kimia? Ya, tapi, herbal juga zat kimia.

Nasi, air, gula, kopi, susu, semua zat kimia. Yang penting obat modern itu halal, tidak mengandung zat-zat yang diharamkan. Bahkan pada obat modern, dosis, efek samping, reaksi alergi sudah diketahui

Tapi sebagian besar herbal tidak diketahui dosis, efek samping, reaksi alergi. Selalu dianggap aman dan dianggap bukan zat kimia…

Saya tidak anti herbal, setiap malam saya makan garlic (kapsul bawang putih). Tapi bila kena infeksi bakteri saya akan minum antibiotika.

…saya yakin penyebab kesembuhan saya bukan pada garlic atau antibiotika, hanya Allah yang menyembuhkan hamba-hamba-Nya" (melalui obat & ikhtiar tsb)

Pilih Resep Nabi atau Resep Dokter?
Pernahkah Anda dengar orang bicara seperti ini: “Mau pilih resep Nabi apa pilih resep dokter?”, “mau herbal apa obat kimia?”, “mau vaksin apa ASI eksklusif?”, dan lain-lain. Seolah kedua hal tersebut kontradiksi dan hanya boleh memilih salah satu. Ya hanya boleh salah satu pilihan saja. Begitukah Islam mengajarkan? Mengapa itu bisa terjadi? Ya tidak tahu kenapa. Tapi saya ingin bahas sedikit ke muara ilmu pengobatan ya.

Post imported by Google+Blog for WordPress.

Pragmatism : The Actual Reason Why We're Using Open Source

:: Several days ago, somebody questioned my decision to use MariaDB on several servers, and subtly implied that the decision was "political"; related to the rivalries between Oracle (MySQL) versus SkySQL (MariaDB).

I was having a headache, and didn't took it very well 🙂 I ended up emailing him pages of detailed explanations for that decision 🙂
Later I sobered up, created a much shorter email, basically summarized that it was for technical reason. 

Then I found the following comment by a Reddit user, which was very similar to my own experiences, and my main reason to utilize open source software :

Basically, contrary to popular opinion, actual support for proprietary software really sucks in a lot of cases. 

As a system implementator, sometimes your manager / client demanded that you deliver the (massive) project on time; while having your hands tied.

An example; they may have enormous budget available for said project, however, that budget must go through the internal procurement bureaucracies, before you can spend it on external consultants / the support that you needed.

That takes time, which means the project will be running without support & encounter a lot of problems, while speedily getting closer to the deadline.   

Even after you acquired the external support, your hands are still tied. 

Sometimes you need to make quick changes due to an emergency, and the next morning, the consultant found it out & commented, "oh we can't support that, it wasn't done by us". 
A reasonable comment by and on itself, but when considering the context, it's actually a really lazy response.

So, sounds familiar to you ? I've had these unpleasant experience several times, and indeed it was painful & stressful. 

With Open Source Software, pretty much everything is within your control.

I've modified LibreOffice installer when it didn't work, with zero previous experience, all done in about 20 minutes. 
When I encountered problems on an open source software, I just googled it, and the solutions came in less than a second. This is because the user base is so big, chances are pretty excellent that someone else had already encountered the problem and solved it.

Compared to the tied-hands situations before, it's heaven. 

Yes, the original reason I used F/OSS is pragmatism. 
It help me making the situation much better for me 🙂

Only much later did I begun to appreciate its various concepts & philosophies.

So, back to my reasons to use MariaDB, here it is :

# Installed on NON-critical servers

# Installed on those servers because the queries running there need the better multi-core scalabilities of MariaDB

# MariaDB will be installed on another (again, non-critical) server to utilize its multi-master replication feature.

Oracle versus MariaDB

Make NO mistake, feature-wise, there is NO way MariaDB can compete with Oracle.

Anyone stating otherwise is just pronouncing his/her ignorance to everyone. 

However, it's unwise to judge a software just by its features. 
You'll need to also consider a lot of other factors : the project's actual requirements, documentation, internal support, external support, license cost, implementation cost, infrastructure support, exit cost, etc.

Considering all these, in many cases, open source software is the right answer. 

Embedded Link

segfaultzen comments on Oracle attacks Open Source
Let me preface this by stating that I have nothing inherently against commercial or closed software. It’s a different business model. I prefer Open So…

Post imported by Google+Blog for WordPress.

MySQL : Make Your Query Runs (at least) 16800% Faster

:: One of our data analyst was asked to analyze a bunch of data from 2 tables. One of it  contained nearly 200 million records, and the other about 120 million records. The query to run against this dataset is doing several JOINs on non-unique fields, causing the resultset to be estimated at trillions of records.

As some of you may have already guessed – a week went by, and the query still hasn't finished 🙂

I was asked to help, so I tried almost every trick that I knew, including (but not limited to) :

# vertical partitioning : split the columns into a table each
# horizontal partitioning : splitting the table into 10 smaller tables
# putting the tables on fast SSDs
# putting the tables on RAM disk : on several occasions, I actually managed to saturate the memory bandwidth……
# enlarging the JOIN buffers : up to tens of gigabytes.
# etc, etc.

Still no joy. The query just won't finish. And I've been sleeping on my work desk for almost a week.

One day before the deadline (just like in the movies, huh?), another of our data analyst suggested that I hashes the fields being compared, and then compare the hashes instead.

To my surprise, it works GREAT. It's like a miracle.

The query which wasn't finished in a week, now finished in an hour. 
We got the job done, at the very least, 16800% faster.

Mind = Blown 🙂

So, here's how it's done, hopefully you'll find it useful too later.
Enjoy !


SELECT a.f1, a.f2, b.f1, b.f2  
FROM t1 AS a, t2 AS b 
WHERE a.f1=b.f1 AND a.f2=b.f2 AND a.f3=b.f3 AND a.f4=b.f4 AND a.f5=b.f5;


SELECT uid, MD5(CONCAT(f1,f2,f3,f4,f5)) AS hash  
FROM t1 

SELECT uid, MD5(CONCAT(f1,f2,f3,f4,f5)) AS hash  
FROM t2 

This is where the magic happens :) 
we compare the hashes, and then we store the uid related to those hashes.

CREATE TABLE hash_result (KEY(uid1), KEY(uid2)) ENGINE=MyISAM AS 
SELECT a.uid AS uid1, b.uid AS uid2 
FROM hash1 AS a, hash2 AS b 
WHERE a.hash=b.hash 

Collect the records with the corresponding uid :

SELECT a.f1, a.f2, b.f1, b.f2 
FROM t1 AS a, t2 AS b, hash_result AS c 
WHERE a.uid=c.uid1 AND b.uid=c.uid2 

fastest car in the world | World of Cars
world top leading car companies information and photos. lamborghini,bmw,audi,mercedes,maserati,pagani,pgo,toyota,honda. fastest car in the world. fastest car fast car. fastest car wallpaper. bugatti veyron. fast car. bugatti veyron. fast car. bugatti veyron. fast car. bugatti zonda. fast car …

Post imported by Google+Blog for WordPress.

MariaDB : Faster Index Creation

:: I've had to create indexes for tables with hundreds of millions records in it. Anyone who has tried it will already knew the pain 🙂

With MariaDB, you can have this process done faster. Here's the settings that you'll need to set :


Ensure these 2 variables are bigger than each index that's going to be created. In a server with 128 GB of RAM, I set this to 50 GB. Indexes are always created very quickly 🙂

Otherwise, the index creation process will show as "Repair with keycache". This is really slow. 

When these 2 variables are set with big enough numbers, then you'll see "Repair by sorting", or, when you set the following variable : "Repair with X threads" 


When this variable is bigger than 1, MariaDB will utilize more than 1 cpu core in the index creation process. 

The bigger the number, more cpu core may be used, so it'll be potentially faster. However, this will result in more usage of cpu (of course) and RAM. 

NOTE: using this setting in MySQL is not advised, there are still bugs :

Hope this helps someone else.

Embedded Link

MySQL :: MySQL 5.7 Reference Manual :: 5.1.4 Server System Variables
The MySQL server maintains many system variables that indicate how it is configured. Each system variable has a default value. System variables can be set at server startup using options on the command line or in an option file. Most of them can be changed dynamically while the server is running …

Post imported by Google+Blog for WordPress.