Monthly Archives: September 2013

MySQL : Notifikasi jika Query sudah selesai

:: kadangkala ada query yang berjalan lama & kita tidak ingin cuma duduk bengong menanti query tsb selesai. Lebih baik kita gunakan waktu tersebut untuk mengerjakan hal yang lainnya bukan ?

Caranya mudah sekali :

1. Pasang putty : sudo apt-get install putty

2. Jalankan putty

3. Pilih menu Terminal – Bell; dan lalu pastikan bahwa opsi "Make default system alert sound" sudah dipilih

4. Login ke server & jalankan query

5. Ketikkan perintah berikut ini :

while mysqladmin -h 127.0.0.1 processlist | grep QUERY > /dev/null ; do sleep 10; done ; while true; do echo -e "a"; sleep 2; done

6. Ganti string "QUERY" diatas dengan perintah query yang ingin Anda pantau

Maka, ketika query tersebut sudah selesai, terminal Putty tersebut akan berbunyi & berkedip setiap 2 detik 🙂

Semoga bermanfaat.

Post imported by Google+Blog for WordPress.

Waspada : Lampu LED Philips

s. :: tidak sangka menemukan posting soal lampu LED Philips dari Linus Torvalds 🙂 seperti biasa, informatif + sangat menghibur #LOL  

Linus mengganti semua lampu di rumahnya karena dia tidak suka dengan lampu Halogen / CFL. Pilihannya ketika itu adalah lampu LED buatan Philips.

Ternyata dia perlu menggantinya lagi, kali ini dengan lampu LED merk Cree, karena, walaupun masih berfungsi, namun lampu LED merk Philips tersebut sudah drop outputnya menjadi hanya sekitar 25%.

Linus, um, "tidak terlalu gembira" dengan hal ini  🙂

"But today I've been walking around changing out the Philips bulbs that are just a couple of years old.

"40,000 hours" my ass.

Sure, they still "work" – but actual light output is maybe a quarter of what it was when new"

Ternyata di berbagai forum Internet juga sudah mulai bermunculan komplain soal LED Philips ini. Misalnya : http://www.kaskus.co.id/thread/521adacd19cb178421000001/iklan-led-philips-menyesatkan/

Dikutip : "benar ada tulisanya "Last up to 15Years" …. dengan pemakaian sehari 2.7 Jam.. WTF!!!"

Duh.

Anyway, kembali ke posting Linus — yang lebih menarik adalah diskusi di komentarnya, saya kutipkan beberapa :

"Sounds like insufficient heat sinking in the design itself. Heat ages LEDs fast"

Linus : "Irony alert: the crappy bulbs are called "EnduraLED". Model number 8E26A60 in case anybody cares"

"I did the same, changed all the spot lights in the house with LED, but almost all of  them died less than a year later.

The problem is NOT the LEDs, they are very reliable and working perfectly,

the problem is the electronic circuits driving them are so badly made, they blow up very quickly making the whole thing a VERY expensive failure."

"We've gradually been switching from fluorescents to Panasonic LEDs. We have a dozen by now, with the oldest ones three years old and have yet to have any burn out pr go visibly bad. And the light quality is pleasant, much better than the fluorescents and incandescents they're replacing"

"All big manufactures suck in LED technology. I also replaced every light here with LED, bought at Amazon. Good stuff is from LumenTec for example. Almost 100Lumen per Watt"

"Personally, I find it disturbing that most lighting products available in retail stores are 3000-4000 k, which provide horrible color rendering in a home environment. (should be 2700k)"

"At work we use LED fixtures by Dialight, 72 watt, replacing 400 watt HID. They run cool. They run cool due to the massive heat sink"

"If you want cheap LED lights buy them off AliExpress.  You can get down light for about $2.50 for approx 600 lumen at 3-4 watts. You can get B22(bayonet)/E37(screw) type LED globes for about $3. Free postage too to major World locales."

"I  ordered mine directly from manufacturer somewhere on aliexpress.com. My choise is corn bulbs with 5630 LED which has 50lm ouput each according to the datasheet. 60x on one lamp gives like 120w incandescent light output and they are actually doesn't require additional heat dissipation as they are distributed over the lamp."

"I  use CREE bulbs bought from china…they seem good-working even after a couple of yrs, the brightness didn't decrease"

"hope you didn't throw those bulbs away +Linus Torvalds .  probably just the voltage regulators went soft.  LEDs are fine." — menarik, berarti bisa di reparasi.

"I attended a Facilities Conference with the Cree reps and have seen their tech. THEY are the global pioneers of LED technology and have the best warranty and Guaranty. Not only will their products last for a long time, they promise that you will not lose lumens."

Reshared post from +Linus Torvalds

Philips: your LED lights suck.

I've replaced most of the lights in our house with LED's, because I detest those nasty CFL's. 

And in general, things are working out pretty well. I'm particularly pleased with the 6" EcoSmart recessed lights you can get at Home Depot (not a bulb replacement – it replaces the whole trim kit).

But today I've been walking around changing out the Philips bulbs that are just a couple of years old. "40,000 hours" my ass. Sure, they still "work" – but actual light output is maybe a quarter of what it was when new.

I'm hoping the new Cree bulbs are better. Cree is the manufacturer for the LED module for the EcoSmart recessed lights, so I have some reason to be hopeful that a couple of years down the line I won't curse at them.

Post imported by Google+Blog for WordPress.

MySQL optimal dengan 16 core

MySQL optimal dengan 16 core. :: persis seperti yang saya temukan di beberapa kasus — pada saat ini, performa optimal MySQL adalah dengan prosesor 16 core. Lebih dari itu justru akan membuatnya lebih lambat 🙂

Dikutip : 

The best performance for Percona-5.5 is reached on 16cores-HT configuration

The best performance for MySQL 5.6 is also reached on 16cores-HT config

Saya mengalami sendiri masalah ini, ketika MySQL server dijalankan di server 80-core — dan performanya terjun bebas 🙂 🙂

Langsung saya menebak bahwa ada masalah scalability (mutex / race condition / dll). 

Untunglah MySQL dijalankan di virtual machine – tinggal ubah setting prosesornya ke 8 core – voila, MySQL kembali ngebut 🙂

Anyway, artikel tsb membuat saya browsing beberapa artikel lainnya, dan jadi memunculkan beberapa pertanyaan tambahan :

(1) Di artikel yang lainnya, penulis yang sama menunjukkan bahwa MySQL 5.6  lebih kencang performanya di 24 core : http://dimitrik.free.fr/blog/archives/2013/02/mysql-performance-analyzing-benchmarks-part1-mysql-56-and-mariadb-55.html

Jadi mana yang benar :-) 

Tebakan saya :

# MySQL 5.6 sudah lebih scalable, dan benar lebih kencang di > 16 core

# Kasus saya memang benar > 16 core lebih lambat; karena saya ketika itu masih menggunakan MySQL 5.5

(2) Jadi menemukan potensi problem dengan setting sort_buffer_size > 256 KB : http://ronaldbradford.com/blog/more-on-understanding-sort_buffer_size-2010-05-10/

Menarik…. berkat 1 artikel ini, jadi banyak yang bisa diteliti lebih lanjut 🙂

Semoga bermanfaat.

DimitriK’s (dim) Weblog : MySQL Performance: Analyzing Benchmarks, part 5: TRX list again
MySQL Performance: Analyzing Benchmarks, part 5: TRX list again. It was a long time that I wanted to dig more the solution proposed by Percona to improve “TRX list” (transactions list) code — the initial story by Alexey is starting here, then my following analyze is here, and then another test …

Post imported by Google+Blog for WordPress.

Erdogan : sukses menyeimbangkan Muslim + Militer + Sekuler ?

:: Saban membaca halaman ini, saya selalu takjub… walau keras perlawanan dari militer & sekuler, namun dia masih tetap bisa bercokol sebagai Presiden Turki : http://en.wikipedia.org/wiki/Headscarf_controversy_in_Turkey#Controversial_events

Tantangan Erdogan sangat berat : pemberangusan simbol & praktek agama Islam itu ada di konstitusi / dasar negara Turki ! 
Namun, dia tetap menjadikan ini sebagai janji kampanyenya sejak tahun 2007, dan terus memperjuangkannya.

