Page 1 of 3 123 LastLast
Results 1 to 15 of 33
  1. #1
    Join Date
    Dec 2009
    Posts
    24

    Unanswered: DB2 Memory Problems

    We recently migrated to DB2 v9.5 Express-C on Windows XP machine. We are running Apache and 99% of our traffic is through HTTP. We are getting about 180,000 transactions per day.

    We started out with most of the defaults for the database configurations. Every 3 days or so, we would get an application heap error or a statement heap error or some kind of memory error. Everything I read would just say to increase this heap size or that heap size. I have done that several times. Last week, we got an error "Private memory and/or virtual address space exhausted". With what I read, I doubled our page file from 4GB to 8GB. This change made us run all week last week without a problem. Over the weekend, during an online backup, I started getting the same kind of errors again.

    Out of memory failure for Backup/Restore/Util Heap (UTIL_HEAP_SZ).
    Requested block size : 16785407 bytes.
    Physical heap size : 50724864 bytes.
    Configured heap size : 190316544 bytes.
    Unreserved memory used by heap : 0 bytes.
    Unreserved memory left in set : 129236992 bytes.

    This seemed to start the problem again because I started getting errors like the private memory exhausted error and these:

    Out of memory failure for Statement Heap.
    Requested block size : 40780 bytes.
    Physical heap size : 70844416 bytes.
    Configured heap size : 491520000 bytes.
    Unreserved memory used by heap : 0 bytes.
    Unreserved memory left in set : 0 bytes.

    Out of memory failure for Statement Heap.
    Requested block size : 40780 bytes.
    Physical heap size : 71303168 bytes.
    Configured heap size : 491520000 bytes.
    Unreserved memory used by heap : 0 bytes.
    Unreserved memory left in set : 0 bytes.

    I am running out of ideas and need some help. I am not liking the idea of just increasing this heap size or that. I am actually thinking that I may have some of the values too high already, which part of me thinks might be some of the problem.

    Anything would be much appreciated and sorry if I didn't include something that was needed.

    Thanks
    Brandon

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    What is your DBM and DB configuration?

    Andy

  3. #3
    Join Date
    Dec 2009
    Posts
    24
    I attached both of them.

    Thanks for the response and I appreciate the help.

    -Brandon
    Attached Files Attached Files

  4. #4
    Join Date
    Dec 2009
    Posts
    24
    I also get this error everytime I start db2 which is strange because that is set to automatic:

    Reserved heap size exceeded for Database Monitor Heap (MON_HEAP_SZ),
    allocating additional unreserved memory.
    Requested block size : 8388624 bytes.
    Physical heap size : 8519680 bytes.
    Configured heap size : 327680 bytes.
    Unreserved memory used by heap : 8192000 bytes.
    Unreserved memory left in set : 5636096 bytes.

  5. #5
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Is this a 32 bit or 64 bit machine? How much memory? What is the size of your bufferpools?

    Andy

  6. #6
    Join Date
    Dec 2009
    Posts
    24
    32 bit machine with 4GB memory. I am a DB2 newbie so forgive me for my ignorance, but I am not sure how to find out. I looked in the Control Center under the database (we are only running one on this machine) and under the Buffer Pools folder, I only show 1, the IBMDEFAULTBP with a size of -2. I don't understand the -2. Under the alter table page, it shows page size 4, size in 4KB pages 250, Non-blocked 250, Blocked 0, Block size in pages 32, Enable self tuning is checked, use default bp size is NOT checked, and alter bp immediately is selected.

    I hope this is the information that you are looking for.

    Thanks
    Brandon

  7. #7
    Join Date
    Oct 2009
    Location
    Calgary, AB Canada
    Posts
    38
    so.... you are only using the default bufferpool? you haven't created any others?

  8. #8
    Join Date
    Dec 2009
    Posts
    24
    I haven't no. Is that a big time no-no? I was told to keep the system simple until I have a reason not.

  9. #9
    Join Date
    Oct 2009
    Location
    Calgary, AB Canada
    Posts
    38
    ok....

    let's go back to: what are you using this minimalistic database for? personal/business? heavy on the transactions? reporting?

    IBM by default create the IBMDEFAULTBP so it can operate itself as well as give a buffer. What are the sizes of your tablespaces? I figure they are 4K tablespaces, cause you can only create tablespaces with corresponding bufferpool sizes. Wait, are you only using the USERSPACE1 tablespace?

    I guess the first question is, what are you trying to achieve with your database?

  10. #10
    Join Date
    Dec 2009
    Posts
    24
    I have created a tablespace and it is 4K, but I do only have 1.

    This is a business database which is fairly heavy on transactions (I think). It sits behind a website, so most of the transactions are coming through apache. We average somewhere around 180,000 per day, which of course has a much higher percentage between 8 and 4. I think peak times, we have somewhere in the neighborhood of 7-8 transactions per second.

    We had a guy before that made alot of things very complicated. I was told to upgrade from version 7 something to v9.5 so that we could move to a newer OS. I was told they thought we could run with 1 tablespace, instead of the many we had before and we would adjust that if we found out that was wrong. I took the same approach (kind of) with the bufferpools. Again, I am not a DB2 person (although I am trying to learn) and very new to databases in general, so please forgive me if what I have/am doing is completely wrong.

    Thanks
    Brandon

  11. #11
    Join Date
    Dec 2009
    Posts
    24
    I also forgot to mention that before I migrated to the new version in production, I set the machine up and drove alot of traffic to it. I never ran into these problems and the database was handling around 25 transactions per second with no problems. After passing that test several times and since it was about 3.5 times the traffic that we actually get, I thought that was sufficient and moved it into production. However, I never ran the test for 4 or 5 days. That makes me think there is some kind of memory leaking or failure to deallocate and over time is causing a problem. Maybe I am wrong, just my thoughts....

    Thanks for all your help with this. It is driving me crazy....

  12. #12
    Join Date
    Oct 2009
    Location
    Calgary, AB Canada
    Posts
    38
    what did you migrate from? What type of HW? How many tablespaces/bufferpools did you have?

    What else is running on the machine besides DB2? Is it a dedicated database server?

  13. #13
    Join Date
    Dec 2009
    Posts
    24
    We migrated from an NT machine to windows XP. We were running 7.5 and migrated up to 9.5. I created scripts to export the data and import because DB2 won't do that for you. Since I had to create the database and do a bunch of imports, we decided to make these other changes with the tables spaces and bufferpools. With the performance that we were getting, we didn't think we needed to do anything else. We had 7 tablespaces and I think 7 bufferpools. This is a dedicated database server. Apache is the only thing running on this machine.

    Thanks
    Brandon

  14. #14
    Join Date
    Oct 2009
    Location
    Calgary, AB Canada
    Posts
    38
    so it's your database server AND webserver? is this a true stmt?

  15. #15
    Join Date
    Dec 2009
    Posts
    24
    Yeah, I think we have a little bit of a unique setup. We do mostly all of our database activity through HTTP. We have other webservers that do all of the work, but when we need a database transaction, the webserver will send a request through HTTP to our database machine telling it what function to perform. So, I am not sure how you would classify that. The only HTTP traffic that goes to that machine is the database requests from our other webservers. It isn't even open to the outside world.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •