Increased Swap usage by IDS
Posted in 2012
Topics: General Discussion
I am using Informix 11.7 and I had to increase the DB Size. But on increasing
the Db Space, I can see swap memory being used on my system (in my environment
DB shares memory with many other applications). Earlier there was no limiti on
SHMTOTAL but I changed it to 1 GB. But still memory consumption seems to be
quite high.
Looks like no Virtual segment is being added.
cucdb onstat -g seg
Segment Summary:
id key addr size ovhd class blkused blkfree
4063244 52604801 44010000 328232960 2146492 R* 80133 2
4390934 5260480b 57917000 268435456 1574024 V 25298 40238
Total: - - 596668416 - - 105431 40240
Snapshot of memory monitoring through "top" can be seen below:
TOP Output
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
9097 informix 5 -10 594m 306m 305m S 1.3 3.8 4:47.27 unityoninit
9104 informix 5 -10 594m 235m 234m S 8.0 3.0 14:43.94 unityoninit
9105 informix 5 -10 594m 198m 196m S 0.0 2.5 1:20.48 unityoninit
9101 root 5 -10 592m 117m 115m D 0.3 1.5 1:32.43 unityoninit
9118 root 5 -10 592m 115m 114m S 0.0 1.4 0:57.19 unityoninit
9119 root 5 -10 592m 111m 110m S 0.0 1.4 0:41.59 unityoninit
9120 root 5 -10 592m 111m 110m S 0.0 1.4 0:14.50 unityoninit
9121 root 5 -10 592m 108m 107m S 0.0 1.4 0:01.25 unityoninit
9122 root 5 -10 592m 91m 90m S 0.0 1.1 0:00.31 unityoninit
9131 root 5 -10 592m 70m 69m S 0.0 0.9 0:00.23 unityoninit
9132 root 5 -10 592m 44m 43m S 0.0 0.6 0:00.13 unityoninit
The sum of RES column in TOP for various instances of informix is 1506 MB.
Limiting SHMTOTAL seems to have no impact. Is my observation for memory usage
correct. Also, how to limit swap usage.
Don't use top to see memory utilization by Informix, look at onstat - or the
Total line of onstat -g seg. Your Informix engine has only allocated about 569
MB.
Each of those oninit processes in top are attaching to the same shared memory
segments and that is why top gives the impression that Informix has allocated
more than you think it should.
It looks like you are forcing the Resident segment in memory (R* in the onstat
-g seg output) you can also lock the Virtual segments in memory by changing
the RESIDENT ONCONFIG parameter if you think swapping out of Informix shared
memory is causing you problems.
As for why you are seeing swapping, it doesn't look like Informix has
allocated any additional segments since start up so either you don't have
enough memory to allow Informix to have 569 MB and play nice with the other
apps on your box or other applications are eating more memory than they should
and that is causing the swapping.
Try looking at top and sort by memory utilization (option M) to find what
other apps are using.
Here is what my onstat -, onstat -g seg and top sorted by memory look like for
an engine with about 3.6 GB allocated:
IBM Informix Dynamic Server Version 11.70.FC4GE -- On-Line (Prim) -- Up 6 days
07:21:40 -- 3641436 Kbytes
Segment Summary:
id key addr size ovhd class blkused blkfree
9371648 52564801 44000000 2655014912 31547024 R* 648195 2
9437186 52564803 e2405000 1073741824 12584664 V* 37091 225053
9469955 52564804 122405000 73728 1992 M 17 1
Total: - - 3728830464 - - 685303 225056
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
18883 informix 6 -10 3675m 2.7g 2.7g S 13.6 69.9 798:13.69 oninit
18916 informix 5 -10 3675m 2.7g 2.7g S 16.6 68.9 1269:14 oninit
18920 informix 5 -10 3676m 2.7g 2.6g S 14.3 68.7 677:50.63 oninit
18921 informix 5 -10 3675m 2.6g 2.6g S 10.3 68.5 369:03.99 oninit
18904 root 0 -19 3675m 48m 45m S 0.0 1.2 1:08.44 oninit
19261 nscd 15 0 450m 35m 924 S 0.0 0.9 1259:08 nscd
18923 root 5 -10 3673m 18m 16m S 3.7 0.5 124:35.24 oninit
18908 root 5 -10 3673m 10m 8396 S 0.0 0.3 0:00.77 oninit
18922 root 0 -19 3675m 10m 8048 S 0.0 0.3 0:00.40 oninit
994 arbitrat 15 0 679m 10m 3768 S 1.7 0.3 1:59.65 kpython
998 arbitrat 15 0 679m 10m 3760 S 1.0 0.3 0:48.24 kpython
996 arbitrat 15 0 679m 9.9m 3760 S 1.0 0.3 0:37.63 kpython
It is highly unlikely you are swapping - probably just pre-allocation
What does vmstat show in the de and sr columns ?
Cheers
Paul
Paul Watson
Oninit www.oninit.com
+1 913 387 7529
On Oct 30, 2012, at 9:42, "ANDREW FORD" <aford@networkip.net> wrote:
> Don't use top to see memory utilization by Informix, look at onstat - or t=
he=20
> Total line of onstat -g seg. Your Informix engine has only allocated about=
569=20
> MB.=20
>=20
> Each of those oninit processes in top are attaching to the same shared mem=
ory=20
> segments and that is why top gives the impression that Informix has alloca=
ted=20
> more than you think it should.=20
>=20
> It looks like you are forcing the Resident segment in memory (R* in the on=
stat=20
> -g seg output) you can also lock the Virtual segments in memory by changin=
g=20
> the RESIDENT ONCONFIG parameter if you think swapping out of Informix shar=
ed=20
> memory is causing you problems.=20
>=20
> As for why you are seeing swapping, it doesn't look like Informix has=20
> allocated any additional segments since start up so either you don't have=20=
> enough memory to allow Informix to have 569 MB and play nice with the othe=
r=20
> apps on your box or other applications are eating more memory than they sh=
ould=20
> and that is causing the swapping.=20
>=20
> Try looking at top and sort by memory utilization (option M) to find what=20=
> other apps are using.=20
>=20
> Here is what my onstat -, onstat -g seg and top sorted by memory look like=
for=20
> an engine with about 3.6 GB allocated:=20
>=20
> IBM Informix Dynamic Server Version 11.70.FC4GE -- On-Line (Prim) -- Up 6 d=
ays=20
> 07:21:40 -- 3641436 Kbytes=20
>=20
> Segment Summary:=20> id key addr size ovhd class blkused blkfree=20
> 9371648 52564801 44000000 2655014912 31547024 R* 648195 2=20
> 9437186 52564803 e2405000 1073741824 12584664 V* 37091 225053=20
> 9469955 52564804 122405000 73728 1992 M 17 1=20
> Total: - - 3728830464 - - 685303 225056=20
>=20
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND=20
> 18883 informix 6 -10 3675m 2.7g 2.7g S 13.6 69.9 798:13.69 oninit=20
> 18916 informix 5 -10 3675m 2.7g 2.7g S 16.6 68.9 1269:14 oninit=20
> 18920 informix 5 -10 3676m 2.7g 2.6g S 14.3 68.7 677:50.63 oninit=20
> 18921 informix 5 -10 3675m 2.6g 2.6g S 10.3 68.5 369:03.99 oninit=20
> 18904 root 0 -19 3675m 48m 45m S 0.0 1.2 1:08.44 oninit=20
> 19261 nscd 15 0 450m 35m 924 S 0.0 0.9 1259:08 nscd=20
> 18923 root 5 -10 3673m 18m 16m S 3.7 0.5 124:35.24 oninit=20
> 18908 root 5 -10 3673m 10m 8396 S 0.0 0.3 0:00.77 oninit=20
> 18922 root 0 -19 3675m 10m 8048 S 0.0 0.3 0:00.40 oninit=20
> 994 arbitrat 15 0 679m 10m 3768 S 1.7 0.3 1:59.65 kpython=20
> 998 arbitrat 15 0 679m 10m 3760 S 1.0 0.3 0:48.24 kpython=20
> 996 arbitrat 15 0 679m 9.9m 3760 S 1.0 0.3 0:37.63 kpython=20
>=20
>=20
> **************************************************************************=
*****=20
> Forum Note: Use "Reply" to post a response in the discussion forum.=20
How much physical memory do uou have on the box?
Art
On Oct 30, 2012 9:42 AM, "GURPREET SACHDEVA" <gusachde@cisco.com> wrote:
> I am using Informix 11.7 and I had to increase the DB Size. But on
> increasing
> the Db Space, I can see swap memory being used on my system (in my
> environment
> DB shares memory with many other applications). Earlier there was no
> limiti on
> SHMTOTAL but I changed it to 1 GB. But still memory consumption seems to be
> quite high.
>
> Looks like no Virtual segment is being added.
>
> cucdb onstat -g seg
> Segment Summary:
> id key addr size ovhd class blkused blkfree
> 4063244 52604801 44010000 328232960 2146492 R* 80133 2
> 4390934 5260480b 57917000 268435456 1574024 V 25298 40238
> Total: - - 596668416 - - 105431 40240
>
> Snapshot of memory monitoring through "top" can be seen below:
>
> TOP Output
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
>
> 9097 informix 5 -10 594m 306m 305m S 1.3 3.8 4:47.27 unityoninit
> 9104 informix 5 -10 594m 235m 234m S 8.0 3.0 14:43.94 unityoninit
> 9105 informix 5 -10 594m 198m 196m S 0.0 2.5 1:20.48 unityoninit
> 9101 root 5 -10 592m 117m 115m D 0.3 1.5 1:32.43 unityoninit
> 9118 root 5 -10 592m 115m 114m S 0.0 1.4 0:57.19 unityoninit
> 9119 root 5 -10 592m 111m 110m S 0.0 1.4 0:41.59 unityoninit
> 9120 root 5 -10 592m 111m 110m S 0.0 1.4 0:14.50 unityoninit
> 9121 root 5 -10 592m 108m 107m S 0.0 1.4 0:01.25 unityoninit
> 9122 root 5 -10 592m 91m 90m S 0.0 1.1 0:00.31 unityoninit
> 9131 root 5 -10 592m 70m 69m S 0.0 0.9 0:00.23 unityoninit
> 9132 root 5 -10 592m 44m 43m S 0.0 0.6 0:00.13 unityoninit
>
> The sum of RES column in TOP for various instances of informix is 1506 MB.
>
> Limiting SHMTOTAL seems to have no impact. Is my observation for memory
> usage
> correct. Also, how to limit swap usage.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--14dae93404b933160004cd4c18b7
Related threads
- Posting from the Informix-list
- Migrating from IDS 9.40.UC6 to 11.50.UC3
- Ip for a network session
- questions onstat -g