Re: Does a DD-Statement "waste memory" after dealloc?
Michael, Have you tried taking an in-flight dump (z/OS command : DUMP COMM=('foo') ) of the address space and then running IPCS against it to see where the storage is being used (VERBX VSMDATA and RSMDATA would be good place to start). Rob Scott Developer Rocket Software 275 Grove Street * Newton, MA 02466-2272 * USA Tel: +1.617.614.2305 Email: rsc...@rs.com Web: www.rocketsoftware.com -Original Message- From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of Michael Knigge Sent: 09 October 2009 09:34 To: IBM-MAIN@bama.ua.edu Subject: Does a DD-Statement "waste memory" after dealloc? All, I currently try to find a obscure memory leak in one of our applications. After some days our appl occupies ~17.000 pages of real memory (needs just ~1.500 after startup). As we track all malloc(), calloc(), realloc() and free() function calls, I can say that there is no obvious memory leak Now... after I've looked at the JESYSMSG I've noticed that we've done approx 17.000 DYNALLOCs, everyone with a different DD-Name (we let the z/OS generate a unique one, like "SYS1", "SYS2", "SYS3" and so on). to be clear: *NOT* ~17.000 at the same time. mostly only one at the same time... Of couse, we deallocate them after we've finished using the DD-Name, but I wonder that even after a DEALLOC (with SVC99) there is some space still occupied Why? Because of performance? Because of some kind of control block that can only grow but not shrink? Thanks, Michael -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Does a DD-Statement "waste memory" after dealloc?
Have you tried taking an in-flight dump (z/OS command : DUMP COMM=('foo') ) of the address space and then running IPCS against it to see where the storage is being used (VERBX VSMDATA and RSMDATA would be good place to start). I've never used IPCS :-( But I'm afraid in this case I have to use it. Bye, Michael -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Does a DD-Statement "waste memory" after dealloc?
If you are leaking in the C program (I am assuming it is LE) then you might see just some large chunks allocated to the heap (subpool 2 maybenot sure). If that is the case then maybe the VERBX LEDATA IPCS command will help (IIRC you will have to provide the TCB address). Disclaimer : I am a complete noob as far as C is concerned. If you have a more "traditonal sytle" leak - then this might be evident in the other (non-heap) subpools and VSMLIST will show you some clues. Rob Scott Developer Rocket Software 275 Grove Street * Newton, MA 02466-2272 * USA Tel: +1.617.614.2305 Email: rsc...@rs.com Web: www.rocketsoftware.com -Original Message- From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of Michael Knigge Sent: 09 October 2009 13:11 To: IBM-MAIN@bama.ua.edu Subject: Re: Does a DD-Statement "waste memory" after dealloc? > Have you tried taking an in-flight dump (z/OS command : DUMP COMM=('foo') ) > of the address space and then running IPCS against it to see where the > storage is being used (VERBX VSMDATA and RSMDATA would be good place to > start). I've never used IPCS :-( But I'm afraid in this case I have to use it. Bye, Michael -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Does a DD-Statement "waste memory" after dealloc?
Hi We are also around dynalloc from C/C++, but You are saying 17000 pages , but the used storage also high ? (RPTSTG(ON)) So is it a reall a memory leak (HEAPC(ON,0,0,20)) or just a high real storage usage ? The LE runtime HEAPOOL(ALIGN) can make big differences . Michael Knigge wrote: All, I currently try to find a obscure memory leak in one of our applications. After some days our appl occupies ~17.000 pages of real memory (needs just ~1.500 after startup). As we track all malloc(), calloc(), realloc() and free() function calls, I can say that there is no obvious memory leak Now... after I've looked at the JESYSMSG I've noticed that we've done approx 17.000 DYNALLOCs, everyone with a different DD-Name (we let the z/OS generate a unique one, like "SYS1", "SYS2", "SYS3" and so on). to be clear: *NOT* ~17.000 at the same time. mostly only one at the same time... Of couse, we deallocate them after we've finished using the DD-Name, but I wonder that even after a DEALLOC (with SVC99) there is some space still occupied Why? Because of performance? Because of some kind of control block that can only grow but not shrink? Thanks, Michael -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- Miklos Szigetvari Development Team ISIS Information Systems Gmbh tel: (+43) 2236 27551 570 Fax: (+43) 2236 21081 E-mail: miklos.szigetv...@isis-papyrus.com Info: i...@isis-papyrus.com Hotline: +43-2236-27551-111 Visit our Website: http://www.isis-papyrus.com --- This e-mail is only intended for the recipient and not legally binding. Unauthorised use, publication, reproduction or disclosure of the content of this e-mail is not permitted. This email has been checked for known viruses, but ISIS accepts no responsibility for malicious or inappropriate content. --- -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Does a DD-Statement "waste memory" after dealloc?
We are also around dynalloc from C/C++, but You are saying 17000 pages , but the used storage also high ? (RPTSTG(ON)) So is it a reall a memory leak (HEAPC(ON,0,0,20)) or just a high real storage usage ? The LE runtime HEAPOOL(ALIGN) can make big differences . I'll give this a try MK -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Does a DD-Statement "waste memory" after dealloc?
On 9 Oct 2009 01:35:23 -0700, in bit.listserv.ibm-main you wrote: >All, > > >I currently try to find a obscure memory leak in one of our >applications. After some days our appl occupies ~17.000 pages of real >memory (needs just ~1.500 after startup). > >As we track all malloc(), calloc(), realloc() and free() function calls, >I can say that there is no obvious memory leak > >Now... after I've looked at the JESYSMSG I've noticed that we've done >approx 17.000 DYNALLOCs, everyone with a different DD-Name (we let the >z/OS generate a unique one, like "SYS1", "SYS2", "SYS3" and >so on). to be clear: *NOT* ~17.000 at the same time. mostly only one >at the same time... If these are for QSAM data sets, does the C program do a FREEPOOL (free the buffer pool) on CLOSE. For reasons I don't understand, apparently CLOSE does not automatically free the buffers. I think the COBOL implementors were smart enough to understand this and did the FREEPOOL. Others who understand more about this can clarify what I have said. > >Of couse, we deallocate them after we've finished using the DD-Name, but >I wonder that even after a DEALLOC (with SVC99) there is some space >still occupied > >Why? Because of performance? Because of some kind of control block that >can only grow but not shrink? > > >Thanks, >Michael > >-- >For IBM-MAIN subscribe / signoff / archive access instructions, >send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO >Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Does a DD-Statement "waste memory" after dealloc?
Clark Morris wrote: On 9 Oct 2009 01:35:23 -0700, in bit.listserv.ibm-main you wrote: If these are for QSAM data sets, does the C program do a FREEPOOL (free the buffer pool) on CLOSE. For reasons I don't understand, apparently CLOSE does not automatically free the buffers. I think the COBOL implementors were smart enough to understand this and did the FREEPOOL. Others who understand more about this can clarify what I have said. As I remember things, and it has been a while, the FREEPOOL is not automatically done because it is expensive to get rid of the buffer pool if you are just closing the file to reopen it because then you have to just get the buffers all over. Clsoing and reopening used to be a common way to get back to the beginning of the file. Lloyd -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Does a DD-Statement "waste memory" after dealloc?
>As I remember things, and it has been a while, the FREEPOOL is not automatically done because it is expensive to get rid of the buffer pool if you are just closing the file to reopen it because then you have to just get the buffers all over. These days, it's not that expensive. >Clsoing and reopening used to be a common way to get back to the beginning of the file. Doesn't the verb REWIND exist any more? - Too busy driving to stop for gas! -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Does a DD-Statement "waste memory" after dealloc?
This may be SMF keeping the "pieces" it needs to build the SMF records at task termination. A key symptom would be a long shutdown time for the task and an apparent CPU loop in the task after a "xxx is shutting down" message. If this is the case, reference the DDCONS parameter of SMFPRMxx. What is the working set for the application? Unless you have done some things unlikely to have been done for a "application program", I can almost guarantee the working set is not 17,000 pages. HTH, I currently try to find a obscure memory leak in one of our applications. After some days our appl occupies ~17.000 pages of real memory (needs just ~1.500 after startup). As we track all malloc(), calloc(), realloc() and free() function calls, I can say that there is no obvious memory leak Now... after I've looked at the JESYSMSG I've noticed that we've done approx 17.000 DYNALLOCs, everyone with a different DD-Name (we let the z/OS generate a unique one, like "SYS1", "SYS2", "SYS3" and so on). to be clear: *NOT* ~17.000 at the same time. mostly only one at the same time... -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Does a DD-Statement "waste memory" after dealloc?
You can force DYNALLOC to allocate the DSN to a given DDNAME. This would allow you to reuse the same DDNAME (or a handful of DD names used in a round-robin fashion) and greatly reduce shutdown time and reduce the working set size... see the DALDDNAM keyword in the doc. Don't know how you do this from C but it must be possible. Eric Spencer Neon Enterprise Software LLC -Original Message- From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of Staller, Allan Sent: Tuesday, October 13, 2009 8:28 AM To: IBM-MAIN@bama.ua.edu Subject: Re: Does a DD-Statement "waste memory" after dealloc? This may be SMF keeping the "pieces" it needs to build the SMF records at task termination. A key symptom would be a long shutdown time for the task and an apparent CPU loop in the task after a "xxx is shutting down" message. If this is the case, reference the DDCONS parameter of SMFPRMxx. What is the working set for the application? Unless you have done some things unlikely to have been done for a "application program", I can almost guarantee the working set is not 17,000 pages. HTH, I currently try to find a obscure memory leak in one of our applications. After some days our appl occupies ~17.000 pages of real memory (needs just ~1.500 after startup). As we track all malloc(), calloc(), realloc() and free() function calls, I can say that there is no obvious memory leak Now... after I've looked at the JESYSMSG I've noticed that we've done approx 17.000 DYNALLOCs, everyone with a different DD-Name (we let the z/OS generate a unique one, like "SYS1", "SYS2", "SYS3" and so on). to be clear: *NOT* ~17.000 at the same time. mostly only one at the same time... -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Does a DD-Statement "waste memory" after dealloc?
It can be done from C by building your own text units and issuing the svc99() function call. I'm pretty sure that the svc99() function allows access to pretty much all svc99() features. -sam On Tue, Oct 13, 2009 at 3:38 PM, Eric Spencer wrote: > You can force DYNALLOC to allocate the DSN to a given DDNAME. This would > allow you to reuse the same DDNAME (or a handful of DD names used in a > round-robin fashion) and greatly reduce shutdown time and reduce the > working set size... see the DALDDNAM keyword in the doc. Don't know how > you do this from C but it must be possible. > > Eric Spencer > Neon Enterprise Software LLC > > > -Original Message- > From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On > Behalf Of Staller, Allan > Sent: Tuesday, October 13, 2009 8:28 AM > To: IBM-MAIN@bama.ua.edu > Subject: Re: Does a DD-Statement "waste memory" after dealloc? > > This may be SMF keeping the "pieces" it needs to build the SMF records > at task termination. > > A key symptom would be a long shutdown time for the task and an apparent > CPU loop in the task after a "xxx is shutting down" message. > > If this is the case, reference the DDCONS parameter of SMFPRMxx. > > What is the working set for the application? Unless you have done some > things unlikely to have been done for a "application program", I can > almost guarantee the working set is not 17,000 pages. > > HTH, > > > > I currently try to find a obscure memory leak in one of our > applications. After some days our appl occupies ~17.000 pages of real > memory (needs just ~1.500 after startup). > > As we track all malloc(), calloc(), realloc() and free() function calls, > > I can say that there is no obvious memory leak > > Now... after I've looked at the JESYSMSG I've noticed that we've done > approx 17.000 DYNALLOCs, everyone with a different DD-Name (we let the > z/OS generate a unique one, like "SYS1", "SYS2", "SYS3" and > so on). to be clear: *NOT* ~17.000 at the same time. mostly only one > > at the same time... > > > -- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO > Search the archives at http://bama.ua.edu/archives/ibm-main.html > > -- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO > Search the archives at http://bama.ua.edu/archives/ibm-main.html > -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Does a DD-Statement "waste memory" after dealloc?
-Original Message- From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of Michael Knigge Sent: Friday, October 09, 2009 3:34 AM To: IBM-MAIN@bama.ua.edu Subject: Does a DD-Statement "waste memory" after dealloc? All, I currently try to find a obscure memory leak in one of our applications. After some days our appl occupies ~17.000 pages of real memory (needs just ~1.500 after startup). As we track all malloc(), calloc(), realloc() and free() function calls, I can say that there is no obvious memory leak Now... after I've looked at the JESYSMSG I've noticed that we've done approx 17.000 DYNALLOCs, everyone with a different DD-Name (we let the z/OS generate a unique one, like "SYS1", "SYS2", "SYS3" and so on). to be clear: *NOT* ~17.000 at the same time. mostly only one at the same time... Of couse, we deallocate them after we've finished using the DD-Name, but I wonder that even after a DEALLOC (with SVC99) there is some space still occupied Why? Because of performance? Because of some kind of control block that can only grow but not shrink? We have found two things in this area. Both are involved in LSQA. One has to do with ACEE (and associated storage) and the other is the dynamic allocation. We also used DYNAMNBR on EXEC statements (see JCL REF). You may find that this alleviates some of the storage creep. Regards, Steve Thompson -- Opinions expressed by this poster may not reflect those of poster's employer -- -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Does a DD-Statement "waste memory" after dealloc?
Good point. This can be seen in DB2 (or long running STCs) as storage creep if you have interval detail records set (so don't do that if it hurts). Mark -- Mark Zelden Sr. Software and Systems Architect - z/OS Team Lead Zurich North America / Farmers Insurance Group - ZFUS G-ITO mailto:mark.zel...@zurichna.com z/OS Systems Programming expert at http://expertanswercenter.techtarget.com/ Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html On Tue, 13 Oct 2009 08:27:32 -0500, Staller, Allan wrote: >This may be SMF keeping the "pieces" it needs to build the SMF records >at task termination. > >A key symptom would be a long shutdown time for the task and an apparent >CPU loop in the task after a "xxx is shutting down" message. > >If this is the case, reference the DDCONS parameter of SMFPRMxx. > >What is the working set for the application? Unless you have done some >things unlikely to have been done for a "application program", I can >almost guarantee the working set is not 17,000 pages. > >HTH, > > > >I currently try to find a obscure memory leak in one of our >applications. After some days our appl occupies ~17.000 pages of real >memory (needs just ~1.500 after startup). > >As we track all malloc(), calloc(), realloc() and free() function calls, > >I can say that there is no obvious memory leak > >Now... after I've looked at the JESYSMSG I've noticed that we've done >approx 17.000 DYNALLOCs, everyone with a different DD-Name (we let the >z/OS generate a unique one, like "SYS1", "SYS2", "SYS3" and >so on). to be clear: *NOT* ~17.000 at the same time. mostly only one > >at the same time... > > >-- >For IBM-MAIN subscribe / signoff / archive access instructions, >send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO >Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Does a DD-Statement "waste memory" after dealloc?
Clark, If these are for QSAM data sets, does the C program do a FREEPOOL (free the buffer pool) on CLOSE. For reasons I don't understand, apparently CLOSE does not automatically free the buffers. I think the Well, I assume the C-Runtime does a FREEPOOL. If an I/O Error occurs the field "__last_op" of the "__amrc_type" can be "__QSAM_FREEPOOL". At no other place in the Manual something like "FREEPOOL" is mentioned. So I guess it is done automatically Bye, Michael -- Yours sincerely Michael Knigge Development S.E.T. Software GmbH Lister Straße 15 30163 Hannover GERMANY Tel. +49 511/3 97 80-23 Fax +49 511/3 97 80-65 michael.kni...@set-software.de Commercial Registry: HRB52778 Local Court Hannover Chief Executive Officer: Till Dammermann, Dr. Bernd Huber -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Does a DD-Statement "waste memory" after dealloc?
Miklos, We are also around dynalloc from C/C++, but You are saying 17000 pages , but the used storage also high ? (RPTSTG(ON)) So is it a reall a memory leak (HEAPC(ON,0,0,20)) or just a high real storage usage ? The LE runtime HEAPOOL(ALIGN) can make big differences . Well, maybe I'm currently a little bit dumb, but where is the difference? When my Prog starts, SDSF reports something around 1700 used pages (ehh, a page is 4K, right?). After some time, it reports (for example today) 15T pages (I assume T=thousand). The prog does a DYNALLOC, OPEN, READ/WRITE, CLOSE, DEALLOC. So somehwere is a memory leak. The last days I tried to find it using different techniques. I used a wrapper around malloc(), calloc(), realloc() and free() to track my own memory allocations. Result: No leak! Nearly everything I allocate gets freed too. I've also used the Heap-Manager "CEL4MCHK"... again: no leak. So... Until now I can be sure that I've no obvious memory leak in my application. Now I assume something that is special to the z/OS Envoronment makes my application use that much memory (the application runs also on Linux, AIX, SunOS and Windows - no high memory usage is seen on these platforms). Just a few minutes ago I've captured a SVC Dump of my prog - since I've never done things with IPCS this brings me not any further. I'll have to get familar with IPCS first. I also cancelled the prog and generated a dump - the dump has been catched by the IBM Application Fault Analyzer and I'll throw an eye on the analysis later. What I've seen so far is a error message: *ERROR* The left node address 1E222AD8 is larger than the parent node address 1E222098 whatever IBM tries to tell me with this left-right stuff ;-> I'll consult the manual later Maybe I'm somehow irritating the heap manager Bye, Michael -- Yours sincerely Michael Knigge Development S.E.T. Software GmbH Lister Straße 15 30163 Hannover GERMANY Tel. +49 511/3 97 80-23 Fax +49 511/3 97 80-65 michael.kni...@set-software.de Commercial Registry: HRB52778 Local Court Hannover Chief Executive Officer: Till Dammermann, Dr. Bernd Huber -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Does a DD-Statement "waste memory" after dealloc?
Michael, I remember some years ago I wrote an assembler-routine doing OPEN/GET/CLOSE some hundred times a day. After some weeks the routine terminated with 878 and the dump was full of wasted storage-entries all heaving the same length (I do not remember details). The solution was to code the FREEPOOL-Makro. Explanation: The FREEPOOL macro releases an area of storage, previously acquired for a buffer pool for a specified data control block. The area must have been acquired either automatically (except when dynamic buffer control is used) or by executing a GETPOOL macro. For queued access methods, you must issue a CLOSE macro for all the data control blocks using the buffer pool before issuing the FREEPOOL macro. For basic access methods, you can issue the FREEPOOL macro when the buffers are no longer required. A buffer pool need be released only once, regardless of the number of data control blocks sharing the buffer pool. SC26-7408-02 I think this hasn't changed yet. It was an assembler-routine but other languages will internally do the same and if IBM uses the same routines for OPEN/GET/CLOSE it will be the same result .. remaining storage. Maybe that's the reason why you only see it on IBM-Systems Juergen -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Does a DD-Statement "waste memory" after dealloc?
A few suggestions for looking at the dump with IPCS. Under the COMMAND panel, try VERBX VSMDATA 'SUMMARY' Then go to the end and there is a nice summary. Find the subpool where most of your storage is used, then go back in the listing and find repetitive sizes in that subpool, then go into the view panel and look at some of those areas. That will generally tell you if it is you because you recognize the data, or maybe there is an eyecatcher in the memory. The other thing I find interesting is the fact that you are up to 17T real pages. Either some program is looking at a lot of storage all the time, or that storage has been pagefixed. If it was not pagefixed, the system probably would have paged some of that storage out. To see what is pagefixed you can run a RSMDATA report. Chris Blaicher Phone: 512-340-6154 Mobile: 512-627-3803 -Original Message- From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of Michael Knigge Sent: Monday, October 26, 2009 5:51 AM To: IBM-MAIN@bama.ua.edu Subject: Re: Does a DD-Statement "waste memory" after dealloc? Miklos, > We are also around dynalloc from C/C++, but > You are saying 17000 pages , but the used storage also high ? > (RPTSTG(ON)) > So is it a reall a memory leak (HEAPC(ON,0,0,20)) or just a high real > storage usage ? > The LE runtime HEAPOOL(ALIGN) can make big differences . Well, maybe I'm currently a little bit dumb, but where is the difference? When my Prog starts, SDSF reports something around 1700 used pages (ehh, a page is 4K, right?). After some time, it reports (for example today) 15T pages (I assume T=thousand). The prog does a DYNALLOC, OPEN, READ/WRITE, CLOSE, DEALLOC. So somehwere is a memory leak. The last days I tried to find it using different techniques. I used a wrapper around malloc(), calloc(), realloc() and free() to track my own memory allocations. Result: No leak! Nearly everything I allocate gets freed too. I've also used the Heap-Manager "CEL4MCHK"... again: no leak. So... Until now I can be sure that I've no obvious memory leak in my application. Now I assume something that is special to the z/OS Envoronment makes my application use that much memory (the application runs also on Linux, AIX, SunOS and Windows - no high memory usage is seen on these platforms). Just a few minutes ago I've captured a SVC Dump of my prog - since I've never done things with IPCS this brings me not any further. I'll have to get familar with IPCS first. I also cancelled the prog and generated a dump - the dump has been catched by the IBM Application Fault Analyzer and I'll throw an eye on the analysis later. What I've seen so far is a error message: *ERROR* The left node address 1E222AD8 is larger than the parent node address 1E222098 whatever IBM tries to tell me with this left-right stuff ;-> I'll consult the manual later Maybe I'm somehow irritating the heap manager Bye, Michael -- Yours sincerely Michael Knigge Development S.E.T. Software GmbH Lister Straße 15 30163 Hannover GERMANY Tel. +49 511/3 97 80-23 Fax +49 511/3 97 80-65 michael.kni...@set-software.de Commercial Registry: HRB52778 Local Court Hannover Chief Executive Officer: Till Dammermann, Dr. Bernd Huber -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Does a DD-Statement "waste memory" after dealloc?
Hi Juergen, The FREEPOOL macro releases an area of storage, previously acquired for a buffer pool for a specified data control block. The area must have been acquired either automatically (except when dynamic buffer control is used) or The problem is, that FREEPOOL needs the DCB - an because my appl is written in C, I don't have any clue about the DCB Bye, Michael -- Yours sincerely Michael Knigge Development S.E.T. Software GmbH Lister Straße 15 30163 Hannover GERMANY Tel. +49 511/3 97 80-23 Fax +49 511/3 97 80-65 michael.kni...@set-software.de Commercial Registry: HRB52778 Local Court Hannover Chief Executive Officer: Till Dammermann, Dr. Bernd Huber -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Does a DD-Statement "waste memory" after dealloc?
Hi Chris, Under the COMMAND panel, try VERBX VSMDATA 'SUMMARY' Thank you for the hint... I tried it and what I get at the end of the summary is: VSM SUBPOOL TRANSLATION TABLE ERROR DETECTED The other thing I find interesting is the fact that you are up to 17T real pages. Either some program is looking at a lot of storage all the time, or that storage has been pagefixed. If it was not pagefixed, the system probably would have paged some of that storage out. To see what is pagefixed you can run a RSMDATA report. gives me BLS18100I ASID(X'0001') FFB744 not available for PVT IAR80303I Primary RSM data area not in dump. RSM processing terminated. Well all this stuff is somehow wired... Using IPCS I was able to see that I use most of the space in the extended user region (ELOAL = 3A4F000) and with the IBM Fault Analyzer I was able to see that there are many many modules loaded in this region that I've never heard about :( So I'm out of the office now for two days and when I'm back I guess I have to study a lot of manuals (i. e. ABCs of SysProg and so on) to get familar with all this stuff... I ask myself why there is no "how to find memory leaks" guideline in the ABCs of System Programming Manuals... Other stuff is handled (for ex. loop detection) So far, thank you for your hints bye, Michael -- Yours sincerely Michael Knigge Development S.E.T. Software GmbH Lister Straße 15 30163 Hannover GERMANY Tel. +49 511/3 97 80-23 Fax +49 511/3 97 80-65 michael.kni...@set-software.de Commercial Registry: HRB52778 Local Court Hannover Chief Executive Officer: Till Dammermann, Dr. Bernd Huber -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Does a DD-Statement "waste memory" after dealloc?
On Mon, 26 Oct 2009 22:57:56 +0100 Michael Knigge wrote: :>Hi Chris, :>> Under the COMMAND panel, try VERBX VSMDATA 'SUMMARY' :>Thank you for the hint... I tried it and what I get at the end of the :>summary is: :>VSM SUBPOOL TRANSLATION TABLE ERROR DETECTED Do you have an SVCDUMP or a SYSMDUMP? If the former, which options were specified? :>> The other thing I find interesting is the fact that you are up to 17T real pages. Either some program is looking at a lot of storage all the time, or that storage has been pagefixed. If it was not pagefixed, the system probably would have paged some of that storage out. To see what is pagefixed you can run a RSMDATA report. :>gives me :>BLS18100I ASID(X'0001') FFB744 not available for PVT :>IAR80303I Primary RSM data area not in dump. RSM processing terminated. :>Well all this stuff is somehow wired... :>Using IPCS I was able to see that I use most of the space in the :>extended user region (ELOAL = 3A4F000) and with the IBM Fault Analyzer I :>was able to see that there are many many modules loaded in this region :>that I've never heard about :( :>So I'm out of the office now for two days and when I'm back I guess :>I have to study a lot of manuals (i. e. ABCs of SysProg and so on) to :>get familar with all this stuff... :>I ask myself why there is no "how to find memory leaks" guideline in the :>ABCs of System Programming Manuals... Other stuff is handled (for ex. :>loop detection) It is pretty straight forward, as described. Look for the repeated VSM storage blocks, and then look at the storage. You can check the trace table for the various flavors of STORAGE and GETMAIN looking for unmatched pairs and repeated allocations. :>So far, thank you for your hints -- Binyamin Dissen http://www.dissensoftware.com Director, Dissen Software, Bar & Grill - Israel Should you use the mailblocks package and expect a response from me, you should preauthorize the dissensoftware.com domain. I very rarely bother responding to challenge/response systems, especially those from irresponsible companies. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html