Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

swap space

  • 13-12-2001 12:42am
    #1
    Closed Accounts Posts: 285 ✭✭


    How much swap space do I really need?

    I've seen rules of thumb thats 2-2.5 times your ram.
    I have 512MB , does that mean I need 1-1.25 gB swap space?
    Also this 2.5 times rule dosen't make sense to me as the more physical RAM I have the less swap space I will need????????


Comments

  • Registered Users, Registered Users 2 Posts: 4,162 ✭✭✭_CreeD_


    Msofts rule of thumb was always your ram +11mb. But afaik that was mainly to allow a full ram-dump if it crashed, also that was back in the days when 128mb+ ram only existed in the dreamland of servers. I've 768 in my system and use a 200mb min pagefile, 700 max (It usually hangs in around 250 or so). Which is still annoying as the system rarely uses above 300mb of ram. I'm tempted to setup a ram drive and stick the swap file there to see if it helps!


  • Registered Users, Registered Users 2 Posts: 96 ✭✭ramius


    Some people will tell you that you should allocate twice as much swap space as you have physical memory, but this is a bogus rule. Here's how to do it properly:


    Estimate your total memory needs. This is the largest amount of memory you'll probably need at a time, that is the sum of the memory requirements of all the programs you want to run at the same time. This can be done by running at the same time all the programs you are likely to ever be running at the same time.

    For instance, if you want to run X, you should allocate about 8 MB for it, gcc wants several megabytes (some files need an unusually large amount, up to tens of megabytes, but usually about four should do), and so on. The kernel will use about a megabyte by itself, and the usual shells and other small utilities perhaps a few hundred kilobytes (say a megabyte together). There is no need to try to be exact, rough estimates are fine, but you might want to be on the pessimistic side.

    Remember that if there are going to be several people using the system at the same time, they are all going to consume memory. However, if two people run the same program at the same time, the total memory consumption is usually not double, since code pages and shared libraries exist only once.

    The free and ps commands are useful for estimating the memory needs.

    Add some security to the estimate in step 1. This is because estimates of program sizes will probably be wrong, because you'll probably forget some programs you want to run, and to make certain that you have some extra space just in case. A couple of megabytes should be fine. (It is better to allocate too much than too little swap space, but there's no need to over-do it and allocate the whole disk, since unused swap space is wasted space; see later about adding more swap.) Also, since it is nicer to deal with even numbers, you can round the value up to the next full megabyte.

    Based on the computations above, you know how much memory you'll be needing in total. So, in order to allocate swap space, you just need to subtract the size of your physical memory from the total memory needed, and you know how much swap space you need. (On some versions of UNIX, you need to allocate space for an image of the physical memory as well, so the amount computed in step 2 is what you need and you shouldn't do the subtraction.)


  • Closed Accounts Posts: 6,275 ✭✭✭Shinji


    Er Ramius, wasn't the whole "MS Apps / OS" thing a bit of a hint that perhaps this board is for discussion of Windows, not Unix?

    Helpful guide nonetheless, but in totally the wrong place and completely off-topic...


  • Closed Accounts Posts: 2,525 ✭✭✭JustHalf


    Windows will use a little swap space regardless (at least in Windows 9x, don't know about NT and 2000/XP).

    Personally, I'd go with a fixed sized partition, to speed up virtual-memory acceses by reducing the fragmentation of data. I'm going with 400MB, with 256MB of RAM and Windows 2000 Professional (SP2)


  • Registered Users, Registered Users 2 Posts: 4,162 ✭✭✭_CreeD_


    Actually Win2k does a damn good job of keeping the pagefle contiguous, even when set to variable. Sometimes setting that large a page file can actually slow you down, at bootup anyway (And shutdown if you have the system set to flush the swapfile).

    I just installed Msofts Ramdisk for Win2k and setup a 30mb drive (only have 256mb on the work machine), setting this as my temp folder (for IE also).
    http://myhome.asia1.com/home/c/cyberwizardpit/files/ramdk.exe (Also available at Msoft but the links werent working for me earlier)
    There's a nice little speed boost using the browser, well worth doing imho.
    I'll definitely try out putting the swapfile up on one when I get home I think (in about 3 weeks..).

    FYI I did get Win98 to avoid using a swapfile on my home system without having to actually disable it. Just installed ramidle and enabled it's option to force Win9x to use as much available ram as possible. The Win2k version only has the option to make the Kernel resident if possible (disabled NT Executive Paging) which isn't as effective unfortunately.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 3,005 ✭✭✭strat


    something like this ?


  • Registered Users, Registered Users 2 Posts: 4,162 ✭✭✭_CreeD_


    Cenateks RamDisk is a lot better. It allows multiple file formats, has better memory options, can 'pretend' not to be a RamDisk and best of all can save the contents when you're logging off. However it ain't cheap.

    The Msoft Ramdisk sampler is free and is fine if all you want it for is your temp files.


  • Registered Users, Registered Users 2 Posts: 15,544 ✭✭✭✭Supercell


    Often wondered about this exact topic myself.

    Recently bought PowerDVD XP because the sound features just blew me away but it had constant crashes in win2k sp2 , until i fixed the swapfile space (ie lower and upper with same number, 2x the ram, which seemed like a good idea at the time).

    That done the pagefile is indeed twice my ram physically , but dxdiag shows a completely different (smaller) size.

    Not too sure what to make of it, anyone care to speculate?

    Swap file is on a different drive (physically) to the system one.

    BTW system is 1.4GB athlon not OC, 512mb DDR Crucial memory, set to cas 2 (kg7-raid mbd)

    Have a weather station?, why not join the Ireland Weather Network - http://irelandweather.eu/



  • Registered Users, Registered Users 2 Posts: 4,162 ✭✭✭_CreeD_


    If you have Nt/Win2k/Xp then the best thing you can do is set it to the recommended level, then setup PerforMance Monitor to watch the Peak Pagefile usage. Then use your system as normal, push it as hard as you ever would. Check the peak usage and then set your PageFile max to about 100 mb beyond this.
    Should do the trick.


  • Registered Users, Registered Users 2 Posts: 11,446 ✭✭✭✭amp


    I use a seperate 8 gig hdd for my swap file, temporary files and for photoshops scratch file. It makes me happy.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 20,099 ✭✭✭✭WhiteWashMan


    i have a 1.5 gig swap file spread over 4 drives.
    maybe i will look into this


Advertisement