Swap used instead of RAM

T4x series specific matters only
Post Reply
Message
Author
dfumento
Senior Member
Senior Member
Posts: 891
Joined: Thu Jan 20, 2005 8:27 pm
Location: Manhattan, NY

Swap used instead of RAM

#1 Post by dfumento » Tue Nov 22, 2005 6:39 pm

I have 1.5 GB RAM and even though there is RAM space available, 1GB of swap partition is in use. Any idea how to fix this so that RAM is used before swap partition?
X201s: 1440x900 LED backlit 2.13 GHz, 8 GB, 160 GB Intel X25-M Gen 2 SSD, 6200 a/b/g/n, BT, 6-cell, 9-cell, Windows 7 Ultimate x64 SP1, Verizon 4G LTE USB modem, USB 2.0 external optical drive, Lenovo USB to DVI converter
Previous Models: A21p, A30p, A31p, T42, X41T, X60s, X61s, X200s

simscitizen
Freshman Member
Posts: 59
Joined: Sat Apr 09, 2005 1:37 am
Location: Stanford, CA

#2 Post by simscitizen » Tue Nov 22, 2005 7:06 pm

Assuming that the RAM is good and the disk is not thrashing, let the OS manage swap space by itself. Some programs need a paging file on the hard disk to even work. Also, some programs request more swap space than they need; it is better for the OS to allocate this swap space to be wasted on your hard drive rather than your physical memory.

DIGITALgimpus
Senior Member
Senior Member
Posts: 774
Joined: Sat Aug 20, 2005 1:01 pm

#3 Post by DIGITALgimpus » Tue Nov 22, 2005 7:06 pm

Windows is designed to do that by design. You can totally disable swap, but that's not recommended (I even recall MS recommending against that). The point of SWAP is not just to compensate for lack of RAM, but to allow for quick expansion when necessary. Because of this, it by design puts low priority things in SWAP.

It's not an error, it's by design.
T43 (2687-DUU) - 1.86GHz, 1.5GB RAM, 100GB 5400 (non IBM-firmware Hitachi 5k100) HD, Fingerprint Scanner, 802.11abg/Bluetooth, ATI x300

davidspalding
ThinkPadder
ThinkPadder
Posts: 1593
Joined: Mon Nov 14, 2005 2:39 pm
Location: Durham, NC
Contact:

#4 Post by davidspalding » Thu Nov 24, 2005 8:00 pm

I'm not sure that calling it "swap file" or "swap space" is accurate ... it's not like the ol' swap file (dynamic, or permanent) that Windows 3.x had to help compensate for having something like "only 8 MB" or so (boy those were the days, eh?).

In NT/2000/XP, it's got other uses ... now I'm not a Windows MCSwhatever, so I can't be scientific. The general rule I know is make it double your RAM amount, max size 50% more ... or in XP you can just let Windows take care of it. Easier choice, that.

I've tried that "zero pagefile space" before trying to make ghost images for test systems, and it's bad news. Make one AT LEAST 1/2 your RAM under any circumstances.
2668-75U T43, 2GB RAM, 2nd hand NMB kybd, Dock II, spare Mini-Dock, and spare Port Replicators. Wacom BT tablet. Ultrabay 2nd HDD.
2672-KBU X32, 1.5GB RAM, 7200 rpm TravelStar HDD.

jdhurst
Admin
Admin
Posts: 5831
Joined: Thu Apr 29, 2004 6:49 am
Location: Toronto, Canada

#5 Post by jdhurst » Thu Nov 24, 2005 8:53 pm

Windows needs don't expand linearly with memory. I have played around with the paging file, and I settled on 256Mb of page file on a 768Mb system. I have use 0 successfully but I do not recommend that. No matter what I do, the page file never increases, and FreeMem Pro always says I have free memory available. And, "What I do" includes running separate whole machines at the same time via VMware. These are memory gobblers. ... JD Hurst

yossarian
Freshman Member
Posts: 119
Joined: Mon Sep 12, 2005 11:48 pm
Location: Auckland, New Zealand

#6 Post by yossarian » Fri Nov 25, 2005 3:53 am

I have 1.5GB ram too and I've turned off paging/virtual memory on windows completely. I've run Openoffice 2, civilization 4(took up 600mb ram) and a whole bunch of stuff at the same time without running out of memory.

When I only had 512MB though, swap was necessary.

I don't think with 1.5GB ram I'll ever use swap ever again. But then again I don't do video editing or heavy image manipulation, so ram isn't a big issue for me.

s0larian
Junior Member
Junior Member
Posts: 289
Joined: Sat Jun 05, 2004 5:15 am
Location: Munich, Germany

#7 Post by s0larian » Fri Nov 25, 2005 8:15 am

I disabled pagefile now for years and never experienced any problems. To monitor my free memory in the taskbar I am using 3rd party software like CachemanXP. So I see exactly when I would run into any trouble. But I never did, most times I have about 600-800 MB free memory of my 1,5 GB Ram.

The problem really is, that XP has a bad memory management. First it always swaps a few MB's, even if there is enough free Ram. Second if for some reason the swap file grows (i.e. large file transfers), XP will never shrink it until a reboot. You can watch this behavior very good with some software like Cacheman XP or any other memory management tools. This is the reason why XP slows down and down after some uptime because it swaps all the time, even if it is not necessary anymore.

Another idea might be using a ramdrive for the swap file. But since I disabled the pagefile successfully, I never tried.
T40p 2373-g1g: 1.6 GHz, 1536 MB RAM, 160 GB @ 5400 rpm drive, 64 MB Video, IBM a/b/g II, CD-RW/DVD Combo II, M10 Fan, Ubuntu 8.04

DIGITALgimpus
Senior Member
Senior Member
Posts: 774
Joined: Sat Aug 20, 2005 1:01 pm

#8 Post by DIGITALgimpus » Fri Nov 25, 2005 4:17 pm

using a ram drive for a swap file is just asking for trouble... just think about it. It's recursive. A recursive I/O operation is just begging for problems.

XP's memory management isn't bad for it's use of the swap file. But rather what it allocates where. Any good OS makes use of a swap file regardless of RAM available. Shrinking the swap file isn't really possible because of fragmentation. It would have to either defrag and adjust size parameters (not likely, in all honesty not even sure if you can dynamically resize a file in NTFS, or if it has to duplicate at a new file size), or copy to a new swap file, switch references, and delete the old one (also rather ugly). Both of those operations are disk intensive.

The point of swap is to make sure some RAM always stays free. Windows does a good job of that. IMHO it's logic of what goes where is somewhat flawed. Look at how Mac OS X really does gain performance between 1 and 2GB RAM, when Windows gains none between 1 and 2 (you only gain is that you can just open more apps without performance declining).

Then again, Windows is a pure desktop OS, with a desktop history, and designed for 1 main user, where UNIX is designed for a server environment, and multi-user. So swap had to be handled differently.

Linux for example likes a swap partition. This practice works rather well, at a cost of some disk space.

swap gets a bad rap. It's only bad when you rely on it (your still running 256MB RAM). But when your not relying on it... it's good to have. It's important to have enough for a stable reliable OS. Hence it's never considered good practice to disable (even large servers with several GB's of RAM have swap, and in fact quite a bit).
T43 (2687-DUU) - 1.86GHz, 1.5GB RAM, 100GB 5400 (non IBM-firmware Hitachi 5k100) HD, Fingerprint Scanner, 802.11abg/Bluetooth, ATI x300

jdhurst
Admin
Admin
Posts: 5831
Joined: Thu Apr 29, 2004 6:49 am
Location: Toronto, Canada

#9 Post by jdhurst » Fri Nov 25, 2005 8:30 pm

s0larian wrote:<snip>

The problem really is, that XP has a bad memory management. First it always swaps a few MB's, even if there is enough free Ram. Second if for some reason the swap file grows (i.e. large file transfers), XP will never shrink it until a reboot. <snip>
Another idea might be using a ramdrive for the swap file. But since I disabled the pagefile successfully, I never tried.
I copy large files (> 5Gb = large! file) and I can assure you the swap file I set (256MB) does not grow. All the memory gets used, but the swap file stays put. At least, this is true on my systems.

And I do agree with Digitalgimpus about the ram drive. I would never do that.
... JD Hurst

davidspalding
ThinkPadder
ThinkPadder
Posts: 1593
Joined: Mon Nov 14, 2005 2:39 pm
Location: Durham, NC
Contact:

#10 Post by davidspalding » Sat Nov 26, 2005 2:33 am

Haha, I set pagefile to zero for a quick laugh, things have run fine all evening .. until I opened Photoshop, and it complained "not enough memory." I was using 406MB or so of 1500 MB. :P
2668-75U T43, 2GB RAM, 2nd hand NMB kybd, Dock II, spare Mini-Dock, and spare Port Replicators. Wacom BT tablet. Ultrabay 2nd HDD.
2672-KBU X32, 1.5GB RAM, 7200 rpm TravelStar HDD.

xaverin
Posts: 15
Joined: Sun Nov 06, 2005 12:10 pm

#11 Post by xaverin » Sat Nov 26, 2005 4:21 am

Photoshop is know to absolutely want to swap some files.
So it allways produces that error. That is the Reason why i usualy not set the Page file off completely, but give the system a 20 perhapos 50mb file of fixed size for the page.
Greedy Xavi

s0larian
Junior Member
Junior Member
Posts: 289
Joined: Sat Jun 05, 2004 5:15 am
Location: Munich, Germany

#12 Post by s0larian » Sat Nov 26, 2005 8:21 am

Photoshop CS2 doesn't complain about missing pagefile. CS1 showed a warning, but worked fine.
T40p 2373-g1g: 1.6 GHz, 1536 MB RAM, 160 GB @ 5400 rpm drive, 64 MB Video, IBM a/b/g II, CD-RW/DVD Combo II, M10 Fan, Ubuntu 8.04

DIGITALgimpus
Senior Member
Senior Member
Posts: 774
Joined: Sat Aug 20, 2005 1:01 pm

#13 Post by DIGITALgimpus » Sat Nov 26, 2005 10:42 am

photoshop also has it's own swap, in addition to system swap.
T43 (2687-DUU) - 1.86GHz, 1.5GB RAM, 100GB 5400 (non IBM-firmware Hitachi 5k100) HD, Fingerprint Scanner, 802.11abg/Bluetooth, ATI x300

davidspalding
ThinkPadder
ThinkPadder
Posts: 1593
Joined: Mon Nov 14, 2005 2:39 pm
Location: Durham, NC
Contact:

#14 Post by davidspalding » Sat Nov 26, 2005 2:06 pm

Didn't mention that I'm using good ol' Photoshop 5.5. Up to that version, scratch drives are configurable in preferences. But CS2 is on my Xmas wish list.... ;)

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “ThinkPad T4x Series”

Who is online

Users browsing this forum: No registered users and 3 guests