Strict Standards: Non-static method FeedWordPress::needs_upgrade() should not be called statically in /home/hsufehmi/tech.sufehmi.com/wp-content/plugins/feedwordpress/feedwordpress.php on line 113

Strict Standards: Non-static method FeedWordPress::stale() should not be called statically in /home/hsufehmi/tech.sufehmi.com/wp-content/plugins/feedwordpress/feedwordpress.php on line 179

Strict Standards: Non-static method FeedWordPress::update_requested() should not be called statically in /home/hsufehmi/tech.sufehmi.com/wp-content/plugins/feedwordpress/feedwordpress.php on line 184
Tech @ Sufehmi.com » 2007 » March

Archive for March, 2007

Misteri Sains

Friday, March 30th, 2007

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/hsufehmi/tech.sufehmi.com/wp-includes/functions-formatting.php on line 83

Banyak orang yang sudah merasa lelah, jemu, atau juga jeri dengan dogma. Banyak kemudian berpaling kepada sains, yang menawarkan logika yang cenderung bebas emosi dan obyektif. Beberapa kemudian menemukan ketenangan disana. Beberapa mungkin kemudian menganggap kebenaran pada sains sebagai suatu kebenaran yang lebih benar daripada kebenaran lainnya.

Kenyataannya, banyak juga “fakta” di sains yang sebetulnya masih belum terbukti. Bahkan yang sudah “terbukti” pun kadang terbukti keliru total di kemudian hari, atau paling tidak perlu direvisi.

Atau, kemudian ditemukan bahwa ada dua (atau lebih) kebenaran.

Satu contoh; air membeku pada suhu 0 derajat celcius. Ini adalah benar.
Namun, ternyata kemudian ditemukan bahwa air juga bisa membeku jika dialiri listrik — dan kemudian ditemukan bahwa air juga bisa membeku pada temperatur di atas suhu didihnya.

Sains memang sangat menarik, antara lain karena sains justru membawa lebih banyak pertanyaan daripada jawaban pada setiap penemuan. Seperti penemuan gravitasi, sejak “penemuan”-nya oleh Sir Isaac Newton, seluruh efeknya telah dipahami dengan baik. Tetapi, apakah gravitasi itu? Mengapa bisa tercipta gravitasi? Bagaimana caranya gravitasi bisa bekerja seperti demikian? Semuanya belum ada jawabannya.
Jadi, dari satu penemuan, kemudian muncul paling tidak tiga pertanyaan baru. Loads of fun :)

Masih sangat banyak hal-hal lainnya yang kita ketahui begitu saja tanpa betul-betul dipahami.
Mengenai massa, kita tahu massa dari setiap zat. Namun, mengapa massa dari zat X adalah sekian? Kenapa bukan sekian?
Atau konstanta - ada banyak konstanta, seperti kecepatan cahaya; yang kemudian menjadi salah satu pondasi paling fundamental dari fisika. Tapi, mengapa kecepatan cahaya adalah 299.792.458 meter/detik ? Kenapa tidak 300.000.000 m/dtk ? Atau 453.567.130 m/dtk ? Tidak ada yang tahu jawabannya.

Jadi, pada saat ini sains adalah seperti mobil. Kita adalah pengendaranya, dan kita sangat mahir mengendarai mobil itu. Tapi jangan tanya bagaimana mobil bisa berjalan, bagaimana cara kerjanya :)

Sains is very fun indeed.

Open-source bug hunt

Friday, March 30th, 2007

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/hsufehmi/tech.sufehmi.com/wp-includes/functions-formatting.php on line 83

Setelah berjalan selama satu tahun, Open Source Hardening Project telah berhasil menemukan banyak bugs di berbagai proyek open source. Paling tidak 6000 bugs telah dikoreksi, dan kini semakin banyak proyek open source yang di audit oleh proyek ini.

Para pengguna software open source bisa menikmati tingkat keamanan yang pasti makin meningkat & bisa dibuktikan secara jelas. Sementara dengan solusi proprietary / tertutup, customer hanya dapat berpegang kepada klaim & janji-janji dari vendor.

Satu alasan lagi untuk mempertimbangkan pemanfaatan solusi yang open.

Macintosh Plus

Thursday, March 29th, 2007

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/hsufehmi/tech.sufehmi.com/wp-includes/functions-formatting.php on line 83

