Sunday, January 18, 2009

Is browsing photos over your network S L O W? The culprit could be your anti-virus software!

For the longest time now, I have been tolerating some major pain-in-the-ass slowness when it comes to previewing files (especially photos and videos) directly on my NAS. I have conveniently put the blame on my WiFi connection as it can get pretty flaky in my noisy (I can detect up to five APs with signal strength of at least 50% in my vicinity!) multi-storey environment.

The last straw came recently when I wanted to do some major re-organization of my family media stored on the NAS. It was unbearably slow as each thumbnail in Explorer's "Large Icons" view was taking at least two seconds to show up. After some ten minutes, I gave up on my task and decided that its about time I find the root cause of this slowness.

Since I have been blaming the WiFi connection all along, I figured I should at least try to verify this. So I hooked up my laptop to the network via wired LAN (100basedT) and tried to browse the folder again. It certainly is faster but I'm still getting quite abit of lag; about half a second before each thumbnail shows up.

So it is not the WiFi connectivity. Next I switched my focus to the NAS. Could it be that the DNS-323 has poor network throughput? I tried a large file transfer from the NAS to my laptop over the wired connection. I managed to get a sustained transfer rate of 10.5 MB/sec (as reported by file transfer dialog in Windows Vista) which is decent for 100basedT network.

So it is not the network throughput. Could it be the SAMBA server implementation in the DNS-323? I did some research online and found this and this. Nothing conclusive there but seeing that my current version was only v3.0.24 and a new firmware for the DNS-323 is available, it led me to try upgrading firmware to v1.06 and upgrading Samba to v3.2.3. Unfortunately, I was still getting the same behaviour after both upgrades.

So it is not the SAMBA server. Could it be on the client side then? I started trying it using the various PCs I could find in the house; my wife's laptop (running Vista Business x86), my kids' laptop (running XP) as well as my HTPC (running Vista Ultimate x64). All exhibits the same behaviour. Just when I was about to give up, I gave it one last try on my Office laptop (running Vista Business x86). Lo and behold, the thumbnails showed up instantaneously!

Now we are making progress! I dig a little deeper into the difference in configurations and finally found the root cause of the problem.... and it was Avast! Anti Virus! I had it as a household standard while my Office laptop was using my Office standard issue which is McAfee. Once I turned off Avast!, the problem goes away.

Obviously, turning off anti virus protection is not a good idea. Therefore, one option is to switch to a different one such as McAfee since it has proven to work in my scenario. However, I'm not quite ready to junk my time and effort invested in Avast! just because of this nor do I want to shell out more money for McAfee.

I did a little more investigation and here's what I think is happening. Avast! by default will scan any file before opening it, not just executable ones. So when I am browsing the photos on my NAS in "Large Icons" view in Explorer, Explorer will need to open each file in order to generate the thumbnail and this means that Avast! will intercept and scan it (over the network and each file is about 3MB mind you) thus causing the delay.

Poking around the settings available in Avast!, I found out that I can setup an exclusion list. And by adding in the extensions for my images (i.e. *.jpg, *.gif, *.bmp), I effectively solve the problem. Here are the steps to finding the exclusion list in Avast!:
  1. Open the Resident Protection dialog by double clicking on the Avast! system tray icon;
  2. On the left, select the icon for "Standard Shield", then click the "Customise" button on the right;
  3. In the popup dialog, select "Advanced" tab and click on the "Add" button;
  4. Here, you type in the file extensions or paths for exclusion. Use of wildcards is possible.
Although I may have solved this particular problem, I am still puzzled as to why Avast! needs to scan all files and not just infectable files. Sure, by giving us the option to exclude file types/extensions in the configuration helps but this should not be an end-user's job since how many of us knows all the file types/extensions are infectable? Moreover, end-users are less likely to be tracking developments in new exploits hence may end up with out-dated exclusion lists and leave a gaping hole in their anti-virus protection.

Well, perhaps it is time to explore other anti-virus solutions out there in the market...

Thursday, January 15, 2009

Upgrading Transmission to 1.42

Since I'm in the mood to upgrade, I figured I might as well do so for Transmission. More specifically, I want to upgrade so that I can get more fine grain control over the files to download in a torrent; You can do this via the CLI or a third party GUI client like this only. i.e. You cannot access this feature using the web interface (yet). Other things that have changed moving from v1.2 to the current v1.42 include the following:

Notably, the working directory is now /mnt/HD_a2/.transmission-daemon instead of just /mnt/HD_a2/.transmission. (since v1.3) If you are upgrading, you will need to move your existing directory manually if you want to resume your existing downloads. You may also need to amend your custom addon scripts (if any) such as my enhanced transmission script.

Another change (also since v1.3) is that Clutch no longer depends on a separate web server as one is already built in. This sucks as you now have another web server running on the box listening on its own port (default is 9091). Having said that, it does make installation and maintenance easier.

