Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 4th, 2006, 07:29 AM
mheron mheron is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Posts: 8 mheron User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 21 m 18 sec
Reputation Power: 0
Angry Firebird database too slow

Hi All,

We log on to our Data Center over a Citrix Terminal Farm.
We have 5 dual Xeon Citrix Terminal servers and our Dual Xeon Firebird Server. Everything is ok when we open word docs ect... on the Citrix Servers, but when we use our application from EXSOFT that accesses the DataBase ( Firebird) the results take far to long. The network responce time is very good, so I think that is has to do with the Firebird Database !. We have over 200 Users logging on to it, and the database is 35GB in size.

Can anybody help me ?. Must we swap to Oracle or sybase for better performance ?.

Thanks in advance.

Mark

Reply With Quote
  #2  
Old January 4th, 2006, 08:45 AM
mariuz's Avatar
mariuz mariuz is offline
Bug Hunter
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Transylvania (Romania)
Posts: 274 mariuz User rank is Corporal (100 - 500 Reputation Level)mariuz User rank is Corporal (100 - 500 Reputation Level)mariuz User rank is Corporal (100 - 500 Reputation Level)mariuz User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 20 h 12 m 34 sec
Reputation Power: 9
Lightbulb

Quote:
Originally Posted by mheron
Hi All,

We log on to our Data Center over a Citrix Terminal Farm.
We have 5 dual Xeon Citrix Terminal servers and our Dual Xeon Firebird Server. Everything is ok when we open word docs ect... on the Citrix Servers, but when we use our application from EXSOFT that accesses the DataBase ( Firebird) the results take far to long. The network responce time is very good, so I think that is has to do with the Firebird Database !. We have over 200 Users logging on to it, and the database is 35GB in size.

Can anybody help me ?. Must we swap to Oracle or sybase for better performance ?.

Thanks in advance.
Mark

Some ideas for performance improvement
http://www.dotnetfirebird.org/blog/...-page-size.html
http://www.dotnetfirebird.org/blog/...ning-links.html
I see you have dual cpu system , in that case Firebird Classic is working better (it will make use of them)
Add more ram (is cheap if system is swap-ing)
Also try to backup and restore the database (it will flush unused disk pages)
One more tip : try to optimize the query-ies for database (work with vendor and they should help you)
__________________
My home page: http://www.firebirdsql.org and work place :http://www.reea.net

Last edited by mariuz : January 4th, 2006 at 09:02 AM.

Reply With Quote
  #3  
Old January 4th, 2006, 09:08 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,907 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 3 Days 9 h 21 m 6 sec
Reputation Power: 279
Yes, follow Mariuz's suggestions, read this comparison to know more about the architecture and why Classic server is good for your multiprocessor machine.
Note that SuperServer on a multiprocessor machine has this problem:
Quote:
No SMP support. On multi-processor Windows machines, performance can even drop dramatically as the OS switches the process between CPUs. To prevent this, set the CpuAffinityMask parameter in the configuration file firebird.conf
(partly valid for non-windows machines)

Reply With Quote
  #4  
Old January 4th, 2006, 09:37 AM
mheron mheron is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Posts: 8 mheron User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 21 m 18 sec
Reputation Power: 0
Hi Mariuz,

we have tried everything you said. The vendor keeps trying to tell us that the Servers are the problem, and that his software is OK :-( . I believe myself that it is the query-ies, because when you try to look in the address data for a customer it takes about 5 Mins before you get a answer and sometimes the software freezes !. Our problem is also that we cannot chance the vendor ,because he is the only one in Germany that has this software. I also believe that the database and his software is'nt good enougth for so many users !!.

Reply With Quote
  #5  
Old January 4th, 2006, 10:14 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,907 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 3 Days 9 h 21 m 6 sec
Reputation Power: 279
Quote:
Originally Posted by mheron
Hi Mariuz,

we have tried everything you said. The vendor keeps trying to tell us that the Servers are the problem, and that his software is OK :-( . I believe myself that it is the query-ies, because when you try to look in the address data for a customer it takes about 5 Mins before you get a answer and sometimes the software freezes !. Our problem is also that we cannot chance the vendor ,because he is the only one in Germany that has this software. I also believe that the database and his software is'nt good enougth for so many users !!.
What OS are you using? Can you switch to ClassicServer? What does (in terms of SQL) mean "look for customer address", do you have properly indexed the table?
I've done some Firebird benchmarking in the past and it's speed was good.

Reply With Quote
  #6  
Old January 5th, 2006, 01:01 AM
mheron mheron is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Posts: 8 mheron User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 21 m 18 sec
Reputation Power: 0
The OS on the Firebird Server is Red Hat 8. The Citrix Server have MS 2003 Server.
I mean "Select from .........." in SQL.
We have no way to change anything. It is the vendor that made our Software & the Database. Every time we complain that everything is slow, he says that the network is the problem. We have a 1Gbit Netz, so very fast !, and a Fibre Glass Backbone.

Reply With Quote
  #7  
Old January 5th, 2006, 02:22 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,907 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 3 Days 9 h 21 m 6 sec
Reputation Power: 279
Quote:
Originally Posted by mheron
I mean "Select from .........." in SQL.
This means NOTHING in SQL, apart from that, ARE YOU USING CLASSIC OR SUPERSERVER? Are you aware that with proper backup policies in place you can load the entire database in RAM?

Reply With Quote
  #8  
Old January 5th, 2006, 07:57 AM
mheron mheron is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Posts: 8 mheron User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 21 m 18 sec
Reputation Power: 0
We have Firebird-Classic-Server Version 1.5.0.4290 .
How does it affect the performance when we load the database into RAM ? and how do we make proper backup policies, because we cannot aford to loose any data at all.
Do you agree with me that our Hardware and Network is not the problem ?.

Reply With Quote
  #9  
Old January 5th, 2006, 08:09 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,907 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 3 Days 9 h 21 m 6 sec
Reputation Power: 279
1. Can you check what the bottleneck is? Disk, CPU, memory ...
2. Can you check the actual sql statements issued and if proper indexing is in place?
3. Can you do a parallel test with current production Firebird (1.5.2)?
4. Loading the entire db in ram (i.e. copying file to ramdisk) should avoid disk usage ...
5. Google for GBAK and start backing up data

Last edited by pabloj : January 6th, 2006 at 02:49 AM.

Reply With Quote
  #10  
Old January 5th, 2006, 08:01 PM
clivew clivew is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2006
Location: Carlsbad, CA
Posts: 810 clivew User rank is Sergeant (500 - 2000 Reputation Level)clivew User rank is Sergeant (500 - 2000 Reputation Level)clivew User rank is Sergeant (500 - 2000 Reputation Level)clivew User rank is Sergeant (500 - 2000 Reputation Level)clivew User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 4 Days 5 h 46 m 49 sec
Reputation Power: 19
Quote:
Originally Posted by mheron
Do you agree with me that our Hardware and Network is not the problem ?.

Can not speak to the hardware; but if word docs are not
a problem it is unlikely that the network is the problem
IF the SQL queries
are properly designed to retrieve only the required data.
How many of the connected users are writing as oppose
to reading the data?
What happens to performance if you run the application when
no-one else is connected?
If the data is growing in size, how does performance degrade:
1. Little change?
2. Linear to the data growth?
3. Exponential to the data?
The answers to these questions should help you focus on
the most likely suspects.
Clive.

Reply With Quote
  #11  
Old January 6th, 2006, 02:15 AM
mheron mheron is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Posts: 8 mheron User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 21 m 18 sec
Reputation Power: 0
Hi Clive,
I would say that it is about 50-50.
I tried that already, and when nobody was online I started the application that we use, and the Performance was still terrible.
Performance degrade = Linear to data growth.

Rgds

Mark

Reply With Quote
  #12  
Old January 6th, 2006, 02:51 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,907 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 3 Days 9 h 21 m 6 sec
Reputation Power: 279
Still don't have the important infos ...
Quote:
Originally Posted by pabloj
1. Can you check what the bottleneck is? Disk, CPU, memory ...
2. Can you check the actual sql statements issued and if proper indexing is in place?
3. Can you do a parallel test with current production Firebird (1.5.2)?
4. Loading the entire db in ram (i.e. copying file to ramdisk) should avoid disk usage ...
5. Google for GBAK and start backing up data

Reply With Quote
  #13  
Old January 6th, 2006, 01:02 PM
clivew clivew is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2006
Location: Carlsbad, CA
Posts: 810 clivew User rank is Sergeant (500 - 2000 Reputation Level)clivew User rank is Sergeant (500 - 2000 Reputation Level)clivew User rank is Sergeant (500 - 2000 Reputation Level)clivew User rank is Sergeant (500 - 2000 Reputation Level)clivew User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 4 Days 5 h 46 m 49 sec
Reputation Power: 19
Quote:
Originally Posted by mheron
I tried that already, and when nobody was online I started the application that we use, and the Performance was still terrible.
Performance degrade = Linear to data growth.

You need to folow up on the questions from "pabloj". Especially the SQL statements and indexing.

If performance is terrible with only one user
the SQL definately merits review.

If performance degrades in a linear fashion with data then the
indexing of columns in WHERE and JOIN clauses need review.

Clive.

Reply With Quote
  #14  
Old January 8th, 2006, 02:17 PM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,907 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 3 Days 9 h 21 m 6 sec
Reputation Power: 279
Also, don't forget to refresh database statistics, see this interesting article on dotNetFirebird.org

Reply With Quote