Saya sangat tertarik ketika menemukan bahwa kini sudah ada emulator Macintosh Plus, dan cukup mudah instalasinya - bahkan bisa dijalankan dari Flashdisk. . Setahu saya, ada banyak aplikasi yang bagus di platform ini. Salah satu yang ingin saya coba adalah HyperCard, untuk mengenalkan anak-anak ke computer programming.

Proses instalasi berjalan dengan cukup lancar. Dalam waktu yang tidak terlalu lama, di Ubuntu telah berjalan Macintosh Plus dengan memory 4 MB dan hard disk 1 GB :D

Awal proses instalasi :
Macintosh Plus - instalasi awal

Up & running. Perhatikan bagaimana di komputer keluaran tahun 1986 ini sudah ada perhatian untuk orang cacat, fasilitas sharing file via network (bahkan fasilitas monitoringnya juga), dan bahkan special effects - ketika window di maximize / minimize maka ada efek zoom nya :
MacPlus - up and running

Rencananya nanti disk image yang dihasilkan akan saya sharing disini. Stay tuned. Atau mungkin sudah ada yang selesai membuatnya? Share lah :)

Open Source = National Security

Thursday, March 29th, 2007

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/hsufehmi/tech.sufehmi.com/wp-includes/functions-formatting.php on line 83

Dari berbagai argumentasi yang saya sampaikan kepada para client, tentang mengapa sebaiknya mereka memilih solusi yang open, salah satunya (terutama client pemerintah / departemen) adalah security.
Pada solusi yang open, antara lain kita dapat melakukan source code auditing, sehingga kita dapat yakin bahwa software tersebut memang aman, dan tidak ada “titipan” dari pemerintah asing.
Hal ini sulit (kalau tidak bisa disebut mustahil) dilakukan pada software tertutup / proprietary.

Dan ini bukan hanya khayalan / fantasi saya saja. Kasus seperti sabotase pipa gas Rusia adalah salah satu kasus yang paling spektakuler.

Namun, yang perlu dicemaskan adalah kasus-kasus yang low profile, atau tersembunyi. Seperti, pencurian data-data rahasia secara diam-diam. Dan ini, lagi-lagi, bukan hanya skenario khayalan, namun sudah terjadi secara rutin dengan adanya Internet — ada beberapa mafia identity theft yang secara rutin mencuri data-data pribadi Anda dan kemudian menjualnya di black market.
Bagaimana kalau yang tercuri ternyata kemudian adalah rahasia negara? Pastinya akan dapat dijual lebih dari mahal dari detil kartu Visa Gold, yang dihargai sekitar US$ 100 di black market.

Mudah-mudahan dengan pertimbangan ini (dan lain2nya), maka pemerintah kita akan semakin bersemangat untuk go open.

Artillery Live

Monday, March 26th, 2007

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/hsufehmi/tech.sufehmi.com/wp-includes/functions-formatting.php on line 83

Found this little gem by accident - an online multiplayer FLASH game.
With chat.

Hilarity ensued !

Kill ‘em all :
AL - kill em all - thumbnail

Be a communist :
AL - Be a Communist - thumbnail
(Turned out he’s a Jew. Ended up threatening to kill me)

Perawan di sarang penyamun :
AL - virgin - thumbnail

Needless to say, do NOT play this game when you don’t have much spare time. I have learned my lesson.

Commodore is back

Saturday, March 17th, 2007

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/hsufehmi/tech.sufehmi.com/wp-includes/functions-formatting.php on line 83

Commodore was part of the home computing revolution back in the 80s. Their C64 was a big hit back then, because of its low price and high capabilities. C64 owners were enjoying their games in the fast hardware-accelerated graphic and high quality sound from its 3-channels sound chip. The sound chip was said to be so good and produces unique sound, it has quite a dedicated community, and even a special product based on it.

Another phenomenon on the 80s was the demoscene. I think it’s safe to credit C64 for starting this.
These guys produces stunning graphic demos, by pushing the hardware to maximum and utilizing undocumented features. These demos are usually accompanied by no less stunning music. The music is so good, I’ve read news where they’re plagiarized for commercial artists’ songs.

C64 isn’t only good for games though. About 10.000 applications were available for it, including business software. Quite impressive for a console-like computer.

The next of Commodore’s success is Amiga. Its main edge over the competitors are various custom co processors - a chip for each task; graphic, sound, etc. This enable Amiga to perform much better than others, sometimes spectacularly so. This machine was way, WAY ahead of its time; there’s still communities based on it. A lot of famous artists / public figures are keen Amiga users. And many TV series / movies are utilizing Amiga for its production.

