cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Microsoft SQL server - Memory and CPU requirements - based on existing Database Size?

kszemes
9-Granite

Microsoft SQL server - Memory and CPU requirements - based on existing Database Size?

Hi,

 

We have a customer who stores CAD files in FileVaults (more tha 8TB), so Microsoft SQL Database contains theoretically only the metadata.

 

The size of the SQL Database is  greater than 200GB.

 

There is a dedicated VM for SQL server with 128GB Memory and 8vCPU.

 

The customer has some performance issues with for example complex queries.

Somethimes this query runs fast - 5-10 sec - but other time tis query runs 5-10 minutes! 

 

An SQL expert adviced to our customer to use at least 1-1,5 times more memory for SQL Server than the existing database size.

 

This can be a good way to handle performance issue?

 

Thanks,

 

Károly

 

7 REPLIES 7
rleir
17-Peridot
(To:kszemes)

SQL Performance Tips

  • understand the relational data model
  • choose 'key' fields carefully, for use as indexes
  • avoid subqueries
  • avoid storing large BLOB data
  • (others: please chip in!)
mmeadows-3
13-Aquamarine
(To:kszemes)

Most Windchill system administrators are not SQL Server certified DBAs.  Fortunately, PTC has given SQL Server a lot of attention and provided various recommendations for optimizing it.

 

Start with general cleanup and performance tuning recommendations.

 

If these don't help, log a performance call with PTC Technical Support.  They will want you to perform the slow running actions and send them the performance tables.

windchill wt.util.jmx.ExportPerfTables -chunkSize 20000 perftables.gz

 

If the system is performing well and it is just these queries that suffer...  What do you mean by 'query'?  Are these customizations or reports?

Hi,

 

thanks for cleanup and performance tuning recommendations summary.

I will try to catch a SQL Expert and we will review these and will make a plan to execute these steps.

 

They have lot of Query Builder based reports.

There are some queries that can be run to reproduce the performance issue.

 

But there are performance issues one or two day a week when the system got stuck without running these aformentioned queries.

The CPU utilization is on 100% in every Core for a couple of hours. The memory usage is 90% by default. (All free memory is reserved by MS SQL Server - 115 GB)

 

Thanks!

 

 

 

mmeadows-3
13-Aquamarine
(To:kszemes)

Ultimately, the answer may be to throw more resources at it.  But it feels like the slow reports are a symptom of an underlying issue.

 

You can use JConsole (windchill wt.util.jmx.SMJconsole) to try to identify what is running during these lockups.  Select the Windchill tab to see what is running at the moment.  The ElapsedTotalCpuSeconds column may be useful.

mmeadows3_0-1711380196028.png

 

It may not be Windchill/DB related.  For example: Antivirus scanning can consume all processors for a period of time.  If Defender antivirus and a third-party antivirus are both running, it can lock up a server for hours.

PTC Tech Supt's performance team can help direct you to the source of the issue.

 

TomU
23-Emerald IV
(To:kszemes)


@kszemes wrote:

An SQL expert advised to our customer to use at least 1-1,5 times more memory for SQL Server than the existing database size.


I'd be cautious trusting this expert.  SQL server can perform worse with too much memory.  Even for the largest of installations, PTC never recommends any such ratio.

 

1.)  SQL Server will eventually consume all of the memory made available to it.  This is by design, and why it's important to configure an upper limit based on what is actually available on the server.

 

2.)  Most SQL Server installations have only a fraction of the RAM compared to their data size.  It is possible to analyze SQL Server and determine if the RAM is actually the bottleneck.

 

kszemes
9-Granite
(To:TomU)

  • min server memory set to 0.
  • maxserver memory set to 115GB

Hello @kszemes,

 

It looks like you have some responses from some community members. If any of these replies helped you solve your question please mark the appropriate reply as the Accepted Solution. 

Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.

Thanks,
Community Moderation Team.

Top Tags