Search Postgresql Archives

Why DBI (DBD::Pg) takes so much memory ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a simple perl program (see below) with DBI call to connect to the Postgresql db on a CentOS system. I don't know why the top command shows it takes more than 110m (under VIRT column). I tried with newer DBI and DBD versions still have the same result. However, I tried it on host with Mandriva, and it only takes about 8m. Is there any special on CentOS or some of the libraries are not linked or built correctly ?

Thanks,
Gary

----- OS Version
$ cat /proc/version
Linux version 2.6.18-194.8.1.el5 (mockbuild@xxxxxxxxxxxxxxxxxxxx) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Thu Jul 1 19:04:48 EDT 2010

----- DBI & DBD::Pg versions
$ perl -e 'use DBI; print "$DBI::VERSION\n"'
1.607
2:46pm 675 sd3dev1@sd3dev1:~/tmp$ perl -e 'use DBD::Pg; print "$DBD::Pg::VERSION\n"'
2.11.5

----- libpq version
$ ldd /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBD/Pg/Pg.so
        libpq.so.4 => /usr/lib64/libpq.so.4 (0x00002b8adedb7000)
        libm.so.6 => /lib64/libm.so.6 (0x00002b8adefd9000)
        libc.so.6 => /lib64/libc.so.6 (0x00002b8adf25c000)
        libssl.so.6 => /lib64/libssl.so.6 (0x00002b8adf5b4000)
        libcrypto.so.6 => /lib64/libcrypto.so.6 (0x00002b8adf800000)
        libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x00002b8adfb51000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00002b8adfde7000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x00002b8ae001f000)
        libnsl.so.1 => /lib64/libnsl.so.1 (0x00002b8ae0234000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b8ae044d000)
        /lib64/ld-linux-x86-64.so.2 (0x00000039ffa00000)
libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x00002b8ae0668000)
        libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00002b8ae0896000)
libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x00002b8ae0a99000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00002b8ae0cbe000)
        libz.so.1 => /usr/lib64/libz.so.1 (0x00002b8ae0ec2000)
libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x00002b8ae10d7000)
        libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00002b8ae12df000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x00002b8ae14e2000)
        libsepol.so.1 => /lib64/libsepol.so.1 (0x00002b8ae16fa000)


----- test program
#! /usr/local/bin/perl -w

use strict;
use DBI;

my $data_source = "dbi:Pg:dbname='dev1';host='db1'";
my $dbh = DBI->connect ($data_source, 'user', 'passwd')
    or die "Failed to connect";

sleep 600;
exit;

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux