Skip to Content.
Sympa Menu

freetds - [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 AT lists.ibiblio.org
  • Subject: [freetds] FreeTDS on Core 2 Duo problem
  • Date: Fri, 16 Feb 2007 14:37:51 +0100 (CET)

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




Archive powered by MHonArc 2.6.24.

Top of Page