moplisan 发表于 2009-10-20 10:51

虚拟内存问题

小弟在导数据时,发现log中的记录
10:38:50Maximum server connections 2
10:38:50Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked 0, Plog used 15, Llog used 1

10:38:50Dynamically allocated new virtual shared memory segment (size 8192KB)
10:38:50Memory sizes:resident:5312 KB, virtual:720512 KB, no SHMTOTAL limit
10:39:42Dynamically allocated new virtual shared memory segment (size 8192KB)
10:39:42Memory sizes:resident:5312 KB, virtual:728704 KB, no SHMTOTAL limit
10:40:34Dynamically allocated new virtual shared memory segment (size 8192KB)
10:40:34Memory sizes:resident:5312 KB, virtual:736896 KB, no SHMTOTAL limit
10:41:27Dynamically allocated new virtual shared memory segment (size 8192KB)
10:41:27Memory sizes:resident:5312 KB, virtual:745088 KB, no SHMTOTAL limit
10:42:20Dynamically allocated new virtual shared memory segment (size 8192KB)
10:42:20Memory sizes:resident:5312 KB, virtual:753280 KB, no SHMTOTAL limit
10:43:13Dynamically allocated new virtual shared memory segment (size 8192KB)
10:43:13Memory sizes:resident:5312 KB, virtual:761472 KB, no SHMTOTAL limit
10:43:50Checkpoint Completed:duration was 0 seconds.
10:43:50Tue Oct 20 - loguniq 59, logpos 0xb9203c, timestamp: 0x3933eea Interval: 338

10:43:50Maximum server connections 2
10:43:50Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked 0, Plog used 15, Llog used 1

10:44:05Dynamically allocated new virtual shared memory segment (size 8192KB)
虚拟内存一直增长,
onconfig中的配置如下
# System Configuration

SERVERNUM        0        # Unique id corresponding to a server instance
DBSERVERNAME        searchpatent                # Name of default Dynamic Server
DBSERVERALIASES                        # List of alternate dbservernames
NETTYPE                onsoctcp,1,,NET        # Override sqlhosts nettype parameters
DEADLOCK_TIMEOUT        60        # Max time to wait of lock in distributed env.
RESIDENT        0                # Forced residency flag (Yes = 1, No = 0)

MULTIPROCESSOR0               # 0 for single-processor, 1 for multi-processor
NUMCPUVPS        1                # Number of user (cpu) vps
SINGLE_CPU_VP   0               # If non-zero, limit number of cpu vps to one

NOAGE                0                # Process aging
AFF_SPROC        0                # Affinity start processor
AFF_NPROCS        0                # Affinity number of processors

# Shared Memory Parameters

LOCKS                2000                # Maximum number of locks
NUMAIOVPS                          # Number of IO vps
PHYSBUFF        32                # Physical log buffer size (Kbytes)
LOGBUFF                32                # Logical log buffer size (Kbytes)
CLEANERS      1               # Number of buffer cleaner processes
SHMBASE         0xc000000L        # Shared memory base address
SHMVIRTSIZE        16000                # initial virtual shared memory segment size
SHMADD          8192            # Size of new shared memory segments (Kbytes)
EXTSHMADD       8192        # Size of new extension shared memory segments (Kbytes)
SHMTOTAL      0               # Total shared memory (Kbytes). 0=>unlimited
CKPTINTVL       300             # Check point interval (in sec)
TXTIMEOUT        300                # Transaction timeout (in sec)
STACKSIZE        64                # Stack size (Kbytes)

虚拟内存一直长的话,最终数据库down掉,有什么解决方法么,请教各位高人

liaosnet 发表于 2009-10-20 12:11

SHMVIRTSIZE      SHMADD
两个参数过小...在业务复杂操作需要大量内存时,会不断申请内存,即数据库向系统申请内存段..

informix在有的系统中若虚拟段过多,可能导致数据库挂掉...

解决方法:
1.增大这两个参数的值..
2.将复杂的操作分割成较小的事务,多次提交..

[ 本帖最后由 liaosnet 于 2009-10-20 12:21 编辑 ]
页: [1]
查看完整版本: 虚拟内存问题