![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||||
| |||||
|
|
Running db2mtrk -d -v shows a total of 16819027968 bytes used for the database. |
|
However, our SysAdmin claims that DB2 can only be using approx. 2.8 GB of memory because the output from the free command below shows there is only 2931148 KB of memory used. |
|
$ free -k total used free shared buffers cached Mem: 32956200 32796116 160084 0 435508 29429460 -/+ buffers/cache: 2931148 30025052 Swap: 8385920 1600 8384320 |
|
Can anyone explain the difference between DB2 and the OS reported memory usage figures? |
|
When a DB2 database is activated are all the bufferpools fully allocated? |
#3
| |||||
| |||||
|
|
Running db2mtrk -d -v shows a total of 16819027968 bytes used for the database. |
|
However, our SysAdmin claims that DB2 can only be using approx. 2.8 GB of memory because the output from the free command below shows there is only 2931148 KB of memory used. |
|
$ free -k total used free shared buffers cached Mem: 32956200 32796116 160084 0 435508 29429460 -/+ buffers/cache: 2931148 30025052 Swap: 8385920 1600 8384320 |
|
Can anyone explain the difference between DB2 and the OS reported memory usage figures? |
|
When a DB2 database is activated are all the bufferpools fully allocated? |
#4
| |||
| |||
|
|
Hi, Running db2mtrk -d -v shows a total of 16819027968 bytes used for the database. Then 16GB are used by DB2. However, our SysAdmin claims that DB2 can only be using approx. 2.8 GB of memory because the output from the free command below shows there is only 2931148 KB of memory used. Wrong, the value you are talking about are buffers/cache, not physical memory. $ free -k * * * * * * *total * * * used * * * free * * shared * *buffers cached Mem: * * *32956200 * 32796116 * * 160084 * * * * *0 * * 435508 29429460 -/+ buffers/cache: * *2931148 * 30025052 Swap: * * *8385920 * * * 1600 * *8384320 Almost all physical memory is used. You are using 32796116k out of 32956200k. This does not really mean anything, since Linux tends to report memory as used, even if the memory is inactive or used as filesystem cache. In caseof shortage this memory should be freed in favour of runing processes. What is more reason for being concerned is the fact that 1600k of swap is used. Can you explain to me why swap space is used despite of only 16GB used by DB2? What else is running on this box? Can anyone explain the difference between DB2 and the OS reported memory usage figures? I think I just did. :-) When a DB2 database is activated are all the bufferpools fully allocated? Yes, as soon as you activate the database (or at the first connect, if not activated), all bufferpools are fully allocated. There are aso other memory areas which are allocated, but not in full, which means those areas are allocated in several steps. There is a start value, which is allocated at first and the memory can grow up to the max value specified. With regards to the bufferpools, they are allocated at once. -- Helmut K. C. Tessarek DB2 Performance and Development IBM Toronto Lab |
#5
| |||
| |||
|
|
What is more reason for being concerned is the fact that 1600k of swap is used. Can you explain to me why swap space is used despite of only 16GB used by DB2? What else is running on this box? - Helmut K. C. Tessarek DB2 Performance and Development IBM Toronto Lab |
#6
| |||
| |||
|
|
"Helmut Tessarek" <tessa... (AT) evermeet (DOT) cx> wrote in message news:ikqbfu$9sj$1 (AT) news (DOT) albasani.net... What is more reason for being concerned is the fact that 1600k of swap is used. Can you explain to me why swap space is used despite of only 16GB used by DB2? What else is running on this box? - Helmut K. C. Tessarek DB2 Performance and Development IBM Toronto Lab This is (unfortunately) typical on our many DB2 Linux systems (swap space is being used even when DB2 and other usage is way below total memory). I would really appreciate if IBM would figure this out and let us know ALL the Linux and DB2 config settings for a DB2 server so this does not happen (if you can do it). If you need more info, let me know. |
#7
| |||
| |||
|
|
This is (unfortunately) typical on our many DB2 Linux systems (swap space is being used even when DB2 and other usage is way below total memory). I would really appreciate if IBM would figure this out and let us know ALL the Linux and DB2 config settings for a DB2 server so this does not happen (if you can do it). |
#8
| |||
| |||
|
|
Do you have proof that DB2 is using the swap space? I really doubt that DB2 is using more memory than set as upper limit. If you do have proof that this is the case, it is most likely a defect and I suggest to open a PMR. -- Helmut K. C. Tessarek DB2 Performance and Development IBM Toronto Lab |
#9
| |||
| |||
|
|
Ever tried to play around with the "swappiness" kernel parameter? I don't know the numbers you're having, but in this case I wouldn't bother, unless there's constant swapping occurring. If this 1600K was never really used, why not put it on disk and use the memory (the whole 1.6M!) for something more useful. No-one ever complains about DB2 removing inactive pages from memory... -- Frederik Engelen |
#10
| |||
| |||
|
|
"Frederik Engelen" <engelenfrede... (AT) gmail (DOT) com> wrote in message news:f8bd330b-0193-45a8-8c84-bb53242e9b38 (AT) v31g2000vbs (DOT) googlegroups.com... Ever tried to play around with the "swappiness" kernel parameter? I don't know the numbers you're having, but in this case I wouldn't bother, unless there's constant swapping occurring. If this 1600K was never really used, why not put it on disk and use the memory (the whole 1.6M!) for something more useful. No-one ever complains about DB2 removing inactive pages from memory... -- Frederik Engelen Already made these changes long ago (not documented in DB2 manuals, but found it in some DB2 Redbooks): swappiness: 0 dirty_ratio: 10 dirty_background_ratio: 5 I don't understand your comment about putting it on disk. |
![]() |
| Thread Tools | |
| Display Modes | |
| |