Pemberangusan jilbab (dan berbagai simbol Islam) lainnya ini menjadi ironi, ketika kita menyadari bahwa :

# Di negara Eropa & berbagai negara Barat lainnya, penggunaan jilbab bukanlah masalah.

Rakyat Swedia malah berbondong-bondong mendukung dengan turut menggunakan jilbab, ketika ada berita bahwa ada muslimah yang diserang. 

Di Turki, yang mayoritas muslim ? Malah dilarang 🙂

Anyway, berbagai sepak terjang Erdogan yang pro Islam tidak lantas membuatnya jadi dikudeta oleh militer & sekuler.
Ini bisa menjadi teladan bagi pemimpin lainnya, seperti Mesir.

Erdogan juga oleh sebagian orang dianggap sebagai salah satu tokoh pemimpin Timur Tengah : http://en.wikipedia.org/wiki/Recep_Tayyip_Erdo%C4%9Fan#Foreign_policy

Erdogan bukan pemimpin yang sempurna. Namun, dia (jauh) lebih baik dari berbagai pemimpin negara (mayoritas) muslim lainnya.

Recep Tayyip ErdoÄŸan – Wikipedia, the free encyclopedia
During ErdoÄŸan’s Prime Ministership, relations with Greece have been normalized. Political and economic relations are much improved. In 2007, ErdoÄŸan and Greek Prime Minister Kostas Karamanlis met on the bridge over the Evros River at the border between Greece and Turkey, for the inauguration of …

Post imported by Google+Blog for WordPress.

NSA, Microsoft, dan Israel

NSA, Microsoft, dan Israel. :: Terimakasih kepada Edward Snowden, kita jadi tahu bahwa NSA tidak hanya memata-matai Amerika, namun juga seluruh dunia.

Dengan berbagai teknik & cara, NSA bisa melakukan ini. Seperti langsung menyadap di server perusahaan (Project Prism), menyadap di ISP / pusat jaringan data (Project Fairview, Tempora, Blarney), dan, yang paling spektakuler, sukses menjebol enkripsi data di tahun 2010 (Project Bullrun, dana 10x lebih besar dari Prism)

Dan, hasilnya ternyata turut dibagi ke Israel 🙁

Fakta ini musti menjadi perhatian institusi pemerintah terkait, karena tersangkut langsung dengan keamanan negara.

Bagi perusahaan komersial pun ini patut menjadi perhatian, karena potensi corporate espionage : 
http://www.motherjones.com/politics/1994/05/company-spies

Salah satu cara NSA menjebol enkripsi adalah dengan bekerja sama dengan berbagai perusahaan IT 🙁 dengan menanam trojan / malware di berbagai produk, backdoor, dan/atau memberikan "kunci" security produknya kepada NSA.

Dikutip :

The files show that the National Security Agency and its UK counterpart GCHQ have broadly compromised the guarantees that internet companies have given consumers to reassure them that their communications, online banking and medical records would be indecipherable to criminals

The NSA spends $250m a year on a program which, among other goals, works with technology companies to "covertly influence" their product designs.

NSA "to leverage sensitive, co-operative relationships with specific industry partners" to insert vulnerabilities into security products.

A more general NSA classification guide reveals more detail on the agency's deep partnerships with industry, and its ability to modify products.

It cautions (NSA) analysts that two facts must remain top secret: that NSA makes modifications to commercial encryption software and devices "to make them exploitable", and that NSA "obtains cryptographic details of commercial cryptographic information security systems.."

Dan salah satu perusahaan IT yang bekerjasama dengan NSA adalah Microsoft : http://www.reddit.com/r/technology/comments/1m773a/how_the_feds_asked_microsoft_to_backdoor/cc6iozq

Solusi : gunakan produk Open Source. 

Kita bisa audit & pastikan bahwa produk tsb aman, bebas dari berbagai "titipan" / jebakan dari badan mata-mata asing.

Bacaan lebih lanjut :

http://www.theguardian.com/world/2013/sep/11/nsa-americans-personal-data-israel-documents

http://www.theguardian.com/world/2013/jun/08/nsa-prism-server-collection-facebook-google

http://www.theguardian.com/world/2013/sep/05/nsa-gchq-encryption-codes-security

NSA shares raw intelligence including Americans’ data with Israel
• Secret deal places no legal limits on use of data by Israelis • Only official US government communications protected • Agency insists it complies with rules governing privacy • Read the NSA and Israel’s ‘memorandum of understanding’

Post imported by Google+Blog for WordPress.

Naomi Klein : The Big Green groups are more damaging to Earth than the deniers

Naomi Klein : The Big Green groups are more damaging to Earth than the deniers. :: I must admit that I'm jealous to Naomi Klein. Her analysis is backed by blade-sharp focus & logic, and she's also able to write it into a book very well. One can always aspire to be, but in reality, very few will be able to reach her level.

Her latest book, The Shock Doctrine, is a real shocker to read; detailing how free marketers ride on top of crises, natural or manufactured, to reap profits. With just two books, the first is the International best-seller "No Logo", she has managed to accumulate immense global influence. 

She turned her attention to global climate problem for her third book. And we're in for another shocking discovery – the Big Green groups actually causes more damages than the (global warming / climate change) deniers.

An excellent article in The Guardian covers this topic very well. In short, by cooperating / partnering with the Big Polluters, the Big Green groups are having conflict of interest, and ended being played by the big polluters.

Quoted : 

The green groups are not nearly as clever as they believe themselves to be. They got played on a spectacular scale.

Communities, in Richmond, California for instance, who would have been like, "We fight climate change and our kids won't get as much asthma."
That win-win was broken because you get a deal that says, "OK you guys can keep polluting but you're going to have to buy some offsets on the other side of the planet." And the local win is gone, is sacrificed.

What we know is that the environmental movement had a series of dazzling victories in the late 60s and in the 70s … It was just victory after victory after victory…. And then it came to screeching halt when Reagan was elected. And he essentially waged war on the environmental movement very openly.

..it's a really important question why the green groups have been so unwilling to follow science to its logical conclusions.
I think the scientists Kevin Anderson and his colleague Alice Bows at the Tyndall Centre have been the most courageous on this because they don't just take on the green groups, they take on their fellow scientists for the way in which neoliberal economic orthodoxy has infiltrated the scientific establishment. It's really scary reading.

And so we see this grassroots, place-based resistance in the movements against the Keystone XL pipeline and the Northern Gateway pipeline, the huge anti-fracking movement. And they are the ones winning victories, right?

I think the Big Green groups are becoming deeply irrelevant. Some get a lot of money from corporations and rich donors and foundations, but their whole model is in crisis.

…there's a big push in Europe where 100 civil society groups are calling on the EU not to try to fix their failed carbon-trading system, but to actually drop it and start really talking about cutting emissions at home instead of doing this shell game. 

We don't have any more time to waste with these very clever, not working shell games.

http://www.theguardian.com/environment/2013/sep/10/naomi-klein-green-groups-climate-deniers

Naomi Klein: ‘Big green groups are more damaging than climate deniers’
Environment movement is in ‘deep denial’ over the right ways to tackle climate change, says Canadian author

Post imported by Google+Blog for WordPress.

MySQL : careful with index_merge

MySQL : careful with index_merge. :: MySQL 4.x was not able to use more than 1 index. MySQL 5.x fixed this with a feature called "index merge".

However, there are times when this feature actually slows down the performance.
An excellent example & explanation about this is discussed on the article I linked here.

I experienced a similar situation – a query is reading multiple indexes + intersect + sort it = CPU intensive, AND turned out it's executed several hundred times per #second.

It ended up overloading the database server pretty spectacularly 🙂

The (temporary) quick fix is to execute the following command in MySQL console :

SET GLOBAL optimizer_switch="index_merge_intersection=off"

Then once you implemented the correct solution to the problem (change the query / create a new compound index / etc), don't forget to turn it on again.
Otherwise other "innocent" queries might suffer because of it 🙂

http://www.mysqlperformanceblog.com/2012/12/14/the-optimization-that-often-isnt-index-merge-intersection/

Embedded Link

The Optimization That (Often) Isn’t: Index Merge Intersection – MySQL Performance Blog
Prior to version 5.0, MySQL could only use one index per table in a given query without any exceptions; folks that didn’t understand this limitation would often have tables with lots of single-column indexes on columns which commonly appeared in their WHERE clauses, and they’d wonder why the EXPLAIN plan for a given SELECT would […]

Post imported by Google+Blog for WordPress.

Cloud : Ekspektasi & Realita

Cloud : Ekspektasi & Realita. :: selama ini kita mendengar berbagai gembar-gembor, yang mengesankan bahwa cloud adalah solusi untuk semua masalah IT. Ini membuat ekspektasi yang keliru bagi banyak orang. Cloud adalah solusi untuk banyak hal, namun, tidak semuanya juga bisa diselesaikan oleh Cloud. Sebelum menggunakan berbagai layanan Cloud yang ada, kita musti pertimbangkan baik-baik terlebih dahulu, apakah memang ini solusinya ? Jika ya, lalu layanan Cloud mana yang paling cocok ? Dst.

Artikel seputar pengalaman Reddit.com adalah salah satu favorit saya, karena dengan gamblang menceritakan kisah nyata sebenarnya berbagai hal seputar Cloud : http://highscalability.com/blog/2013/8/26/reddit-lessons-learned-from-mistakes-made-scaling-to-1-billi.html

Contoh :

"EC2 is not a magic bullet. You suffer from higher network latency and noisy neighbors"

"Amazon doesn’t even know what some of their limits are"

Ini adalah informasi yang sangat berharga. Dengan informasi ini, maka, kita tetap bisa memanfaatkan berbagai layanan Cloud, tanpa terjerumus ke berbagai kelemahan / problemnya.

Berikut ini adalah beberapa contoh skenario & pengalaman berbagai kawan-kawan saya :

(#) Cloud tapi lambat : seorang kawan yang memiliki situs yang cukup terkenal, dengan bangga bercerita bahwa situsnya itu berjalan diatas layanan cloud sebuah provider. Saya ikut gembira atas kesuksesannya, dan bertanya lebih lanjut mengenai berbagai hal seputar layanan cloud tsb. 

Namun, makin banyak informasi yang saya dapatkan, situasinya jadi makin mencurigakan….sampai akhirnya ybs celetuk, "tapi, kok masih lambat ya?"
Maka kemudian saya meneliti layanan cloud tsb.

Ternyata… sebenarnya cuma semacam produk VPS :) 

Bisa di "resize" memang berbagai resources nya (CPU, RAM, disk, dst) sesuai dengan kebutuhan, namun, VPS biasa & berbagai solusi virtual machine juga bisa melakukannya 🙂

Dan dalam kasus ybs, karena popularitas situsnya, sekedar "resizing" / scale up adalah solusi yang akan sangat banyak memboroskan budgetnya. 
Yang lebih ekonomis adalah melakukan performance optimizations di software server & aplikasinya, sehingga situsnya bisa berjalan lebih cepat dengan spec yang sama / kurang.

