Google
 

Digg Links

Wednesday, May 30, 2007

Speeding up computer; dropping swap.

As I've written in few posts before, I use IBM Thinkpad T42 for my day to day work. The "forced" operating systems installed is Windows XP Service Pack 2. Unfortunately, the laptop has only 512M of memory, and this often leads to a large "swapping" exercises. We used to "swapping" almost since first hard drives appeared (IBM Winchester was my first one), and we all know how and when it happens.

But this is exactly the problem I'm having - all I do is read email, browse the web, and create documents; sometimes I happen to watch a short movie (or YouTube clip) or listen to music - hardly the most intensive stuff in computing. But it really bugs me to wait for any application to load. Sometimes an applications such as Firefox or Outlook take upto half a minute just to start! And that's on almost idle system where one or two lite (such as PuTTY or IM) applications are running. This is very irritating, and bugs me more as a current state of things in all systems and in all applications rather than waiting itself.

I'm sure that this behavior while better in other operating systems, is similar in all of them.

So this got me thinking. Today's memory is cheap. Today's system are fully capable of handling 4GB of memory. What if I were creating "virtual" volume in memory and mount swap space in it? After all, I use swap for swapping only when system is up. I don't need it when system is off.

So, I'd equip my system with 4GB memory, giving 2GB of it to the OS, and using the other 2GB as swap space. The intention being eliminating hard drive access as much as possible. Would that work? Would this speed up my system?

Tell me what you think.

-A.

Technorati : , , , ,

7 comments:

Stargazer said...

That does not make sense to me as Linux only swaps if memory is full. By allocating swap memory in RAM you just fill it and force the system to swap...

tante said...

Stargazer is right on this one: Making Swap in RAM does not make sense.

What you could do is have you programs "preloaded". Linux caches which stuff was read (that's why a warm start of firefox is faster than a cold start). If you would force the system in your local.start to read all the files you'll be needing it might speed things up (but you pay with longer loading times).

The idea is to get as much as possible into the cache RAM.

Alex said...

OK, I got what you guys are saying, but it is not what I meant.

I meant making a system to "know" it only has 2 gigs of RAM, and the other 2gigs it will "see" as, say, another partition. From its point of view, its like working normally, just swapping will be much faster.

Just think about it like "external" memory which I mount as partition.

It is just a thought. While Linux may not swap all the time, I still suffer from long waits a lot.

I don't want to.

tante said...

You could of course create a ramdisk there that you do shuffle your programs over to while starting the computer (so they are read from RAM) but I don't think that that extra layer will be faster than just relying on linux's internal caching.

I'm not sure how windows is in that aspect though.

Caster said...

Check that your HDD is using DMA. Windows is happy to stop using it when it experiences few "access problem" - which might be triggered by just delay of HDD spin-up when resuming from suspend.
Also, Windows happily swaps programs from memory to HDD when the RAM is occupied by file buffers... complete nonsense and Linux doesn't do that.
Anyway swap in RAM makes no sense :) And 2GB RAM should be enough even for Windows...

Frantisek said...

Oh my god :-D.

Swap is used, because there is no memory. So swapping to memory is complete nonsense. You will swap into memory because you don't have enough memory ? Do you see the loophole ?

dfadf said...

follow up with another email after a few days
Microsoft Office
often acknowledging that maybe the person
Office 2010
didn't get my message due to email trouble on my
Microsoft Office 2010
end (which, when I was in graduate school, was
Office 2010 key
For repeat offenders, I just use the phone whenever
Office 2010 download
Interesting post. I have been wondering about this issue,so thanks for posting.
Office 2010 Professional
I will be checking back for any new articles
I’ll likely be coming back to your blog. Keep up great writing. Find your great Travel News and sing the songs at Free Song Lyric or you can watch the drama at
Microsoft outlook
Outlook 2010
Thanks for kindly sharing it with us. Very well done indeed
Windows 7
Microsoft outlook 2010