Go Premium for a chance to win a PS4. Enter to Win


Server Performance after RAM upgrade

Posted on 2008-06-17
Medium Priority
Last Modified: 2013-11-10
Pervasive SQL 9.1
Windows 2000 SP 4 on Intel XEON 2ghz machine

I was having performance issues on this server on one particular query.  I copied the entire database to a newer machine and had no problems.  The query would run for up to 60 seconds on the older machine, in my web application it would of course time out.  On the newer machine the query ran anywhere form instantly to 2 seconds.

The old machine only had 500 MB RAM so my first choice was to upgrade the RAM.  So I added 2 GB to the old server.

Here is the problem.  Now all of the queries run in about the same amount of time.  7-12 seconds.  That is of course a big improvement on the one query I was having trouble with and that speed is almost acceptable.  The bad thing is that the queries that ran instantly on the old RAM configuration now take as long as the slow one (7-12 seconds)

I monitored the database while accessing the website and the lag time is in the database or at least it is staying connected to the table while the wait time is happening.

My Processor load never goes over 57% during the queries.  Some of these (now) slow queries are single row indexed selections

I have attached the configuration for performance tuning and memory usage.  I have not adjusted them.

Question by:bcolladay
  • 5
  • 3
LVL 28

Expert Comment

by:Bill Bach
ID: 21804739
A few ideas:
1) Increase the L1 database cache from 100MB to 400MB.  With 2GB of RAM, you have plenty of room for L1 cache, which is where the real work gets done, anyway.
2) Try patching the engine.  V9.1 can be a bit on the unstable side, and num erous improvements were added in both v9.50 and in v9.52.  Get both from Pervasive's web site.  You must apply v9.50 patch FIRST, and then do the 9.52 update afterwards.  Be sure to do both clients AND the server.
3) Monitor the database using Pervasive's Monitor and watch the database connections from the Active Users screen.  See how many disk versus cache accesses are being generated.
4) Try running your queries manually from the Pervasive Control Center (PCC) and see if you see the same results there.  It could be a connection-delay issue and not related to query performance at all.  
5) If they are still slow there, try enabling the Query Plan Viewer and review the query to make sure that indices are available for the query to optimize on.

Author Comment

ID: 21805037
I tested my query from control center and it runs instantly.

I watched the active user monitor and it shows overwhelmingly Cache access for all users.  A ratio of about 2000 cache accesses for every 1 disk access.

We were getting ready to do the 9.5 patch when we noticed the slowness after ram.

I'll change the L1 cache next chance we get to restart.

Also the windows swap file was set at 4gb minimum and maximum.
LVL 28

Expert Comment

by:Bill Bach
ID: 21805071
If the query runs instantly, then the query or the database is not the problem.  Perhaps you have a problem in the web server with name resolution to the database.  Make sure that the DNS servers are set correctly on the server, and that it you do a DNS lookup, you get the right address instantly.

You could also try getting a network capture from the web server doing a single function call, and see where the time goes...
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.


Author Comment

ID: 21805318
Okay, it is sporadic.

The same query I ran that was instant on the local Control Center a few munites later was taking 10 seconds or more.  And the sporadic nature is the same on the local control center and the web site.  The local network users are also seeing sporadic slowness.

Since this happened right after a RAM upgrade does it sound like it could be bad RAM?  

Can I set my L1 cache to 1 GB? I currently have it set at 100 MB and my available RAM in Task Manager shows 1.8 GB avail
LVL 28

Accepted Solution

Bill Bach earned 1000 total points
ID: 21805559
You can, but it is not recommended.  The PSQL process, like all other 32-bit processes, are limited at 2GB of virtual memory space.  If you opt for 1GB of L1 cache, then you'd want to disable L2 cache (Max Microkernel Memory Usage = 0).  Even so, with SQL users, each new connection creates a new SQL thread, which increases memory use even further, so be sure to monitor your "Virtual Bytes" value in PerfMon (not TaskMan, which is a different value).

When you see slowness, what does the disk:cache ratio look like?  If you see lots of disk activity, then it means that your database is much larger than cache, and pages are getting swapped out.  

Author Comment

ID: 21806250
Well now I can't get it to slow down....

Author Comment

ID: 21812772
I will come back after I get a chance to upgrade to 9.5x and reset the memory settings on the server.  This machine is in another city and can't be restarted during the day.  I have to schedule the down time with the client.

Thanks for your help.

Author Closing Comment

ID: 31468026
I upgraded to 9.5x on the server engine and all of the clients.  Oddly enough after the first morning of the RAM upgrade I haven't had the slow down again.  I am accepting this answer because of the memory performance tuning suggestions.


Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In this article, I’ll look at how you can use a backup to start a secondary instance for MongoDB.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question