[csw-users] Why has php been split into a bazillion packages?
Mark Round
mark.round at gmail.com
Fri Dec 9 14:08:16 CET 2005
> If I may make a suggestion,
> you should place a copy of that response under the "View news and
> info" tab for mod_php.
Good point. I posted a message to the users and announce lists, but I
must have missed that one out. I've just updated it now.
> So, you're saying the first thing I should do is 'rmpkg CSWphp'
> and then I can pick and choose among the extensions to suit my
> specific needs?
Yup, that's right. As CSWphp is simply a dummy package containing a
list of dependencies, you can now remove it with no ill-effects. It
will then mean you can remove things you don't need without Solaris
complaining that "CSWphp4libfoo is required by CSWphp" etc.
> Aside from the physcial package size, is there
> any way to discern what effect each extension has on the apache
> module size? I did notice the huge increase in the apache virtual
> memory footprint after installing php initially.
A simple approach is to look at what libraries those extensions make
use of. For instance :
[mround at builds:mround] # cd
/opt/csw/lib/php/extensions/no-debug-non-zts-20020429/
[mround at builds:no-debug-non-zts-20020429] # ls -l
total 2382
-rw-r--r-- 1 root bin 106076 Dec 5 07:26 bcmath.so
-rw-r--r-- 1 root bin 34544 Dec 5 07:26 calendar.so
-rw-r--r-- 1 root bin 43760 Dec 5 07:26 curl.so
-rw-r--r-- 1 root bin 96420 Dec 5 07:26 domxml.so
-rw-r--r-- 1 root bin 412008 Dec 5 07:27 gd.so
-rw-r--r-- 1 root bin 14252 Dec 5 07:27 gettext.so
-rw-r--r-- 1 root bin 12928 Dec 5 07:27 iconv.so
-rw-r--r-- 1 root bin 1206764 Dec 5 07:27 imap.so
-rw-r--r-- 1 root bin 42108 Dec 5 07:27 ldap.so
-rw-r--r-- 1 root bin 75500 Dec 5 07:27 mcal.so
-rw-r--r-- 1 root bin 52792 Dec 5 07:27 mssql.so
-rw-r--r-- 1 root bin 50580 Dec 5 07:27 mysql.so
-rw-r--r-- 1 root bin 68068 Dec 5 07:27 odbc.so
-rw-r--r-- 1 root bin 62312 Dec 5 07:27 openssl.so
-rw-r--r-- 1 root bin 86616 Dec 5 07:27 pgsql.so
-rw-r--r-- 1 root bin 32156 Dec 5 07:27 zlib.so
The obvious culprit here is the imap extension - this will add around
1.2Mb to the shared memory space used by Apache processes. But that's
not all - if you use ldd on it :
[mround at builds:no-debug-non-zts-20020429] # ldd imap.so
warning: ldd: imap.so: is not executable
libssl.so.0.9.8 => /opt/csw/lib/sparcv8plus/libssl.so.0.9.8
libcrypto.so.0.9.8 => /opt/csw/lib/sparcv8plus/libcrypto.so.0.9.8
libcrypt_i.so.1 => /usr/lib/libcrypt_i.so.1
libpam.so.1 => /usr/lib/libpam.so.1
libc.so.1 => /usr/lib/libc.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libgen.so.1 => /usr/lib/libgen.so.1
libcmd.so.1 => /usr/lib/libcmd.so.1
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1
You can see that it will also pull in OpenSSL libraries, which are not
small either (around 2.3Mb for libcrypto - but then they are used by
other extensions as well). So if you're not making use of any
IMAP/POP3 mail servers through PHP, removing this will help your
footprint.
Libgd.so also pulls in a lot of the image processing libraries (t1lib,
libjpeg, libpng etc. as well as freetype) - so if you're not using any
of the image processing functions (http://php.net/gd), this would be a
good one to remove.
Likewise LDAP/PostgreSQL etc. - these pull in all sorts of other
libraries. Bottom line is, if you're not using an extension, remove
it. Some of these will be fairly obvious - if, for instance, you don't
have a PostgreSQL database server anywhere that you need to access,
then you're pretty safe to go ahead and remove CSWphp4pgsql.
More information about the users
mailing list