dsalter
6th October 2004, 02:04
Hi, I am an Oracle DBA providing database support for a BAAN application and I am trying to track down where all the memory on my box is going. I am on a Unix box running Solaris 8 with about 12 Gig of memory and the Oracle database uses about 2 Gig of that memory. From what I can tell the other 10 Gig is being used by the bshell and ora8_svr6.2 processes. When I look at the processes from inside the Oracle database I see on average 10 to 20 active and about 1200 - 1400 inactive. It is the 1200 - 1400 inactive session that are consuming the memory. Is this normal that the BAAN (I think we are running IBaan ERP 5.0b porting set 7.1d) application would use up this much memory (10 Gig of memory)? Is there any way in the BAAN application to restrict the amount of memory it uses? Any information would be appreciated.

Daryl

Dikkie Dik
6th October 2004, 14:13
As you run on Solaris, I advise to use pmap to see the memory usage. I think that you used ps sofar and this also shows you a part of shared memory as well.

Further, the amount of open connections can be tuned by the setting of bdb_max_session_schedule. This Baan parameter takes care of the maximum amount of sessions that will be kept open if closed by the end-user. If more sessions are opened, they will stay open, if they are closed, the value of this parameter will be checked and if the total amount is below this value, it will be kept ope, else also the Oracle connection will be closed.

You can also ask the end-users how many sessions they have open at the same time and if the are willing to close them if they don't need it.

You don't mention how many many Baan users you have on the system, but each Baan user normally consumes upto a 50 Mb per user. All dependent on the Baan version. So you should have at least 10 Gb / 50Mb = 200 users does that sound familiar? 1400 connections/200 users = 7 connections (read sessions) per user. Seems they keep a lot of sessions open at the same time.

hope this helps,
Dick

Markus Schmitz
6th October 2004, 14:39
Hi Dikkie,

are you sure about this number (50 Megs) ?
This sounds too high for me.

Years ago I used to calculate around 12MB per bshell and around again 12MB per oracle driver. This was under BaanIV.

I had a quick look on one of our systems right now:

total RAM: 4000 MB
Buffer: 800 MB (quite high and could be reduced)
Oracle SGA: 1000 MB
system Mem: 900 MB
Free: 150 MB

This leaves for me 1150 MB, in this case for 40 users, ie. 28 MB per User.

I find our system utilization pretty high and we might need to check kernel parameters etc. for this. But this is it, more or less.

For all the HP-Ux user out there one small hint: HP-Ux comes out of the box (meaning from the factory) with dynamic buffering enabled and a maximum usage of 50%. Even though dynamic buffering is most likely a good idea, this results nowerdays with the large a amounts of RAM to very large buffer allocation. Most internal HP developers will tell you, that a buffer bigger trhan 200-400MB will not improve things anymore. I am talking of Unix IO buffering and not Oracle buffering here. Check this on your system (maybe with the help of glance, if you have it installed).

Regards

Markus

Dikkie Dik
6th October 2004, 14:45
Hi Dikkie,

are you sure about this number (50 Megs) ?
This sounds too high for me.

Years ago I used to calculate around 12MB per bshell and around again 12MB per oracle driver. This was under BaanIV.

<<SNIP>>

Regards

Markus

Markus,

I mentioned a maximum. Indeed Baan IV is using less memory compared to newer versions. The newer version you get, the more memory you need. 50Mb was also for users doing lots of things concurrent and thus consuming more memory. Ok, I know, now others will mention they have seem bshells or drivers over 100Mb and I have seen them too. But these large numbers are no normal behavior. 50Mb was just a average maximum.

Kind regards,
Dick

dsalter
6th October 2004, 19:48
Hi,

Thanks for the info. I will check into the bdb_max_session_schedule parameter. Also 50M is exactly what I am seeing as the average size on both the bshell and oracle driver combined. I am just suprised that the BAAN application takes up this much memory and most people think Oracle is a hog :-). I would think BAAN would be working on some kind of connection pooling or something like that. Thanks again for the info and if you think of anything else that I can look at I would appreciate any info I can get.

Daryl

Han Brinkman
7th October 2004, 16:48
I had about 2 years ago the task to solve a performance issue. The customer complained that since 2 months the performance was really bad. The system administrator noticed that the bshell consumed more than 150Mb for some users.

We found out that a consultant adviced to change the 'Multiplier 2-D Array's' setting in cpcom0100s000. This setting is used for calculation purposes and resulted in allocating lots of memory. Setting the parameter back from 5000 to 10 solved the problem and resulted in a memory usage of about 30Mb per bshell.

So please be aware that application parameters can have huge effects as well.

Regards,
Han

NPRao
7th October 2004, 21:00
Daryl,

We had a similar issue and a long running case with BaaN for high memory bshells (~300 mb).

One of the changes on the porting set caused that. Beyond that it depends on a lot of system and kernel parameters.

1. ulimit parameters - soft/hard/unlimited.

2. Number of database driver connections per bshell. In our architecture, we have a minimum of 3 database driver connection when they execute any app code.

3. You can also explore using bdb_max_server_schedule along with bdb_max_session_schedule as per Dick's suggestion. When setting this value lower it will result in more logoff/logons to the database, because memory is critical in your situation.

4. Do you have shared memory or not ? If shared memory is ON, then then that memory size is added up to each bshell/Oracle driver processes. You have to check in glance if its private or shared memory based on the ids.
when interpreting the results: always SUBSTRACT the Shmem VSS from the total VSS. The Shmem VSS for the Baan processes equals to the amount of Baan Shared Memory, and is not counted for the swap reservation. So when you see for the bshell process 50MB total VSS, and it consists of 44MB Shmem VSS, it results in 50MB-44MB= 6 MB total VSS for which swap reservation is done.

Refer to the thread - Memory Management (http://www.baanboard.com/baanboard/showthread.php?t=417&highlight=memory)

5. Do you have Data base driver Cache ON?

6. Han is also right that application code can affect the performance.

I suggest to validate if its your application code problem else, work with BaaN support or uninstall that porting set.

PS/Disclaimer - my comments are based on my experience on HP-UX and you are on Sun-Solaris.

Markus Schmitz
8th October 2004, 09:53
Hi guys,

just to clarify point 4 in NPrao's statement:

The shared memeory is "shared" and therefore obviously not duplicated for each bshell/oracle8 process. But if you look with several unix tools (ps, glance in HP-Ux, ...) these often show the used amount of memory in a process to include this shared memory. Adding up the amount of RAM these tools are showing for all processes will show often several times more, then actually used.

Regards

Markus

mraguthu
12th October 2004, 21:21
Is it same will applies to os/400? what about session "ttdba0535m000" Driver parameter optimization..please let me know

Dikkie Dik
13th October 2004, 09:35
Shared memory is also alvailable on AS/400.

The driver settings in ttdba0535m000 have nothing to do with this. Currentlty the optimal driver settings are already set by default during the installation. If you need more information about these parameters, please read the related driver manual.