If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 + Swap Memory Usage.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-12-11, 21:51
dyer dyer is offline
Registered User
 
Join Date: Jun 2011
Posts: 6
Question DB2 + Swap Memory Usage.

Hey Guys,

Sorry new to this forum and new to DB2/Lunux so please bare with me.

I have a server that consists of 2 instances, One has 8 databases and One has 2 databases.

I have STMM set to on for everything and wondering what i have configured wrong or what i can do to make sure db2 stops getting killed by the OS for using all the swap.

Im Running DB2 9.7.2 on RHEL 6

free shows :
total used free shared buffers cached
Mem: 5142160 5099108 43052 0 12604 968012
-/+ buffers/cache: 4118492 1023668
Swap: 779880 779864 16

db2pd -dbptnmem shows:
Instance 1
Memory Limit: 4164804 KB
Current usage: 2806336 KB
HWM usage: 2808576 KB
Cached memory: 1498624 KB

Instance 3
Memory Limit: 4164804 KB
Current usage: 780032 KB
HWM usage: 785152 KB
Cached memory: 398528 KB

One thing i have found through searching is that my tablespaces are created with:
FILE SYSTEM CACHING;

Could this be the issue, or is there something else i need to look at?

These are all pretty small databases on the guest mostly containing work tables for software.

Any help would be fantastic.

Thanks in Advance.
Reply With Quote
  #2 (permalink)  
Old 06-12-11, 22:02
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
I would upgrade to FP4, and turn file system caching off except for SMS temporary tablespaces. But in general, DB2 seems to have memory problems with Linux, at least more than on AIX.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 06-12-11, 22:08
dyer dyer is offline
Registered User
 
Join Date: Jun 2011
Posts: 6
On Further investigation i have found that these particular processes are using alot of virtual memory.

Google is not being that helpful.

top - 14:03:31 up 3 days, 2:10, 2 users, load average: 0.33, 0.51, 0.44
Tasks: 119 total, 2 running, 117 sleeping, 0 stopped, 0 zombie
Cpu : 3.7%us, 3.3%sy, 0.0%ni, 90.0%id, 1.0%wa, 0.0%hi, 0.3%si, 1.7%st
Mem: 5142160k total, 5094752k used, 47408k free, 5368k buffers
Swap: 779880k total, 779856k used, 24k free, 940676k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2161 root 15 0 1800m 1.2g 9232 S 0.0 23.8 1:56.19 db2syscr
2162 root 15 0 1799m 1.2g 9232 S 0.0 23.8 1:55.88 db2syscr
2163 root 15 0 1800m 1.2g 9232 S 0.0 23.7 1:56.04 db2syscr

Thanks in advance
Reply With Quote
  #4 (permalink)  
Old 06-13-11, 07:49
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Set INSTANCE_MEMORY for both instances such that together they amount to 75% of the server physical memory (provided that nothing else is running on the server). Set each database memory to AUTOMATIC.
Reply With Quote
  #5 (permalink)  
Old 06-13-11, 19:10
dyer dyer is offline
Registered User
 
Join Date: Jun 2011
Posts: 6
Thanks Guys,

Ill try both of the above.
Reply With Quote
Reply

Tags
db2, memory, swap

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On