LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-24-2010, 03:42 PM   #1
Dadoo
LQ Newbie
 
Registered: Jul 2006
Posts: 17

Rep: Reputation: 0
Record locking performance


I'm trying to install a new server and having performance issues with one of my applications. It's one of those brand new HP DL580 G7s, with 4 8-core CPUs, and 384GB (yes, gigabytes) of memory. The application we're using uses an ISAM database and, using "strace", I can see it does record locking through "fcntl". Also using "strace" I can see it's spending an enormous amount of time waiting for locks on one of the files it's accessing.

Now, I can understand why having multiple processes (on multiple CPUs) competing for the same lock would make the machine run slower than its potential. What I can't understand is why this machine is slower than a five-year-old AIX system with four CPUs. One operation in particular, that takes 1-2 seconds on the AIX system, takes as long as 3 minutes on our new Linux machine. (Naturally, it's an interactive process, so our users actually have to sit there and wait for those 3 minutes.) Again, most of the time is spent waiting for locks on that one file.

Originally thinking it was a memory bandwidth issue, I disabled all but 8 cores, all of which are on the same CPU, but that didn't help much. We were also running some fairly heavy-duty reports on the system at the time, and I would have expected them to slow down, too, but they were fine. I'm also inclined to believe it's not an IO issue, since 384GB is more than enough to contain our entire database.

The only other thing I can remember to mention is that we're running RHEL 5.5, fully up-to-date.

Can anyone shed any light on why we're having this problem and what I might do to fix it?

Thanks
 
Old 10-24-2010, 05:10 PM   #2
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
Depending on how you're using your database it might be best to switch that table to innodb that allows row level locking. What happens in ISAM is that when a record needs to be update (and for particular reads) the entire table is locked blocking other queries from completing (even though you have plenty of resources to handle this). With innodb you only lock the particular row in question rather than the whole table enabling you to have a much larger concurrency for writes and particular reads that would otherwise lock the entire table.

Regards,

Alunduil
 
Old 10-25-2010, 04:21 AM   #3
Dadoo
LQ Newbie
 
Registered: Jul 2006
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by alunduil View Post
it might be best to switch that table to innodb that allows row level locking.
We're not using a database engine. It's a proprietary, old-school ISAM database. The actual application is written in a language I doubt anyone here has heard of (Databus). Imagine a cross between assembly language and Cobol, with some ISAM database access statements built in.

Unfortunately, it's a third party application, and I don't have access to the source. Otherwise, I'd fix it myself.
 
Old 10-25-2010, 08:06 AM   #4
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
Out of curiosity what configuration are the drives for this server in?

Regards,

Alunduil
 
Old 10-25-2010, 03:20 PM   #5
Dadoo
LQ Newbie
 
Registered: Jul 2006
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by alunduil View Post
Out of curiosity what configuration are the drives for this server in?
RAID 5. It seems like the best configuration, since reads from our database significantly outnumber writes. Is that really relevant, though, given the amount of memory in the server?
 
Old 10-25-2010, 04:35 PM   #6
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
Depends on how your buffers are setup but since it's a custom application I'm not sure where you would begin poking.

Regards,

Alunduil
 
Old 10-25-2010, 06:42 PM   #7
Dadoo
LQ Newbie
 
Registered: Jul 2006
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by alunduil View Post
Depends on how your buffers are setup but since it's a custom application I'm not sure where you would begin poking.
Well, I know for sure, there is no explicit buffering in the high-level application code. There may be some buffering in the lower-level interpreter code, but I doubt it. From everything I've heard, I'm pretty sure the interpreter is just using Linux read(2) and write(2) system calls, directly - relying on Linux to handle all the buffering.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Oracle(R) Database Standard Edition One and Oracle Enterprise Linux on HP Set New World Record for Price Performance with TPC-C Benchmark LXer Syndicated Linux News 0 06-12-2007 05:01 PM
Record Locking & Lost Utilities ostrowlaw SUSE / openSUSE 4 04-29-2007 03:39 PM
Record Locking & Lost Utilities ostrowlaw Linux - Networking 1 04-24-2007 08:45 PM
Unable to record mic-in with SoundBlaster Live! while able to record other sources max76230 Linux - Newbie 2 03-14-2005 04:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration