Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: redirect cache to SSD swap

  1. #11
    Join Date
    Dec 2009
    Ubuntu 12.04 Precise Pangolin

    Re: redirect cache to SSD swap

    Quote Originally Posted by dcstar View Post
    Why do people continually believe that they can manage system resources better than people who been specialising in this area for decades?

    The "cache" exists to utilise RAM that would otherwise be wasted doing nothing by speculatively retaining disk sectors *in case* they might be needed again, as other more important system components require RAM it is reallocated and disk data that may have been cached has to be transferred directly from the (slower) disk storage.

    It is pointless - and basically stupid - to dump cached disk blocks that may never be used to swap (or anywhere). Swap exists to store data that *must* exist in VM and is deemed more efficient to be in that location rather than main RAM.
    the enhancement is "must exist" that's true. data goes to swap if the system need i to put it there.
    just a little example: you read/write a very huge file (it does't matter how memory you got - just read/write a bigger file) then the cache is filled up with may be never used
    data. why not flush the cache from time to time ( i know the system will do it too) before the system starts swaping with althoug usless data ?
    "What is the robbing of a bank compared to the FOUNDING of a bank?" Berthold Brecht

  2. #12
    Join Date
    Apr 2008
    Ubuntu Development Release

    Re: redirect cache to SSD swap

    Quote Originally Posted by smo0th View Post
    hi Cheesemill, sorry I didn'tmake clear enough, by cache I mean the memory portion allocated in RAM which is just that, if you use htop, there are 3 colors for the RAM, green is the one used by processes, blue is the one used for buffers and yellow is the one for cache, I have noticed that when the green and blue grow, the yellow just dissapears not being allocated in swap, this is why I would like to send all the cache to swap, as far as I know swap is a copy of what runs in the RAM, so eventually the cache being used would be transfered to RAM and run from there, read/write access time is far faster in a SSD than in a spinning mechanism, so I think that could help somehow in the overall performance
    You've got to take a step back and think about what's being cached. The only things that are cached are recently used program files and documents. If you have your root and home directories on the SSD anyway like you should if you are using one then you would gain no performance benefits from offloading your cache to the SSD as this is where the documents/programs already live, you'd just have 2 copies of exactly the same data on the SSD.

    While we are talking about cache, one way that you can get a perceived performance increase from your system is to use preload. Preload keeps track of your most used programs and documents and preloads them into the cache when the system is booted. This way when you use a program for the first time it is already loaded into memory so it will start a lot quicker.

Page 2 of 2 FirstFirst 12

Tags for this Thread


Posting Permissions

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