Discussions
Categories
- 385.5K All Categories
- 5.1K Data
- 2.5K Big Data Appliance
- 2.5K Data Science
- 453.4K Databases
- 223.2K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 47 Multilingual Engine
- 606 MySQL Community Space
- 486 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.2K ORDS, SODA & JSON in the Database
- 585 SQLcl
- 4K SQL Developer Data Modeler
- 188K SQL & PL/SQL
- 21.5K SQL Developer
- 46 Data Integration
- 46 GoldenGate
- 298.4K Development
- 4 Application Development
- 20 Developer Projects
- 166 Programming Languages
- 295K Development Tools
- 150 DevOps
- 3.1K QA/Testing
- 646.7K Java
- 37 Java Learning Subscription
- 37.1K Database Connectivity
- 201 Java Community Process
- 108 Java 25
- 22.2K Java APIs
- 138.3K Java Development Tools
- 165.4K Java EE (Java Enterprise Edition)
- 22 Java Essentials
- 176 Java 8 Questions
- 86K Java Programming
- 82 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 208 Java User Groups
- 25 JavaScript - Nashorn
- Programs
- 667 LiveLabs
- 41 Workshops
- 10.3K Software
- 6.7K Berkeley DB Family
- 3.6K JHeadstart
- 6K Other Languages
- 2.3K Chinese
- 207 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 474 Portuguese
S11 + OIC + oci8 huge memory consumption
Hi all,
recently, I have upgraded my Solaris boxes
from
Solaris 10 with php5.3.8+oci8 compiled with instant client 10.2
to
Solaris 11 + php5.3.13+oci8 compiled with instant client 11.2.0.2.0 bundled with solarisstudio IPS repo (developer/solarisstudio-123/oic).
After that upgrade however, the apache memory consumption dramatically increased from average 25-35MB RSS to 80-110MB RSS per apache process.
The architecture remains the same - OS is 64-bit and php+apache is 32-bit (x86).
I'm posting "pmap -x" output before and after the upgrade (displaying only lines above 1500KB):
BEFORE:
Address Kbytes RSS Anon Locked Mode Mapped File
...
E9830000 1772 144 - - r-x-- cs_CZ.UTF-8.so.3
FD600000 1844 700 - - r-x-- libicui18n.so.48.0
FC600000 8704 3496 - - r-x-- libphp5.so.5.3.8
FA600000 12268 4096 - - r-x-- libclntsh.so.10.1
080B9000 14876 14104 12516 - rwx-- [ heap ]
FB400000 17764 140 - - r-x-- libicudata.so.48.0
F6200000 65536 - - - rw-s- [ anon ]
E9A00000 70972 780 - - r-x-- libociei.so
EE000000 131072 7628 - - rw-s- [ anon ]
---
total Kb 348452 42648 13268 -
AFTER:
Address Kbytes RSS Anon Locked Mode Mapped File
...
FEDF0000 1352 852 - - r-x-- libc_hwcap2.so.1
FB800000 1460 764 - - r-x-- libmysqlclient.so.16.0.0
FE6A0000 1816 76 - - r-x-- libnss3.so
FBC00000 2124 2100 - - r-x-- mbstring.so
FE000000 2276 2136 - - r-x-- libxml2.so.2
F6400000 2324 2116 - - r-x-- libnnz11.so
FA600000 7516 6456 - - r-x-- libphp5.so
080D8000 30604 28884 26760 - rw--- [ heap ]
F6800000 38160 35076 - - r-x-- libclntsh.so.11.1
EF400000 113100 16544 - - r-x-- libociei.so
---
total Kb 220040 106480 27404 -
My question is: is this normal? Does the oracle instant client always consume that much memory? Or is there any tuning possibility to reduce used RAM?
Does anybody experience simmilar behavior?
Thank you for your help.
Jan
Edited by: 926844 on Sep 17, 2012 2:56 AM
recently, I have upgraded my Solaris boxes
from
Solaris 10 with php5.3.8+oci8 compiled with instant client 10.2
to
Solaris 11 + php5.3.13+oci8 compiled with instant client 11.2.0.2.0 bundled with solarisstudio IPS repo (developer/solarisstudio-123/oic).
After that upgrade however, the apache memory consumption dramatically increased from average 25-35MB RSS to 80-110MB RSS per apache process.
The architecture remains the same - OS is 64-bit and php+apache is 32-bit (x86).
I'm posting "pmap -x" output before and after the upgrade (displaying only lines above 1500KB):
BEFORE:
Address Kbytes RSS Anon Locked Mode Mapped File
...
E9830000 1772 144 - - r-x-- cs_CZ.UTF-8.so.3
FD600000 1844 700 - - r-x-- libicui18n.so.48.0
FC600000 8704 3496 - - r-x-- libphp5.so.5.3.8
FA600000 12268 4096 - - r-x-- libclntsh.so.10.1
080B9000 14876 14104 12516 - rwx-- [ heap ]
FB400000 17764 140 - - r-x-- libicudata.so.48.0
F6200000 65536 - - - rw-s- [ anon ]
E9A00000 70972 780 - - r-x-- libociei.so
EE000000 131072 7628 - - rw-s- [ anon ]
---
total Kb 348452 42648 13268 -
AFTER:
Address Kbytes RSS Anon Locked Mode Mapped File
...
FEDF0000 1352 852 - - r-x-- libc_hwcap2.so.1
FB800000 1460 764 - - r-x-- libmysqlclient.so.16.0.0
FE6A0000 1816 76 - - r-x-- libnss3.so
FBC00000 2124 2100 - - r-x-- mbstring.so
FE000000 2276 2136 - - r-x-- libxml2.so.2
F6400000 2324 2116 - - r-x-- libnnz11.so
FA600000 7516 6456 - - r-x-- libphp5.so
080D8000 30604 28884 26760 - rw--- [ heap ]
F6800000 38160 35076 - - r-x-- libclntsh.so.11.1
EF400000 113100 16544 - - r-x-- libociei.so
---
total Kb 220040 106480 27404 -
My question is: is this normal? Does the oracle instant client always consume that much memory? Or is there any tuning possibility to reduce used RAM?
Does anybody experience simmilar behavior?
Thank you for your help.
Jan
Edited by: 926844 on Sep 17, 2012 2:56 AM
Answers
-
On Linux, I can see an increase between 10.2 and 11.2 Instant Client but not as dramatic as the one you see on Solaris.
Was PHP running the same application for the same length of time?
Where did the 10.2 Instant Client come from - was it the Basic or Basic Lite package? Can you test using the Solaris Instant Client zip files?
The RSS memory should be shared by all processes using Instant Client and shouldn't be duplicated. Check Oracle Support note "How to Tell How Much Memory is Being Used by a Process with Solaris [ID 1003055.1]"
The problems doesn't appear to be PHP related. The best places to follow up are one of the Solaris forums https://forums.oracle.com/forums/category.jspa?categoryID=303 and the Instant Client forum 3192 -
Hi cj,
Thank you for your answer. You inspired me to search for shared memory and I've discovered that on the old system I can see shared memory (ipcs command below), but on the new system, there is no shared memory (empty list from ipcs command).ipcs -ma(PID number is apache master process)
IPC status from <running system> as of Wed Sep 19 10:04:02 CEST 2012
T ID KEY MODE OWNER GROUP CREATOR CGROUP NATTCH SEGSZ CPID LPID ATIME DTIME CTIME
Shared Memory:
m 50331666 0x100876e rw----- root root root root 7 80924 2298 2298 9:28:35 no-entry 9:28:35
Is there any php compile option to enable this?
My configure args:
OLD:
./configure prefix=/usr/local/php with-config-file-path=/usr/local/php/lib with-libxml-dir=/usr/local with-zlib=/usr/local with-xpm-dir=/usr/local with-mysql=/usr/local/mysql with-mysqli=/usr/local/mysql/bin/mysql_config with-apxs2=/usr/local/apache2/bin/apxs without-pgsql with-jpeg-dir=/usr/local/lib with-zlib-dir=/usr/local/lib with-gd=/usr/local enable-mbstring enable-shared enable-exif enable-sockets enable-soap with-png-dir=/usr/local/lib with-curl=/usr/local with-ldap=/usr/local with-openssl=/usr/local/ssl with-gettext with-pcre-dir=/usr/local with-freetype-dir=/usr/local with-mssql=/usr/local/freetds with-oci8=instantclient,/opt/instantclient_10_2
NEW:
./configure prefix=/usr/local libexecdir=/usr/local/libexec/php5 with-config-file-path=/usr/local/etc/php5 with-config-file-scan-dir=/usr/local/etc/php5/conf.d with-exec-dir=/usr/local/bin with-apxs2=/usr/apache2/2.2/bin/apxs disable-static enable-dom=shared with-openssl=shared,/usr with-openssl-dir=/usr with-zlib=shared,/usr with-curl=shared,/usr with-iconv=shared with-gd with-jpeg-dir=/usr with-png-dir=/usr with-zlib-dir=/usr with-xpm-dir=/usr with-freetype-dir=/usr enable-gd-native-ttf enable-gd-jis-conv enable-exif=shared with-gettext=shared,/usr enable-mbstring=shared enable-pdo=yes with-mysql=shared,/usr/mysql/5.1 with-mysqli=shared,/usr/mysql/5.1/bin/mysql_config with-pdo-mysql=shared,/usr/mysql/5.1/bin/mysql_config with-unixODBC=no with-snmp=no enable-soap=shared enable-sockets=shared enable-sysvmsg=shared enable-sysvsem=shared enable-sysvshm=shared enable-xml with-libexpat-dir=/usr with-xsl=shared,/usr enable-wddx=shared enable-xmlreader=shared with-xmlrpc=shared enable-pcntl=shared with-mime-magic=shared enable-json=shared enable-filter=shared enable-zip=shared with-pcre-regex enable-session=shared with-pear=/usr/local/share/pear enable-cli disable-cgi with-ldap=shared,/usr with-ldap-sasl=no with-libxml-dir=/usr disable-debug with-oci8=instantclient,/opt/solarisstudio12.3/OIC/arch32 --with-mcrypt=/usr
Thank you for any hints.
Jan -
What's the base problem you have? What are you trying to solve?
Oracle Client doesn't use shared memory. If it did, only user data would be shared; the RSS size wouldn't be affected. (The Oracle Database does use shared memory)
How did you go with the suggestions/questions in my previous comment? It's best to change only one thing when doing comparisons; currently you are changing PHP versions and PHP extensions and Instant Client library versions. -
Hi,
during the delay I've tried this:
1) I've recompiled the php using old options and using newest oracle instant client 11.2 from oracle download site (instantclient-basic + instantclient-sdk).
It did help, but not that much: the apache processes had about 75-90 MB each. It is 10-15 megabytes decrease in average, but still far from 30-40 MB.
2) So I've tried to recompile it using instant client 10.2.
The resulting process size is about 50 MB, which is acceptable. So I'll stick to 10.2 libs (hoping there won't be any problem connecting to 11g database).
So I'll try to answer my original question: yes, it is probably normal that the IC 11 eats that much memory and no, apparently there are no tuning options for that.
Thank you for your help.
Jan -
I'm not convinced you are interpreting the data you have correctly. We also don't know what load you are under and what your expected usage is. If the extra RSS mem is shared across all processes then the absolute increase per machine is small. Yes, Anon went up - is that a problem? What are you trying to fit on the machine? Without the 11g client you miss out on things like client result caching, DRCP connecting pooling, REF CURSOR prefetching etc. With those things you might find your applications are faster and you need fewer client processes.
Anyway, the Solaris forum folk are more able to help you analyze memory use.
This discussion has been closed.