1752795 Members
6556 Online
108789 Solutions
New Discussion юеВ

Re: swap question

 
SOLVED
Go to solution
Charles McCary
Valued Contributor

swap question

here's the scenario:

swapinfo -tam output:

Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 1095 3001 27% 0 - 1 /dev/vg00/lvol2
reserve - 2956 -2956
memory 13022 3227 9795 25%
total 17118 7278 9840 43% - 0 -



vmstat output:
procs memory page faults cpu
r b w avm free re at pi po fr de sr in sy cs us sy id
13 5 0 1130397 2284830 562 62 1 0 0 0 3 5418 173582 12292 41 7 51
10 8 0 1149598 2285932 51 0 0 0 0 0 0 3585 390161 3213 87 6 7
10 8 0 1149598 2285516 24 0 0 0 0 0 0 3735 432918 3062 86 6 8
12 4 0 1155218 2285292 23 2 0 0 0 0 0 3812 456118 3378 87 6 7
12 4 0 1155218 2285324 7 0 0 0 0 0 0 3869 439131 3724 86 6 8
16 1 0 1146302 2284600 1103 65 4 0 0 0 0 3422 393123 3312 85 8 7
16 1 0 1146302 2282482 5291 321 2 0 0 0 0 3193 447069 5864 83 16 1
12 5 0 1128475 2281964 3338 258 1 0 0 0 0 3445 428474 6239 88 11 2
12 5 0 1128475 2280748 1094 83 0 0 0 0 0 3676 389635 4207 90 5 5
8 9 0 1122988 2280748 453 25 1 0 0 0 0 3980 447643 3933 89 7 5


Notice, no pageouts in vmstat output.


Question: since the device swap is being utilized, would I increase performance by adding more, or would performance only increase if we were nearly maxing out device swap and then I added more?

I think the only real way to increase perf on this machine may be to add memory.

I appreciate your thoughts.

6 REPLIES 6
Steven E. Protter
Exalted Contributor
Solution

Re: swap question

Shalom,

Swap is reserved when a process starts. It is allocated, set aside. That explains the swapinfo figures.

The fact vmstat is showing no paging means you are in the gold land of sysadmin fun.

You are not actually swapping processes to disk, your system is not under memory pressure. All good. Reward yourself with a good pat on the back or coffee or whatever floats your boat.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Charles McCary
Valued Contributor

Re: swap question

Thanks for the info!

Patrick Wallek
Honored Contributor

Re: swap question

I've got to disagree with Steven here.

The fact that you have 27% of your device swap used could mean that you were under memory pressure at some point.

That you have no po's now is good, but it is possible that you did have some at some point in the past.

Adding swap will likely not improve performance.

I would CLOSELY monitor this server. With some device swap being used I would start considering RAM upgrades.
Charles McCary
Valued Contributor

Re: swap question

Patrick, that was more along my line of thinking....
Charles McCary
Valued Contributor

Re: swap question

more information from glance/export....still don't see any paging out over the last 5 days, but I'm suspicious of this report working correctly...




