Sponsored Content
Top Forums UNIX for Advanced & Expert Users Please advise good source of info about swapping Post 302614935 by sant on Thursday 29th of March 2012 05:55:00 AM
Old 03-29-2012
Guys, thanks for your valuable comments.

Could you please also comment:
1) If soft does NOT feet all available RAM - should swap be free or not?
As I understood - not, because it should solve memory defragmentation?
Is it right?

2) If you see that your host has 64Gb of RAM, has 32 Gb of allocated swap (full available swap is 64Gb for example) - is it problem?

3) vmstat shows pi po - does it indicate a problem?

4) How to determine that host is having problem with the swap?

---------- Post updated at 04:28 AM ---------- Previous update was at 04:16 AM ----------

May I ask about the windows. I know that this forum is about unix, but the question is related with the conversation about swap concept.

I am seing in task manager physical memory 2Gb, available 200K. Page file usage 2,35Gb and this is the line not changed in the time on the chart in task manager.
Why swap usage is 2,35Gb. Is it allocated_but_not_used size?

---------- Post updated at 04:55 AM ---------- Previous update was at 04:28 AM ----------

an example (vmstat Solaris 10):
Code:
 kthr      memory                       page               disk          faults      cpu
 r b w   swap      free      re   mf  pi po fr de sr m0 m1 m3 m4   in   sy      cs   us sy id
 0 5 0 124949008 30882168   1830 11959 0 2  2 0  0  0  0  0  0   51824 522265 65491 31 12 56
 0 3 0 124837640 30861096   1755 8975  0 1  1 0  0  0  0  0  0   47055 499749 56455 33 14 53
 0 3 0 124908888 30861088   1770 10615 6 1  1 0  0  0  0  0  0   47026 487126 57109 37 15 48
 0 2 0 124908920 30847944   1698 9732  0 3  2 0  0  0  0  0  0   45622 497099 56097 34 11 55
 0 2 0 124942672 30873432   1909 11107 0 1  1 0  0  0  0  0  0   43191 504910 50763 34 12 55
 0 2 0 124918896 30856128   1518 8609  0 1  1 0  0  0  0  0  0   46034 516341 55213 34 11 56
 0 4 0 124871216 30823384   1661 9245  0 0  0 0  0  0  0  0  0   47537 531603 57644 35 12 53
 0 5 0 124867672 30831888   1678 10591 2 2  2 0  0  0  0  0  0   43464 530756 52283 33 13 54

Why swap != 0 ? And why swap is changed in time when free memory 30Gb ?

Last edited by sant; 03-29-2012 at 07:18 AM..
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to get swapping info

Hi How can I determine if swapping is occuring on a server. Thanks, Leo (2 Replies)
Discussion started by: leo
2 Replies

2. AIX

Good source of AIX Specific Scripting?

Hi everyone, I need to write some AIX scripts (ksh?), kind of fast so I'm looking for somewhere to get a crash course in it. Are there any AIX Specific Scripting resource sites that anyone can recommend, really not getting a whole lot from google. Thanks in advance, Darren (3 Replies)
Discussion started by: dbridle
3 Replies

3. SuSE

Swapping

Hello! Why does my SuSE GNU/Linux machine swap? I have a Gig of ram, currently 14MBs of free RAM, 724MB - buffers and caches... That is 685MB of cached RAM, then kernel really should'nt have to swap, It should release cached memory in my thinkin... It has only swaped 3MB's but still,... (3 Replies)
Discussion started by: Esaia
3 Replies

4. UNIX for Advanced & Expert Users

source reader info

Hi friends, I urgently need to know if there is any tool called source reader in C or Unix or Linux...... If so ..plz let me know the details.I am running out of time..... (0 Replies)
Discussion started by: vijaya2006
0 Replies

5. UNIX for Dummies Questions & Answers

Good source of X11 programming info?

Is there a good book or something on practical programming in X11? I have the O'Reilly X window system book set. They don't seem to cover the nuances very well (at least for me). So far the only thing I find on the web is the text from these books. Specifically, I'm looking for optimization... (2 Replies)
Discussion started by: willil
2 Replies

6. Solaris

Secondary group info source

Experts, I know when I use id it shows only the primary group information for the given user, and that info comes from passwd file. When I use groups it shows all groups user are member of, however from where come information given by groups command? grep fmtt3990 /etc/passwd... (6 Replies)
Discussion started by: fmattos
6 Replies

7. Solaris

Swapping

Hi Guys I am using SPARC-T4 (chipid 0, clock 2998 MHz), SunOS 5.10 Generic_150400-38 sun4v. How do I see if the server was doing some swapping like yesterday? I had a java application error with java.lang.OutOfMemoryError, now I want to check if the server was not doing some swapping at... (4 Replies)
Discussion started by: Phuti
4 Replies
swap(1M)                                                  System Administration Commands                                                  swap(1M)

NAME
swap - swap administrative interface SYNOPSIS
/usr/sbin/swap -a swapname [swaplow] [swaplen] /usr/sbin/swap -d swapname [swaplow] /usr/sbin/swap -l /usr/sbin/swap -s DESCRIPTION
The swap utility provides a method of adding, deleting, and monitoring the system swap areas used by the memory manager. OPTIONS
The following options are supported: -a swapname Add the specified swap area. This option can only be used by the super-user. swapname is the name of the swap file: for example, /dev/dsk/c0t0d0s1 or a regular file. swaplow is the offset in 512-byte blocks into the file where the swap area should begin. swaplen is the desired length of the swap area in 512-byte blocks. The value of swaplen can not be less than 16. For example, if n blocks are specified, then (n-1) blocks would be the actual swap length. swaplen must be at least one page in length. The size of a page of memory can be determined by using the pagesize command. See pagesize(1). Since the first page of a swap file is automatically skipped, and a swap file needs to be at least one page in length, the minimum size should be a multiple of 2 pagesize bytes. The size of a page of memory is machine dependent. swaplow + swaplen must be less than or equal to the size of the swap file. If swaplen is not specified, an area will be added starting at swaplow and extending to the end of the designated file. If neither swaplow nor swaplen are specified, the whole file will be used except for the first page. Swap areas are normally added automatically during system startup by the /sbin/swapadd script. This script adds all swap areas which have been specified in the /etc/vfstab file; for the syntax of these specifications, see vfstab(4). To use an NFS or local file-system swapname, you should first create a file using mkfile(1M). A local file-system swap file can now be added to the running system by just running the swap -a command. For NFS mounted swap files, the server needs to export the file. Do this by performing the following steps: 1. Add the following line to /etc/dfs/dfstab: share -F nfs -o rw=clientname,root=clientname path-to-swap-file 2. Run shareall(1M). 3. Have the client add the following line to /etc/vfstab: server:path-to-swap-file - local-path-to-swap-filenfs --- local-path-to-swap-file -- swap --- 4. Have the client run mount: # mount local-path-to-swap-file 5. The client can then run swap -a to add the swap space: # swap -a local-path-to-swap-file -d swapname Delete the specified swap area. This option can only be used by the super-user. swapname is the name of the swap file: for example, /dev/dsk/c0t0d0s1 or a regular file. swaplow is the offset in 512-byte blocks into the swap area to be deleted. If swaplow is not specified, the area will be deleted starting at the second page. When the command completes, swap blocks can no longer be allocated from this area and all swap blocks previously in use in this swap area have been moved to other swap areas. -l List the status of all the swap areas. The output has five columns: path The path name for the swap area. dev The major/minor device number in decimal if it is a block special device; zeroes otherwise. swaplo The swaplow value for the area in 512-byte blocks. blocks The swaplen value for the area in 512-byte blocks. free The number of 512-byte blocks in this area that are not currently allocated. The list does not include swap space in the form of physical memory because this space is not associated with a particular swap area. If swap -l is run while swapname is in the process of being deleted (by swap -d), the string INDEL will appear in a sixth column of the swap stats. -s Print summary information about total swap space usage and availability: allocated The total amount of swap space in bytes currently allocated for use as backing store. reserved The total amount of swap space in bytes not currently allocated, but claimed by memory mappings for possi- ble future use. used The total amount of swap space in bytes that is either allocated or reserved. available The total swap space in bytes that is currently available for future reservation and allocation. These numbers include swap space from all configured swap areas as listed by the -l option, as well swap space in the form of physical memory. USAGE
On the 32-bit operating system, only the first 2 Gbytes -1 are used for swap devices greater than or equal to 2 Gbytes in size. On the 64-bit operating system, a block device larger than 2 Gbytes can be fully utilized for swap up to 2**63 -1 bytes. ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of swap: LC_CTYPE and LC_MESSAGE. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
pagesize(1), mkfile(1M), shareall(1M), getpagesize(3C), vfstab(4), attributes(5), largefile(5) WARNINGS
No check is done to determine if a swap area being added overlaps with an existing file system. SunOS 5.10 20 Jan 2004 swap(1M)
All times are GMT -4. The time now is 10:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy