After running update statistics for tables in a database, we run
update statistics for procedure to update the SP's, using the
following:
set isolation to dirty read;
set pdqpriority 0;
update statistics for procedure;
commit;
There are about 400 SP's and some are complex calling other SP's.
This uses a lot of Virtual shared memory and will add shared memory
segments which are freed after this process runs.
Why does running update stats on SP's use so much V memory?
What can be done to keep this from using so much memory?
Machine and Version info:
Linux version 2.6.9-42.ELlargesmp (bhcompile@ls20-
bc1-13.build.redhat.com) (gcc version 3.4.6 20060404 (Red Hat
3.4.6-2))
SHMVIRTSIZE 12582912
onstat -g seg before running update stats.
IBM Informix Dynamic Server Version 11.10.FC2 -- On-Line -- Up 56 days
16:41:22 -- 56058360 Kbytes
Segment Summary:
id key addr size ovhd class
blkused blkfree
8093696 525d4801 44000000 44518858752 522136952 R*
10868859 3
8126465 525d4802 aa187e000 12884901888 150996880 V
386888 2758840
Total: - - 57403760640 - -
11255747 2758843
(* segment locked in memory)
While update stats for procedures is running:
01:00:17 Dynamically allocated new virtual shared memory segment
(size 2097152KB)
01:00:17 Memory sizes:resident:43475448 KB, virtual:14680064 KB,
SHMTOTAL:62914560 KB
01:00:21 Dynamically allocated new virtual shared memory segment
(size 2097152KB)
01:00:21 Memory sizes:resident:43475448 KB, virtual:16777216 KB,
SHMTOTAL:62914560 KB
01:00:25 Dynamically allocated new virtual shared memory segment
(size 2097152KB)
01:00:25 Memory sizes:resident:43475448 KB, virtual:18874368 KB,
SHMTOTAL:62914560 KB
01:00:29 Size of resident + virtual segments 43475448KB + 20971520KB
> 62914560KB
01:00:29 total allowed by configuration parameter SHMTOTAL
SHMTOTAL is capped at 62914560
Only env change during the update stats run is:
export DBUPSPACE=0:50:1
export PSORT_NPROCS=20
Thanks
>> Stay informed about: Update Stats for procedure uses too much Virt memory.