Jump to content

SWAP Memory


ramiz0

Recommended Posts

What is SWAP memory?Rainmeter is showing it in a gadget (SWAP:2.0GB/Used 360MB)

Link to comment
Share on other sites


  • Replies 2
  • Views 1.4k
  • Created
  • Last Reply

Swap Memory (Paging or Virtual Memory) is a space in the Hard Disk of your computer that Operating Systems will use to put the info that is actually on the RAM to free it for another application.

This should be done when the system needs memory for a new process and there is none, so we can see that if our system has plenty of RAM it will maybe need no SWAP memory.

or

To replace pages or segments of data in memory. Swapping is a useful technique that enables a computer to execute programs and manipulate data files larger than main memory. The operating system copies as much data as possible into main memory, and leaves the rest on the disk. When the operating system needs data from the disk, it exchanges a portion of data (called a page or segment ) in main memory with a portion of data on the disk.

DOS does not perform swapping, but most other operating systems, including OS/2, Windows, and UNIX, do.

(1) Windows example

Virtual memory has been a feature of Microsoft Windows since Windows 3.1 in 1991. 386SPART.PAR (or WIN386.SWP on Windows 3.11 and Windows for Workgroups) is a hidden file created by Windows 3.x for use as a virtual memory swap file. It is generally found in the root directory, but it may appear elsewhere (typically in the WINDOWS directory). Its size depends on how much virtual memory the system has set up under Control Panel - Enhanced under "Virtual Memory." If a user moves or deletes this file, Windows will BSoD (Blue Screen of Death) the next time it is started with "The permanent swap file is corrupt" and will ask the user if they want to delete the file (It asks whether or not the file exists).

Windows 95 uses a similar file, except it is named WIN386.SWP, and the controls for it are located under Control Panel - System - Performance tab - Virtual Memory. Windows automatically sets the page file to be 1.5 x physical memory. This page file is located at C:\\pagefile.sys on all NT - based versions of Windows (including Windows 2000 and Windows XP). If you run memory intensive applications on a low physical memory system it is preferable to manually set the size to a value higher than default. Additionally, fixing the size of the swap file will prevent it from being dynamically resized by Windows. This resizing causes the swap file to become fragmented, resulting in reduced performance. This page file cannot be defragmented with Windows' built-in defragmenting tools, such as ntfsdefrag.

(2) Virtual Memory in Linux

In Linux operating system, it is possible to use a whole partition of the HDD for virtual memory. Though it is still possible to use a file for swapping, it is recommended to use a separate partition, because this excludes chances of fragmentation, which reduces the performance of swapping. A swap area is created using the command mkswap filename/device , and may be turned on and off using the commands swapon and swapoff, respectively, accompanied by the name of the swap file or the swap partition.

In order to additionally increase performance of swapping, it is advisable to put the swap partition at the beginning of the HDD, because the transfer speed there is somewhat higher than at the end of the disk.

There were also some successful attempts to use the memory located on the videocard for swapping, as modern videocards often have 128 or even 256 megabytes of RAM.

Link to comment
Share on other sites


Thank you rajesh for information

Link to comment
Share on other sites


Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...