Leak on FreeBSD amd64?

Leak on FreeBSD amd64?

am 24.01.2008 11:29:24 von Eivind Eklund

I'm seeing a leak/prefetch/something on Perl5.8.8 FreeBSD 6.3B2
DBD-mysql 4.006. This creates severe problems for me, as it makes my
mod_perl processes grow to a size that I can't handle - and I'm not
seeing this problem on other machines, including another machine that
should have the same config (it has the same config for everything
Iv'e been able to check.)

I have a reproduction program here:

use DBI;
my $dbh = DBI->connect("dbi:mysql:host=my.machine.here;database=mydata base","root","",{
'PrintError' => 0, 'RowCacheSize' => 1 } );
$dbh->{'RowCacheSize'} = 1;
my $sth = $dbh->prepare("SELECT * from amsCustomers");
$sth->execute();
while (my $single_hash = $sth->fetchrow_hashref()) {
for (;;) {} # Block execution
}

This simple little program grows to insane size (319MB), and then
shrinks again to another insane but about half as large size (180MB).
Changing or dropping RowCacheSize makes no difference - as far as I
can tell from the code in DBI, RowCacheSize is a dummy (even though it
SHOULD be what controls this).

Adding mysql_server_prepare=1 to the connect string above reduce the
insanity to 80MB - but - it should be 12MB, as before I started
loading up DBI.

In practice, this stuff leaks 1.5 to 3MB per request for my mod_perl
scripts (doing tiny queries), and totally blow up my frontend server.

I am about to start looking into the DBD driver to see what I can find
- any hints? Or workarounds, other people that have had the same
problems, ... ?

Eivind.

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Leak on FreeBSD amd64?

am 24.01.2008 17:07:14 von Patrick Galbraith

Eivind,

Do you happen to have a VM for FreeBSD AMD64? I'd be interested to debug
this.

regards,

Patrick

Eivind Eklund wrote:

>I'm seeing a leak/prefetch/something on Perl5.8.8 FreeBSD 6.3B2
>DBD-mysql 4.006. This creates severe problems for me, as it makes my
>mod_perl processes grow to a size that I can't handle - and I'm not
>seeing this problem on other machines, including another machine that
>should have the same config (it has the same config for everything
>Iv'e been able to check.)
>
>I have a reproduction program here:
>
>use DBI;
>my $dbh = DBI->connect("dbi:mysql:host=my.machine.here;database=mydata base","root","",{
>'PrintError' => 0, 'RowCacheSize' => 1 } );
>$dbh->{'RowCacheSize'} = 1;
>my $sth = $dbh->prepare("SELECT * from amsCustomers");
>$sth->execute();
>while (my $single_hash = $sth->fetchrow_hashref()) {
> for (;;) {} # Block execution
>}
>
>This simple little program grows to insane size (319MB), and then
>shrinks again to another insane but about half as large size (180MB).
>Changing or dropping RowCacheSize makes no difference - as far as I
>can tell from the code in DBI, RowCacheSize is a dummy (even though it
>SHOULD be what controls this).
>
>Adding mysql_server_prepare=1 to the connect string above reduce the
>insanity to 80MB - but - it should be 12MB, as before I started
>loading up DBI.
>
>In practice, this stuff leaks 1.5 to 3MB per request for my mod_perl
>scripts (doing tiny queries), and totally blow up my frontend server.
>
>I am about to start looking into the DBD driver to see what I can find
>- any hints? Or workarounds, other people that have had the same
>problems, ... ?
>
>Eivind.
>
>
>


--
Patrick Galbraith, Senior Programmer
Grazr - Easy feed grazing and sharing
http://www.grazr.com

Satyam Eva Jayate - Truth Alone Triumphs
Mundaka Upanishad




--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org