Then Commodore went bankrupt. I don’t know the details, but it seems that Commodore wasn’t able to market it effectively, and got lost in the competition over PC makers. The loss was mourned by many.
Several attempts were made to revive it, but none made it as a world wide success. Now, a bunch of people are giving it a try again with Commodore Game PC.

Commodore XX is its current top of the line.
Featuring : Intel® Core™2 Extreme Quad-Core processor QX6700, ASUS® P5N32-E motherboard, 4GB Corsair® Dominator memory, and 2 (two!) NVIDIA® 8800 GTX SLI graphics cards. True to its Commodore roots, it’s also preloaded with a C64 emulator, containing more than 50 classic games.

Commodore was known as an innovative company, and the new Commodore is continuing this tradition with the C-Kin. Currently there isn’t anything really stunning in its choices, but I’m sure overtime we can expect some awesome designs making its way to the C-Kin collection. Also C-Kin may not seem to be much of an innovation, but one can hope that this is the start of a torrent of wonderful ideas from the new Commodore.

The PC scene is getting more and more interesting nowadays. I’d like to be among the first to welcome the comeback of Commodore.

High-load Website (WordPress) Optimization : IlmuKomputer.com

Thursday, March 8th, 2007

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/hsufehmi/tech.sufehmi.com/wp-includes/functions-formatting.php on line 83

Mr. Romi, founder of IlmuKomputer.com (IKC), yesterday asked me to help optimize this website. A bit about IlmuKomputer.com, it means “Computer Knowledge”, and contains a lot (and I mean it) free high quality computer tutorials.
As you can easily guess, the website is very popular. On peak hours, it’ll usually become overloaded, and will become unresponsive.

I’m only too happy if I can be of assistance to IKC’s team in their good cause. So I started working on it with help from one of my staff, Yopi.

Turned out that what we’ll be doing will be very different with what most others do. Anyway, IKC is a very popular website (and “slashdotted” daily, by leechers), so what works for most others doesn’t work for us.

The Bottlenecks

A bit of background - IKC uses WordPress as its CMS. It’s a very nice CMS, and makes your life easier. I’ve used WP myself since version 1.5.x. However, being database-based, there are a lot of points within its a WP-based infrastructure which can become a potential bottleneck. So if your website started to become popular with this CMS, you will need to start optimizing it.

After examining the situation for a while, it’s clear that MySQL was THE bottleneck. Output of top shows it using at least 8 times of CPU time than other service. Mr. Romi also told me how it kept on falling down on peak time.

Apache (and PHP, since it’s compiled as Apache module) is the next one; with each of its process using more than 10 MB of RAM. This may seem insignificant at first, but multiply that by (potentially) 150 processes - and you’ve got quite a memory hogger here.
Also CPU-usage wise; I’m quite surprised to see that each incoming request will cause the particular process’s CPU usage to spike to more than 50%.

Initial actions

I asked Mr. Romi to increase the size of MySQL’s internal cache size. He did, but the machine still fell down in daily basis.

He has also implemented caching on the app server (PHP) by way of wp-cache plugin. Still no joy too.

The Edge

I decided that we need to go straight to the “edge”, and stop the load there.

I proposed that I setup Squid in HTTP Acceleration mode. This way, most of the requests won’t even touch Apache, much less MySQL. Squid will bear most of the load, but since it’s very efficient, it should be able help a lot in making the website perform better.

Since I’ve got a few things to do myself, I asked Yopi to setup Squid in our test machine.
I just gave him pointers now and then, yet he managed to finish testing the setup and implement it in IKC’s server in just about 3.5 hours.

Then I showed him “tail -f /log/squid/access.log”, and we watched in amazement on how quickly the TCP_MISS lines are changing to TCP_HITs.
After about 12 hours, I increased the cache_mem size, and the TCP_HITs are slowly changing to TCP_MEM_HITs.

The result

Squid is working as we expected.

Average server load dropped from 30% plus to about 3%. While squid’s CPU usage increased from 0% to an average of only 2%. A very nice trade off.

After about a month, I checked the website’s logfiles, and saw some very nice numbers — traffic to IlmuKomputer.com has doubled ! Needless to say, Mr. Romi is very happy with it.

I also found that everyday there will be people downloading the contents using crawler software - such as Teleport Pro, wget, etc. I asked Mr. Romi if he’s got problem with it, and he says no. It is his mission to spread knowledge for free after all. So I let these leechers alone.

Come to think of it, it’s possible that these crawlers are the ones causing IKC server to fell down at peak hours. Example, Teleport Pro is able to download 10 links simultaneously at the same time. Then once any of it is finished, it will instantly start download the next one. When all 10 downloads access the database, and many crawlers at the same time, not many servers will be able to stand up to it. It’s like being machine gunned wearing just a simple leather cloth. If you have had the experience of having your website linked from Slashdot or Digg, you’ll understand what I’m talking about.

In this case, squid acted as a thick titanium armor, and taking most of the hits for your server. I suspect now the number of crawlers has increased than before, but it shouldn’t be a problem.

MySQL is a bit strange though. Sometimes its CPU usage can be as high as 160%. Thankfully this is very rare, so it’s probably just some internal clean-up routine.

One day, after happily watching the low load on the server for a while, suddenly everything froze. Even my SSH connection. Attempts to reconnect to the server failed.
After a while, I was finally able to connect again. Looking around, I noticed there’s some sort of bandwidth limiter daemon running on the server. After consulting with Mr. Romi, I killed it. The problem stopped.

Happy ending ?

I’m still monitoring the server as we speak for glitches. For example, squid seem to hang from time to time. This can be caused by anything from bad memory to problem with specific hardware configuration; so for now I’ve setup a cronjob which will restart it in certain intervals.
It seems to help, so I can troubleshoot the problem in peace.

Anyway, I’m sure that with the increased availability, even more people will visit the website (Ed: confirmed!). Then at some time in the future, we may find the server overloaded again.

In that case, there are still many things which we can do to keep IKC up & running in just one server :

  • Coral-ize internal links : Coral is a global cache with servers all over the world. It has proven to help people with overloaded servers to lighten their load (when slashdotted, digged, etc). With the Coralize plugin, all of your internal links will point to its Coral cache.

    Actually, for most people, this may be the easiest and the best step they can do. I can setup Squid because IKC has its own dedicated server. Not everyone does, I personally also own a (shared) webhosting account. Coral CDN (Content Distribution Network) is a very nice & easy solution to us. It’s rarely mentioned though, so here you go.

    If you’re not using WordPress, you can still utilize Coral CDN easily ! Just append .nyud.net:8080 to your links. For example, if you access http://harry.sufehmi.com.nyud.net:8080, you’ll actually access a Coral server, serving a copy of my website from its cache.
    I did say that it’s very easy, didn’t I ? :)

  • RAM Upgrade : This will enable Squid to have bigger memory cache size, therefore increasing its effectiveness significantly.
  • Roundrobin Edge servers : If the load is so high that even Squid is overwhelmed by it, then we can implement a cluster of Edge servers. People can volunteer their servers and have it act as the edge server for IlmuKomputer.com.

    The incoming requests are spread over the edge servers by way of Roundrobin DNS feature. It’s not the best way to do it, but it’s very easy and the cost is almost nothing.

  • Use lighttpd : Apache is a rather heavy webserver. I personally like its (amazing) flexibility (there’s a reason why it’s called the Swiss Army Knife of Webserver), but at times you’ll need something else. From my experience, lighttpd + fastcgi is very nice alternative to Apache + PHP. The features are now quite similar to Apache’s, but it’s much more lightweight. Its community is also quite helpful and happy to help a newbie within reasons. Recommended.
  • And many other ways

Last, we’d like to say thanks to Mr. Romi for giving us the opportunity, it was very interesting ! Hope IKC will become even more successful in the future, therefore benefitting even more people. Well done pak.

Powerbook without battery

Friday, March 2nd, 2007

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/hsufehmi/tech.sufehmi.com/wp-includes/functions-formatting.php on line 83

After using it for several weeks, I noticed that my PowerBook’s battery capacity has decreased sllightly. Where it used to be able to run for about 2 hours and 15 minutes after a full charge, now it rarely able to stay on for 2 hours.
I’ve been guilty of running it for hours while plugging it to the power socket though.

Then I thought, let’s see if this thing can run without battery, just like my previous laptop (Lifebook). So I rebooted, then while it’s on the logon screen, I turned the battery lock *plop* there goes the battery, and the laptop is still running happily.

I’ll still buy a spare battery later, but now I’m no longer in any rush. Very nice.