Posts filed under 'Hacks'
Summary: ‘resetting’ the XP swap file causes a dramatic increase in performance.
- This hack seems so stupid, and implausible that I don’t blame you for being sceptical. I suggest you TRY it OUT, and see the results for yourself. Believe me, it works, and the results are quite amazing, especially on low ram PC’s
- This hack works best on PC’s with under 1GB ram (In my case, I tried it on a PC with 512MB) - if your PC has 2GB or more it probably won’t make much difference.
- Update: someone commented that you can defragment the swap file also, via pagedefrag - I don’t think the problem is in fragmentation of the swap file but rather the simple fact that, over a few months of use, XP develops an unnatural reliance on the swap file, and tries to use it more than physical memory - by zapping the file, XP starts over again, and is much more faster. Again, I know this all sounds rather absurd, but it actually works.
- If you try this out, let me know!
Long boring preamble
Have you ever noticed how fast your PC is after a fresh OS/Software install? How the OS seems crisp and fast, and applications load up almost instantly?
And how… after a few months of use, your PC seems to slow down to a crawl? How even booting up seems to take forever, how launching the simplest applications causes your PC to struggle? Well I’ve always wondered what causes this ‘Windows Rot” phenomenon (aside from poor programming at M$).
What I used to do earlier, was reinstall everything on my PC every few months.
Eventually (due to product activation requirements) this became a hassle, so I now keep a backup mirror and restore it every once in a way. Still, this is a hassle, because I have to re-install any new software I was using, also restore various system settings.
Today, I was wondering to myself, does the swap file have anything to do with this problem - after all, the hard disk light starts staying on when the PC slows down - which seem’s to indicate swap file use.
So, I decided to try deleting the swap file. The beast way to do this was by setting it to a small size - e.g. 2MB, restarting the PC, and setting it back to the original size.
Here’s the procedure (simplified somewhat):
(this procedure refers to XP but you can follow similar methods in other windows versions, also, don’t attempt to drastically reduce swap file space, even temporarily, on machines with under 512MB ram)
Caution: don’t mess with your swap file unless you know what you are doing!
- Right click my computer, select properties
- Click the ‘Advanced’ tab
- Under performance, click Settings
- Click the ‘Advanced’ tab
- Click ‘change’ under Virtual memory
- Make a note of the existing swap file(s)
- Set the current swap file to a very small size (e.g. 2mb)
- Restart the PC, and resize the swap file
back to its original size Initial Size equal to the 1.5 to 2.0 times your physical RAM (from a comment below!)
- Restart the PC once more
The results were dramatic and surprising. I think I can confirm that (for XP, on a PC with under 1GB ram) this procedure returns your PC to (almost) the original post software install stage.
Does this sound crazy? Don’t believe me? Just try it RIGHT now, and I bet you will notice a significant speed difference in your PC.
It’s just magical: applications which struggled to load earlier now load up rapidly, just as they used to when the XP installation was fresh. Everything just works faster - even simple tasks like switching between windows!
So why does this work? I’m not sure but I speculate it has something to do with the way Windows uses the swap file.
Try this and let me know what happens (post a comment here)
September 8th, 2007
The simplest way to kill comment spam on your blog is to add http:// to the list of blacklisted words (99% of spam includes links - which start with http:// obviously). You can leave a text note warning legitimate users to modify the links.
In wordpress, go to the dashboard/admin panel and click
and enter http:// under comment blacklist
PS: you should add a note to your comment form warning visitors not to leave links or the comments will automatically be deleted.
May 2nd, 2007
The photo has notes - please click to view them.
Just how much performance can be extracted from a used PC? Especially one with relatively humble specs like this (Pentium 4 3.06GHZ HT). You may be surprised:
Pentium 4 3.06 HT
Nvidia geforce 440MX
CPU ran somewhat warm (anything from 45 degrees upwards idle)
- Disassembled the PC to component level, and cleaned every single piece. This involved some amount of sneezing but it was an interesting process. Thankfully the PC had an easy slide out tray for the motherboard.
- Removed the CPU and cleaned it, also took apart the heatsink/fan assembly and cleaned/polished it.
- Reseated the CPU using arctic silver. (CPU now idles at around 38 degrees celcius!)
- Tweaked the BIOS, and optimized memory timings, so as to get the best performance out of the system.
- Switched to a SATA 250GB drive.
- Fully redid the cooling system - so as to circulate air more efficiently within the case.
- Added a fan for one of the board heatsinks (possibly the onboard GPU), and a passive heatsink to another chip (possibly the SATA controller?)
- Switched to the onboard graphics, (to reduce power usage, also the onboard graphics support directx 9).
- Added an external PCI sound card as the internal one is a bit resource heavy.
- Added a separate fan for the hard disk. Hard disk now reads an operating temperature of around 36 degrees celcius!)
- Due to long term use under extreme heat conditions, and manufacturer flaws, a number of capacitors have started to leak from the top. This leads to capacitor failure and system instability/failure.
- System uses DDR333 ram. To enable dual channel operation I should at least match the speed of the chip. Unfortunately nobody seems to carry DDR 333 any more. Hopefully I will be able to find a 512MB DDR333 or DDR400 chip which will work.
Final performance benchmarks
(as compared to a dual core pentium D)
Windows XP professional: boot in 14.7 seconds.
Hyperthreading is a viable technology - as the benchmarks show, it gives the dual core PC a serious run for its money!
Todo: Get more ram and enable dual channel.
March 14th, 2007
One of my flash drives suddenly died today. It all happened when XP suddenly froze for some reason. after rebooting, the device was dead - XPdetected it as a 0mb device (and attempted to format it as such - which didn’t work)
After a little research I was able to revive the drive, and heres the procedure (pretty easy):
- Download and install the HP Drive Key Boot Utility
- Open the desktop icon and select the correct flash drive under device
- Select the file system you want to format to (FAT, FAT32, NTFS)
- Tick Quick Format
- Click start
Officially this software (HP Drive Key Boot Utility) is meant for HP disks, but unofficially it seems to work fine at formatting most flash media, even digital camera cards.
January 15th, 2007
??? ??????? WordPress ????? ???????? ???? ??[/si]
This message is written in English, via WordPress[/en]
If the Sinhala message does not display correctly (you see boxes or something else), please download the font located here: Kandy Unicode and copy it to your fonts folder.
HELP: Please let me know the following:
- Does the text display correctly in Sinhala or not?
- What web browser are you using (name/version)
- What operating system are you using (name/verson)
If you are interested in blogging in Sinhala using WordPress, please await my detailed guide on how to do this.
Note: The above message should probably say ‘This post..’ but it says ‘This message..’ That’s because I could not find a ????? equivalent for ‘Post’. AFAIK, ??????? is the closest word (lit: message). Also, special thanks to my good friend Yo [link coming soon] for suggesting this topic.
Disclaimer: My knowledge of Sinhala is rudimentary at best, also, I apologise for not giving a Tamil translation, as, I don’t know any Tamil whatsoever.
September 28th, 2006
Messing with the hosts file
Give your coworker hours of confusion, and (if you are lucky) confuse the tech support guy too.
Windows OS, Internet Explorer as browser (may not work in Firefox/etc)
Windows Hosts file specifies where URL’s will take you - using it you can bypass your dns server..
In English, please
You can redirect yahoo.com visitors to hotmail, or somewhere worse*. Not just Yahoo but any site really.
- Open the windows Hosts file, using notepad: In windows XP installations, it is usually at C:\WINDOWS\system32\drivers\etc\HOSTS
(Open that file using notepad). e.g click START, then RUN, and type
NOTEPAD C:\WINDOWS\system32\drivers\etc\HOSTS and press enter
- The host file contains IP addresses followed by URL’s. You must know the destination IP of the site you want to redirect TO. For example, lets say you want to redirect all visitors to NBC.COM to CNN.com (22.214.171.124 is cnn.com), you might type something like:
- Save the file
- Voila! Coworker types nbc.com, and ends up at CNN.com! Try this to send yahoo users to hotmail, hotmail users to google and so on.
- To reverse the process, re-open the file and remove the edits you made, and save.
TIP 1: To find the IP of a website, you can try going to dos (click run, type CMD) and typing tracert sitename.com
TIP 2: To ‘kill’ a site, put the IP to 127.0.0.1 (Localhost)
Bonus: This method can be used to block annoying ad sites/popup sites you don’t like, quickly and easily (point them to localhost).
Disclaimer: *Above info for informational purposes only. Please do not irritate your cow-orkers, unless you are really bored (and have a good insurance policy). I will not be held responsible for any damage you suffer from following this or other pointless pranks. Please remember to re-edit the hosts file at end of day and REMOVE any changes you made.
September 22nd, 2006