Pg Req Page Memory Active Pg Out Page Swap
Date Time Rate Reqs Swap VM % Rate Out Out Rt
2/5/2009 0:00 557 2002341 0 84.21 0 0 0
2/5/2009 1:00 477.5 1715507 0 88.66 0 0 0
2/5/2009 2:00 831.5 2987459 0 86.2 0 0 0
2/5/2009 3:00 545.6 1959678 0 87.48 0 0 0
2/5/2009 4:00 982.4 3529844 0 85.17 0 0 0
2/5/2009 5:00 989 3555466 0 84.47 0 0 0
2/5/2009 6:00 933 3352149 0 83.84 0 0 0
2/5/2009 7:00 997.5 3584060 0 86.23 0 0 0
2/5/2009 8:00 1041 3741286 0 84.25 0 0 0
2/5/2009 9:00 995.1 3575376 0 83.67 0 0 0
2/5/2009 10:00 1044.6 3754201 0 81.25 0 0 0
2/5/2009 11:00 994 3575466 0 81.38 0 0 0
2/5/2009 12:00 1059.6 3808115 0 80.62 0 0 0
2/5/2009 13:00 1015.6 3650172 0 80.95 0 0 0
2/5/2009 14:00 1046.4 3761788 0 79.87 0 0 0
2/5/2009 15:00 1105.9 3974533 0 80.65 0 0 0
2/5/2009 16:00 997.1 3585739 0 83.4 0 0 0
2/5/2009 17:00 714.8 2569150 0 83.09 0 0 0
2/5/2009 18:00 761.4 2737312 0 89.71 0 0 0
2/5/2009 19:00 740 2659595 0 92.57 0 0 0
2/5/2009 20:00 752.4 2703409 0 82.52 0 0 0
2/5/2009 21:00 708.5 2547039 0 79.4 0 0 0
2/5/2009 22:00 716 2572424 0 81.03 0 0 0
2/5/2009 23:00 971.1 3491103 0 83.73 0 0 0
2/6/2009 0:00 556.7 2000120 0 83.58 0 0 0
2/6/2009 1:00 492.6 1770304 0 88.33 0 0 0
2/6/2009 2:00 507.5 1822983 0 88.82 0 0 0
2/6/2009 3:00 559.8 2012033 0 89.55 0 0 0
2/6/2009 4:00 912.8 3281637 0 89.45 0 0 0
2/6/2009 5:00 1130.4 4062572 0 87.15 0 0 0
2/6/2009 6:00 992.9 3568320 0 85.96 0 0 0
2/6/2009 7:00 959.8 3450567 0 85.09 0 0 0
2/6/2009 8:00 1036.4 3724683 0 84.92 0 0 0
2/6/2009 9:00 1025.4 3686146 0 83.33 0 0 0
2/6/2009 10:00 1055.3 3792766 0 82.25 0 0 0
2/6/2009 11:00 1057.3 3800913 0 81.42 0 0 0
2/6/2009 12:00 984.1 3535027 0 80.28 0 0 0
2/6/2009 13:00 1077.3 3870839 0 79.05 0 0 0
2/6/2009 14:00 1011.7 3634856 0 80.02 0 0 0
2/6/2009 15:00 1002.8 3605085 0 81.6 0 0 0
2/6/2009 16:00 1033.9 3715779 0 81.4 0 0 0
2/6/2009 17:00 732 2630874 0 80.58 0 0 0
2/6/2009 18:00 801.3 2880721 0 88.71 0 0 0
2/6/2009 19:00 738.1 2654191 0 92.23 0 0 0
2/6/2009 20:00 749.8 2695633 0 82.34 0 0 0
2/6/2009 21:00 725.3 2606720 0 81.03 0 0 0
2/6/2009 22:00 731.3 2627728 0 82.31 0 0 0
2/6/2009 23:00 959 3447777 0 82.79 0 0 0
2/7/2009 0:00 660.5 2373176 0 83.19 0 0 0
2/7/2009 1:00 485.8 1745322 0 88.89 0 0 0
2/7/2009 2:00 834 2997435 0 87.99 0 0 0
2/7/2009 3:00 561.3 2017214 0 88.7 0 0 0
2/7/2009 4:00 906.8 3258873 0 87.89 0 0 0
2/7/2009 5:00 1025.7 3687549 0 86.64 0 0 0
2/7/2009 6:00 961.4 3455361 0 85.85 0 0 0
2/7/2009 7:00 957.6 3441740 0 85.55 0 0 0
2/7/2009 8:00 999.1 3589759 0 84.28 0 0 0
2/7/2009 9:00 1036.9 3728714 0 84.03 0 0 0
2/7/2009 10:00 1040.9 3739838 0 83.83 0 0 0
2/7/2009 11:00 1100.9 3956569 0 83.28 0 0 0
2/7/2009 12:00 1064.7 3826481 0 84.32 0 0 0
2/7/2009 13:00 1055.4 3793102 0 84.19 0 0 0
2/7/2009 14:00 1034.8 3720211 0 81.99 0 0 0
2/7/2009 15:00 1042.9 3747029 0 81.84 0 0 0
2/7/2009 16:00 1090.5 3921522 0 81.67 0 0 0
2/7/2009 17:00 679.7 2443541 0 81.33 0 0 0
2/7/2009 18:00 739.6 2660469 0 90.36 0 0 0
2/7/2009 19:00 715.2 2569630 0 93.57 0 0 0
2/7/2009 20:00 759.3 2727269 0 84.84 0 0 0
2/7/2009 21:00 750.3 2695807 0 83 0 0 0
2/7/2009 22:00 742.8 2669788 0 82.97 0 0 0
2/7/2009 23:00 1043.3 3749621 0 83.95 0 0 0
2/8/2009 0:00 596.2 2143452 0 85.42 0 0 0
2/8/2009 1:00 486.1 1747855 0 88.54 0 0 0
2/8/2009 2:00 852 3061282 0 87.46 0 0 0
2/8/2009 3:00 575.4 2067884 0 85.4 0 0 0
2/8/2009 4:00 945.4 3396855 0 86.18 0 0 0
2/8/2009 5:00 996.9 3583861 0 86.01 0 0 0
2/8/2009 6:00 886.2 3184267 0 85.55 0 0 0
2/8/2009 7:00 947.9 3406855 0 84.01 0 0 0
2/8/2009 8:00 1016.5 3654337 0 81.67 0 0 0
2/8/2009 9:00 1015.3 3649904 0 80.95 0 0 0
2/8/2009 10:00 1053 3785525 0 82.4 0 0 0
2/8/2009 11:00 1628.1 5853056 0 83.12 0 0 0
2/8/2009 12:00 1051.4 3779696 0 82.55 0 0 0
2/8/2009 13:00 1044.3 3752040 0 82.87 0 0 0
2/8/2009 14:00 1047.4 3766268 0 82.37 0 0 0
2/8/2009 15:00 1050.2 3775478 0 82.42 0 0 0
2/8/2009 16:00 1039.7 3737663 0 82.72 0 0 0
2/8/2009 17:00 677.4 2433358 0 81.97 0 0 0
2/8/2009 18:00 762.1 2739827 0 91.3 0 0 0
2/8/2009 19:00 734.9 2640547 0 90.58 0 0 0
2/8/2009 20:00 745.2 2679840 0 82.57 0 0 0
2/8/2009 21:00 728.7 2618871 0 81.86 0 0 0
2/8/2009 22:00 736.3 2645592 0 82.07 0 0 0
2/8/2009 23:00 1038 3731512 0 82.51 0 0 0
2/9/2009 0:00 553.1 1987126 0 83.02 0 0 0
2/9/2009 1:00 493.6 1774590 0 85.26 0 0 0
2/9/2009 2:00 898.3 3228499 0 81.8 0 0 0
2/9/2009 3:00 567 2038464 0 83.55 0 0 0
2/9/2009 4:00 951.6 3420937 0 85.23 0 0 0
2/9/2009 5:00 999.8 3593379 0 84.57 0 0 0
2/9/2009 6:00 988.1 3550370 0 83.03 0 0 0
2/9/2009 7:00 964.3 3466500 0 83.06 0 0 0
2/9/2009 8:00 989.7 3554855 0 82.56 0 0 0
2/9/2009 9:00 2002.8 7202229 0 80.23 0 0 0
2/9/2009 10:00 969.4 3484139 0 80.66 0 0 0
2/9/2009 11:00 1101.2 3956439 0 79.13 0 0 0
2/9/2009 12:00 1054.8 3792163 0 79.74 0 0 0
2/9/2009 13:00 1032.2 3709643 0 80.66 0 0 0
2/9/2009 14:00 1068.7 3839677 0 79.16 0 0 0
2/9/2009 15:00 1077.7 3872274 0 79.22 0 0 0
2/9/2009 16:00 1072.9 3856912 0 79.86 0 0 0
2/9/2009 17:00 728.1 2616218 0 80.54 0 0 0
2/9/2009 18:00 765.5 2752614 0 87.64 0 0 0
2/9/2009 19:00 742.9 2670628 0 91.89 0 0 0
2/9/2009 20:00 747.5 2685587 0 82.81 0 0 0
2/9/2009 21:00 721.9 2595271 0 80.6 0 0 0
2/9/2009 22:00 731.7 2630554 0 81.79 0 0 0
2/9/2009 23:00 1012.5 3638948 0 82.25 0 0 0
2/10/2009 0:00 643.8 2314439 0 83.18 0 0 0
2/10/2009 1:00 521.5 1873318 0 87.3 0 0 0
2/10/2009 2:00 852.4 3062720 0 83.23 0 0 0
2/10/2009 3:00 559.3 2009516 0 84.13 0 0 0
2/10/2009 4:00 655.8 2356845 0 83.82 0 0 0
2/10/2009 5:00 663.8 2386325 0 84.12 0 0 0
2/10/2009 6:00 603.8 2169412 0 84.85 0 0 0
2/10/2009 7:00 668.7 2403878 0 84.67 0 0 0
2/10/2009 8:00 722.8 2597168 0 84.64 0 0 0
2/10/2009 9:00 700.3 2516835 0 87.76 0 0 0
2/10/2009 10:00 658.8 2367726 0 90.25 0 0 0
2/10/2009 11:00 746.8 2683902 0 82.85 0 0 0
2/10/2009 12:00 696.8 2505014 0 83.13 0 0 0
2/10/2009 13:00 946.4 3401371 0 84.24 0 0 0
Steven E. Protter
Exalted Contributor

Re: swap question

Upon further reflection, I agree with Patrick.

The system may at some point since last reboot been under memory pressure.

The fact that its not paging now is a good sign.

Look for memory leaks:
http://www.hpux.ws/?p=8

Take a longer, broader look at overall performance.

I suspect a database with a large SGA(memory area) or a batch job was pressuring the system.

If there is a performance problem, it is almost never helped by adding swap. Adding memory is the way to deal with memory pressure, or reducing demand for memory. Decreasing SGA, reserved memory areas and such.

SEP
http://www.hpux.ws/?p=6

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com