Lastly, access to Transmission is now restricted to local host by default (doesn't matter if you are using the CLI or web interface) (this change was introduced in v1.42). To allow access from other hosts, you will need to edit the rpc-whitelist parameter in the settings.json configuration file.

For an (almost) idiot-proof guide on setting up Trasmission v1.42 on the DNS-323, check out this guide by andy. More info can also be found in this forum thread.

Wednesday, January 14, 2009

Upgrading DNS-323 firmware to 1.06

I knew about the existence of the new firmware when I bumped up the capacity of the NAS a couple of weeks ago. However, I resisted the upgrade as none of the changes/fixes mentioned in the release notes (see below) interests me.

Just today, while troubleshooting slowness in browsing files on my NAS from my Vista laptop, I came across the news release for Samba 3.2 which states better integration and support Vista (and Server 2008!). Hoping that the new firmware will have incorporated this version (or later), I decided to give it a shot and upgraded the firmware tonight.

Like my previous upgrade, the process is straight forward and quick; just download the file, unpacked it into a temporary folder, and upload it to the DNS-323 using the web admin console.

After a mandatory reboot, my NAS is happily running v1.06. Unfortunately, Dlink has chosen not to touch the Linux kernel nor the Samba server hence they remain as version 2.6.12.6 and 3.0.24 respectively. Looks like if I want to give the new 3.2.x a spin, I'm going to have to go the route of replacing the stock Samba server with fonz's package!


DNS-323 Firmware 1.06 Release Notes
===========================================================

Feature Additions:
1. Supports 1.5 TB Hard Drives
2. USB port supports UPS monitoring
3. Add option to Manually or Automatically Rebuild Raid
4. UPnP AV supports Microsoft XBoX 360, Sony PlayStation 3
5. Support FTP over SSL/TLS
6. Add Unicode support to FTP Server
7. Email Alerts supports Gmail

Function Changes:
1. Turn off Fan at low system temperature
2. Disable UPnP AV Server and iTunes Server by default.
3. Remove static DNS from the DDNS server provider list
4. Remove the DDNS Timeout setting from GUI, and change the Status design. fixed timeout timer as 576 hours
5. Remove the Auto Refresh Timer option for UPnP AV and iTunes Server, instantly Auto Refresh by default.
6. More user friendly Time Settings GUI design

Bug fixes:
1. Fix BT downloaded files sometimes are unable to be deleted
2. UPnP AV support large file (over 4GB)
3. Fix 1st HDD unable to sleep
4. Fix HDD cannot hibernate if UPnP AV or iTunes Server is enabled
5. Time stamp of files are incorrect when DST is enabled

Thursday, January 8, 2009

Transmission Remote GUI - feature rich desktop client for Transmission!

Out of the box, Transmission offers you two ways of accessing its features and functions; via the command-line interface (aka CLI) which is clumsy or via the web client (formally known as Clutch) which is basic. Now, there is a third and better way of accessing Transmission.... introducing Transmission Remote GUI!

This is a cross platform (Linux and Windows for now. Mac OS X on the way) desktop client with a look and feel similar to uTorrent. It offers a lot more control and status information on your torrents than the web client, not to mention fast too.

If you are a power user, this client is definitely for you! Note that to use it, you will need Transmission v1.40 and up. *Sigh*, looks like an upgrade is in order for me!

Tuesday, January 6, 2009

Top ten things to do on a hour long train ride

Starting this week, I will no longer be driving to work as I figured that the car is better served as transport for my two school-going kids. So instead, I now commute via public transport (MRT and Bus) which takes a whole hour (and slightly more) for just one way!

As such, I suddenly find myself having quite a fair bit of time to kill... Two hours a day, ten hours a week, forty hours a month! *Gasp!* That's equivalent to one entire work week! It will be a real waste if I can't find anything productive or interesting to do. So here, I have come up with the top ten things I can do during the journey that is free or cost little (yeah I'm cheap) and don't require me to carry additional barang barang (yeah I'm lazy too!).
  1. Listening to my MP3 collection using the stock HTC Touchflo 3D music player on my Touch Diamond;
  2. Reading ebooks using Adobe Reader on my Touch Diamond; (still hunting for a better one, may try Mobipocket ebook Reader; winner of Smartphone & Pocket PC Magazine's "Best Software Awards 2008" in the ebook reader category. Currently also trying this interesting approach to book reading - via RSS)
  3. Catching up on news/blogs/discussions using RSS Hub (based on NewsBreak) on my Touch Diamond;
  4. Training my left brain by playing SPB Brain Evolution (review) on my Touch Diamond; (may give Brain School a spin after this)
  5. Reviewing my daily calendar and todo list using Pocket Informant (review) on my Touch Diamond;
  6. Training my hand eye coordination by playing Teeter on my Touch Diamond;
  7. Learning a new foreign language using MobiLearn Talking Phrasebooks on my Touch Diamond;
  8. Watching interesting YouTube videos using youtubeplay (remember to download the video first or it can get pretty expensive using 3G data connection!); [edit: you can now easily grab the videos automatically via RSS and RSSHandler! More info here.]
  9. Texting friends to catch up using the stock SMS application on my Touch Diamond;
  10. Taking pictures/videos of inconsiderate/weird/interesting people on the train using the camera on my Touch Diamond (remember to turn off the camera snapping sound first!) and sending them to STOMP!
Why no "catching a nap" in the list? Well, I would love to except for one thing, do you know how crowded the rush hour traffic is? I will be grateful if I can find some standing space without bags, umbrellas or newspapers poking into me; let alone finding a seat to catch some Zzz!

Another observation: ten out of the ten activities involve using my Touch Diamond! I never thought I will say this but... I love my Diamond!