(#) Cloud tapi mahal : kawan lainnya mengeluh bahwa dia kena tagihan mahal sekali dari provider cloudnya. Dia bingung karena daftar harga layanan cloudnya terkesan murah sekali, tapi, ternyata akhirnya mahal.

Setelah saya periksa, ternyata sebetulnya dia tidak memerlukan cloud. Kebutuhannya bisa dipenuhi hanya dengan sebuah dedicated server, yang biaya sewanya pun hanya sepersekian dari tagihannya tersebut.

Dan tagihannya itu mahal karena besarnya bandwidth yang dia gunakan. Maka saya sarankan dia menggunakan sebuah produk dedicated server dengan bandwidth yang berlimpah (virtually unlimited). Solusi yang lebih tepat, dan jauh lebih ekonomis bagi ybs, daripada produk Cloud tsb.

(#) Cloud tapi ubah ulang aplikasi : daripada ubah total aplikasi PHP Anda agar bisa menggunakan database NoSQL (key/value) di Cloud, Anda bisa :

### Scale out PHP : tahukah Anda bahwa PHP bisa di scale out sampai (pretty much) infinity ?

### Gunakan fitur NoSQL di MySQL : sehingga performa MySQL naik dari 20.000 qps menjadi sekitar 750.000 qps + aplikasi tetap bisa query dengan syntax SQL seperti biasa. Win + win. 

(ini adalah fitur built-in di MySQL 5.6, atau bisa juga dengan menggunakan plugin HandlerSocket : http://yoshinorimatsunobu.blogspot.com/2010/10/using-mysql-as-nosql-story-for.html)

### Sharding MySQL :  daripada coding ulang NoSQL, yang juga memiliki keterbatasan (walaupun sangat tinggi), sekalian saja coding ulang aplikasi agar bisa sharding MySQL = scale out sampai nyaris unlimited.

Kesimpulan : Cloud menawarkan berbagai kemudahan & kenyamanan, namun, kita tetap perlu memahami seluk beluk dari produk Cloud tsb. Agar ekspektasi kita bisa tetap realistis, dan tidak mengalami kekecewaan, yang sebetulnya adalah karena salah paham kita sendiri, di kemudian hari.

High Scalability – High Scalability – Reddit: Lessons Learned from Mistakes Made Scaling to 1 Billion Pageviews a Month

Jeremy Edberg , the first paid employee at reddit, teaches us a lot about how to create a succe…

Post imported by Google+Blog for WordPress.

Heboh Miss World

:: ternyata soal ini masih terus berkepanjangan heboh pro & kontranya ya 🙂 dan debatnya jadi menyasar kemana-mana, bahkan ke berbagai hal yang tidak relevan / tidak nyambung sekalipun. Seperti artikel ini : http://sosbud.kompasiana.com/2013/04/23/miss-world-ditolak-kawin-kontrak-diterima-549092.html

Seakan-akan para penolak Miss World otomatis adalah penyetuju kawin kontrak 🙂 ya ngawur dong logikanya ini :-) 

Saya sendiri tegas menolak Miss World, karena ini adalah bagian dari gerakan opresif terhadap perempuan, yaitu kegiatan "komoditasi perempuan".

Lebih detailnya & berbagai argumen seputar ini sudah saya tulis di posting berikut ini : https://plus.google.com/100403777541206648979/posts/JEgf9tNVtVQ

Islam sudah membebaskan wanita sejak 14 abad yang lalu, dan juga ada berbagai gerakan-gerakan pembebasan perempuan lainnya di berbagai tempat & masa.
Seperti di Inggris ini : http://www.theguardian.com/lifeandstyle/the-womens-blog-with-jane-martinson/2011/nov/03/miss-world-back-much-changed

Mari, jangan sampai terjadi lagi perbudakan perempuan di zaman modern ini. 

Harry Sufehmi – Google+ – Komoditasi Perempuan. :: Barusan terpaksa blokir satu lagi…
Komoditasi Perempuan. :: Barusan terpaksa blokir satu lagi kawan di Facebook, karena sering memposting foto porno (perempuan setengah telanjang).

Sudah…

Post imported by Google+Blog for WordPress.

Toba Dream

:: cukup sering kita lihat stiker bertuliskan "Toba Dream" ini di berbagai mobil yang lalu lalang di Jakarta. Namun, dalam waktu yang tidak lama lagi, mungkin stiker itu akan berubah jadi bertuliskan "*Toba Nightmare*".

Karena pada saat ini sedang berjalan proses perusakan lingkungan yang cukup parah di kawasan Danau Toba. Sementara tindakan dari Pemerintah nihil. 

Karena terus tidak adanya tindakan pemerintah atas masalah besar ini, akhirnya para peraih Kalpataru berencana untuk mengembalikan penghargaan tersebut ke Presiden SBY. Luar biasa.

Mudah-mudahan dengan demikian, maka lingkungan Danau Toba dan sekitarnya jadi bisa selamat dari para penjarah & perusak, amin.

http://news.okezone.com/read/2013/09/01/337/859007/dua-peraih-kalpataru-kembalikan-piala-ke-sby

Dua Peraih Kalpataru Kembalikan Piala ke SBY
Kami akan kembalikan semua, kembalikan semua kemunafikan. Tanpa penghargaan ini pun kami akan terus merawat ekosistem Danau Toba

Post imported by Google+Blog for WordPress.