Skip to Content.
Sympa Menu

freetds - Re: [freetds] FreeTDS on Core 2 Duo problem

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Medvidek Pu <Pu.Medvidek AT seznam.cz>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] FreeTDS on Core 2 Duo problem
  • Date: Mon, 19 Feb 2007 10:21:21 +0100 (CET)


> ------------ Původní zpráva ------------
> Od: ZIGLIO, Frediano, VF-IT <Frediano.Ziglio AT vodafone.com>
> Předmět: Re: [freetds] FreeTDS on Core 2 Duo problem
> Datum: 16.2.2007 14:51:09
> ----------------------------------------
> >
> > Hi all,
> >
> > I've just come accross a strange behavior of FreeTDS running
> > on Core 2 Duo CPU. I'm using it from PHP. The pages with sql
> > queries were generated much faster on my older machine than
> > on my brand new Core 2 Duo PC. I've done a little
> > investigation and I found that queries take an unreasonable
> > amount of time. Looking more closely into the matter I found
> > the following strange behavior:
> >
> > 1. I've created a script sql-test with the following content:
> >
> > <code>
> > #!/bin/sh
> > for ((i=1; i<100; i++)); do sqsh -U sa -S my_server -D my_db
> > -P my_passwd -i my_query.sql -p; done
> > </code>
> >
> > It runs the same query repeatedly (100 times) and prints some
> > statistcs (how much time it took).
> >
> > 2. While running the sql-test script above, the time a single
> > query takes grows and grows. Sometimes it drops to reasonable
> > time (0.1s) but then it grows upto several seconds.
> >
> > 3. But, running the sql-test script on two consoles
> > concurrently, makes each single query complete in reasonable
> > time. As the two sql-test processes take different time, one
> > of them stops earlier then the other. After one of the two
> > sql-test processes stops, the queries from the other sql-test
> > process immediately start to run much slower.
> >
> > 4. Moreover, when I run the sql-test script while a PHP page
> > with sql queries is being generated, then the PHP page is
> > generated fast. When I do *not* run the sql-test script while
> > a PHP page is being generated, then the PHP page is generated slowly.
> >
> > 5. When I generate two PHP pages with sql queries
> > simultaneously, the pages are generated fast.
> >
> > Summary: It is clearly not PHP-related thing, because the
> > problem appears even in SQSH alone. It is clearly also not a
> > SQSH-related thing, because PHP-SQSH is fast and PHP-PHP is
> > fast. Therefore, I think it is a FreeTDS-related problem.
> >
> > Is it a bug in FreeTDS? Is it a misconfiguration? Any ideas,
> > solutions?
> >
> > Thanks
> >
> > Pavel
> >
> > FreeTDS 0.64 and 0.63
> > SQSH 2.1.4
> > OpenSuSE Linux 10.2 x86
> > CPU: Core 2 Duo @ 2.4
> > RAM: 2GB
>
> Quite strange. When you try to stress db db reply faster while when you
> don't use that much db db is slower.
>
> Perhaps it can be a problem related to server configuration. There is an
> autoclose flag that force server to close a single database when there
> are no activity on db. Perhaps executing queries from 2 console keeps
> database open while executing from a single console keeps opening and
> closing database.
> On mssql2k you can change this flag from sqlem -> database properties ->
> tab "Options" (the flag is "Auto Close")
>
> freddy77
>

Thanks for reply. But this is not about *server* performance but rather this
is about *client* performance I think, since running sql-test on different
client machines (single core CPU) takes reasonable time for every query and
there is no need to run the second sql-test script to make queries run fast.
For the same reason, it cannot be related to server configuration. It depends
on client.

It seems to me that the problem can be related to the fact that there are 2
CPUs in my client machine. I'm not a low-level guy, so that is only a feeling.

Thank you for your interest.




Archive powered by MHonArc 2.6.24.

Top of Page