on 08-26-2007 4:50 PM
Hello,
We are facing one issue of Memory dump for one of the Background Job. The Job is fetching a very huge data and it is failing with the shortdump TSV_TNEW_PAGE_ALLOC_FAILED. I have asked application user to brake the variant of period and now he is running job for 1 single day. But since the amount of data volume is so huge, it is not going thru.
~
The short dump gives following information about memory parameter value:
The amount of storage space (in bytes) filled at termination time was:
Roll area...................... 6225552
Extended memory (EM)........... 1001392792
Assigned memory (HEAP)......... 2998638656
Short area..................... " "
Paging area.................... 24576
Maximum address space.......... 18446744048641535328
~
The termination occurred in line 1009 of the source code of the (Include)
1009 -> SELECT * FROM .............
~
Instance Profile Memory parameter values :
rdisp/ROLL_SHM 8000
rdisp/ROLL_MAXFS 16384
ztta/roll_area 6500000
ztta/roll_first 1
ztta/roll_extension 1000000000
abap/heaplimit 20000000
abap/heap_area_nondia 3000000000
abap/heap_area_dia 3000000000
abap/heap_area_total 6000000000
~
Please note that once we got the dump "SYSTEM_IMODE_TOO_LARGE" and we have set the abap/max_imode = four_gb.
~
Can any one help me to resolve this error ? how much memory I can assign ? How to calculate memory available and how to calculate memory required ?
The job is very important from business point of view and do not have time to optimize the code as of now.
Any help will be higly appreciated.
Thanks
Best Regards,
Basis CK
Hi Markus,
I have chcked the ST06 and found the following memory details:
Memory
Physical mem avail Kb 41.943.040 Physical mem free Kb 20.808.904
Pages in/s 1 Kb paged in/s 8
Pages out/s 0 Kb paged out/s 0
In RSMEMORY report, followig is the current value:
-
Memory classes: ROLL(0) EM(1) HEAP(2)
1 - - 6500000
2 - 2 - 3000000000
3 - 1 - 1000000000 -> <b>increase to 6089446400</b>
Memory classes: ROLL(0) EM(1) HEAP(2)
abap/heap area dia: 3000000000
abap/heap area nondia: 3000000000
abap/heap area total: 6000000000 -> increase to <b>8547482624</b>
em/stat log timeout: 600
em/stat log size MB: 20
If I change the value put it in bold, is it ok ? or it can create issue ? Since it is production instance, do not want to take any risk.
Thanks in advance for the help.
Best regards,
Basis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I do agree with you. I just want to know how to calculate available memory and allocate it ? I just do not want to landup any issue by allocation more memory which might cause any issue. So was wondering if can get some help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It depends how much memory is used in the server already, if you will make the system start paging out, it will slow down everything.
If you run this during production time check ST06 for available memory, don´t "overcommit" the memory, means, you should not increase more than you have physically available.
--
Markus
Hi Markus,
I have gone tru the SAP note you have recommanded. Actually our requirement is that this job is very urgent from business point of view and code optimization will take time as we need to first test in sandbox and then the production. Looking at the scenario, I have decided with this approach :
<b>Step 1 -></b> Remove parameter abap/max_imode = four_gb from instance profile as this parameter is not required.
*
Please refer note SAP note 548845 - Internal modes users more than 2 GB. According to this note "As of SAP_BASIS 6.20 Support Package 38 and SAP_BASIS 6.40, you do no longer require the profile parameter. Therefore, delete this parameter from the profile; otherwise there is an upper limit of 4 GB."
*
(Here I assume that by removing the parameter abap/max_imode, it can go beyound 4GB)
<b>Step 2 -></b> Increase the memory dyanimcally thru RSMEMORY program for that application server and run the Background Job to make it finish successfully.
RSMEMORY Parameter is showing following value. <b>Is it possible for you to recommand how much we can increase the memory ?</b>*
Result of RSMEMORY
~~~~~~~~~~~~~~~~~
Quota Dialog
Step Memory class Size [bytes]
-
1 1
2 1 1000000000
3 6500000
4 2 3000000000
5
Memory classes: ROLL(0) EM(1) HEAP(2)
1 6500000
2 2 3000000000
3 1 1000000000
4
5
Memory classes: ROLL(0) EM(1) HEAP(2)
abap/heap area dia: 3000000000
abap/heap area nondia: 3000000000
abap/heap area total: 6000000000
em/stat log timeout: 600
em/stat log size MB: 20
Any help will be highly appreciated.
Thanks
Best Regards,
Basis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The program used
650 MB roll
1 GB extended
3 GB Heap
So you´re using almost 4 GB for a single process.
A "select *" is easy to program (with a table statement at the start of the program) but is very bad program technique. If you read table with 50 columns and you effectively need two or three, the amount of data can HIGHLY be reduced by only selecting those columns, that are effectively needed. I´m not blaming you or your programmer here, I just have had likewise problems in the past with "quick-and-dirty" hacks. Just as an example: A program that does
select * from mara.
select * from makt where matnr = mara-matnr
could be reduced by > 80 % when using
select matnr from mara.
select spras maktx from makt where matnr = mara-matnr.
The amount of memory needed depends alone on the amount of data to be read and processed - so we can´t say.
The only way to circumvent that error short term is to increase your limits even more. Depending on if it´s background for foreground, increase abap/heap_area_dia or abap/heap_area_nondia. Keep in mind, that the allocated memory is exclusively for that process and is no more shared over the system.
check
Note 649327 - Analysis of memory consumption (Section 3)
how to analyze which tables are the biggest ones during the runtime.
--
Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.