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...

2 comments:

Anonymous said...

This was the same issue I had.. thanks for posting your findings.

Anonymous said...

I was having this same issue all of a sudden, but I have McAfee. I found this post and was able to fix it.

I have 2 of the same computers in the house and one was still working fine which helped when trying to track down the problem.

I found that on one computer McAfee was scanning network files in real time and the other computer wasn't.

So if you open McAfee SecurityCenter/ Configure/ Computers & Files. Where it says "Virus protection is enabled" click advanced. Then under Real-time scanning uncheck Scan network drives. Then just click apply and you're all set. Thumbnails open up fast again.