LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   question about RAM (https://www.linuxquestions.org/questions/linux-newbie-8/question-about-ram-342577/)

mikeyflynn 07-12-2005 04:26 PM

question about RAM
 
i have read that linux uses ram differently, and that i need to create a swap partition.
what i'm wondering is, what gets saved in ram and what gets saved in the swap?
i know from windows that the swap partition saves files, does ram do this to? and how long will it stay in ram? if i load something into ram, will it be there if i reboot my pc? sorry if this is a simple question, i'm just trying to understand the difference and how big i should make the swap partition. i have 256mb of ram.

thanks

mikey

ctkroeker 07-12-2005 04:34 PM

Welcome to LQ!
Swap is just to keep programs running if you phisical ram is all used up. If you have 256MB ram and are going to use a windo manager like KDE, than make a 500MB SWAP partition. Should be good enough.

Nathanael 07-12-2005 04:39 PM

ram does not keep any data when you reboot your pc.
swap however is a partition on your hdd. when you open files, write to them, data is saved to the swap drive - when your computer should crash, you can open the file you have been edition, and you should get promtet saying that there is a swap file for the file you ware wanting to edit... the computer asks you what to do: ignore, use swap file, etc...
also - if you have too little ram linux will use your swap partition/drive instead... which obviously is slower than ram.

Michael Johnson 07-12-2005 07:40 PM

The swap parttition is simply an extension of you RAM. It is a temporary strorage space where data from your RAM is saved so that that the RAM can be reused by another application that requires it. When the data is needed it is copied from the swap partitiom back to your RAM.


All times are GMT -5. The time now is 10:33 AM.