How to configure disk cache, swap size


Results 1 to 8 of 8

Thread: How to configure disk cache, swap size

  1. #1
    Join Date
    May 2002
    Location
    cambridge
    Posts
    11

    How to configure disk cache, swap size

    I am trying to configure the swap size and disk cache in suse 8.0. My windows set up allows me to do this painlessly, I have made my disk cache size 40meg and I have 256MB memory and find that the swap file is never used and my system runs like lightning. I would apreciate some help in how to do this in suse 8.0 KDE. thanks..

  2. #2
    Join Date
    Oct 2001
    Location
    UK
    Posts
    436
    I'm a bit hazy on the details so maybe someone else can provide more detail but windows and linux are very different animals.

    Windows likes to use a swap file but there is no such thing on Linux. There are swap partitions where the os will swap info out to if it wants to (see this using the command free) but it prefers to use RAM so if there is enough it won't swap out at all. To change the swap partition will obviously mean altering the partitions on your drive.

    The Debian site has some very good docs on setting up partitions. www.debian.org.
    http://www.debian.org/
    Why pirate software when Linux is so cheap?

  3. #3
    Join Date
    May 2002
    Location
    cambridge
    Posts
    11
    thanks for your reply, I`ll give it a look. i`m more interested though in altering the disk cache size. it seems my system is eating a huge amount of ram for this...and its slowing my system down....good news though...i installed the new nvidia drivers for my ageing tnt2 and now it has 3d capability...excellent..the rpm`s where a breeze to install...thanks

  4. #4
    Join Date
    Jul 2000
    Location
    Recycle Bin
    Posts
    2,923
    Actually there are swap files in Linux too. I have a 256MB swap file I created like thus:

    dd if=/dev/zero of=/boot/.swap bs=1024 count=245000
    NOTE the above command can take a while to complete, so be patient.
    mkswap /boot/.swap
    swapon /boot/.swap
    Then edit /etc/fstab and change swap like this
    /boot/.swap swap swap defaults 0 0

    Thats about it.
    For more details:
    man swapon
    man mkswap

  5. #5
    Join Date
    May 2002
    Location
    cambridge
    Posts
    11
    thanks a lot for the reply..what about the disk cache..i think this is where my problem lies...thanks again

  6. #6
    Join Date
    Dec 1999
    Location
    Toronto
    Posts
    39,329
    The disk cache should actually speed up your system.

    The portion of the cache is released whenever a application needs the memory for itself.

    I'm not sure on this, but you might have to change some of the kernel source parms and recompile the kernel to change the disk cache allocation.
    SEARCH FIRST... ASK SECOND Read the JL 'Community Help Posting Guidelines' before posting in the forums.

    Precompiled Redhat NTFS Modules

    Linuxplanet Tutorials

    If Linux doesn't have the solution, you have the wrong problem. ... Please do not send me a PM asking for help...

    Please read the search suggestion thread in JL Ideas

  7. #7
    Join Date
    May 2002
    Location
    cambridge
    Posts
    11
    i dont think i`m quite up to that job just yet..i didnt know if there was a program to do this just like cache man in windows or something like that...thanks again i think i can live with it until i gain more knowledge

  8. #8
    Join Date
    Dec 1999
    Location
    Toronto
    Posts
    39,329
    Originally posted by fiery_pheonix:
    <STRONG>i dont think i`m quite up to that job just yet..i didnt know if there was a program to do this just like cache man in windows or something like that...thanks again i think i can live with it until i gain more knowledge</STRONG>
    Don't feel too bad. I wouldn't know how to do that myself either.

    I just have a feeling it's not a easy task to do.
    SEARCH FIRST... ASK SECOND Read the JL 'Community Help Posting Guidelines' before posting in the forums.

    Precompiled Redhat NTFS Modules

    Linuxplanet Tutorials

    If Linux doesn't have the solution, you have the wrong problem. ... Please do not send me a PM asking for help...

    Please read the search suggestion thread in JL Ideas

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •