Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: Database: MS SQL Server
 What do you suggest for MS SQL settings?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

SiSL
Average Member

Turkey
671 Posts

Posted - 31 October 2005 :  16:14:46  Show Profile  Visit SiSL's Homepage
I've been using SQL for long time, however, when seeing peoples response timers here, I would like to learn the main trick...

I have 4 large snitz boards on same server, setup on Windows 2003 standard server, (currently only Snitz are mainly working in SQL), rest was test purposes. All 4 boards are ofcourse at different databases...

Main files of SQL in C:\Program Files\MS sql blah blah..

Database location is at Harddisk D:\ so logs there too...

My server has been set to use 1024 mb's of physical ram "fixed"...
MS Search currently running, DTC running... max worker threads 4096 set in memory, nested triggers on and 2000 query time out stuff..

But still most of the time, my websites having slow generate times.

I'm not sure if this is SQL speed or am I doing really wrong..








CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 31 October 2005 :  18:20:06  Show Profile  Send ruirib a Yahoo! Message
A bit (well maybe more than a bit) more RAM wouldn't do any harm. Placing DB's in one disk and logs on another would be good too.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 31 October 2005 :  19:57:18  Show Profile  Visit SiSL's Homepage
transaction logs you mean?

How may I change their locations? And you also mean that I have to add non static psycihal memory also?

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod

Edited by - SiSL on 31 October 2005 20:31:00
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 31 October 2005 :  21:18:10  Show Profile  Send ruirib a Yahoo! Message
Yeah, I meant transaction logs.

To move the transaction log, I would advise a database detach, the move of the log file to a new destination, and then a database attach. For example, to do this to a database named MySNitz, in Query Analizer you could do this:

sp_detach_db 'MySnitz'

Then with Windows Explorer, move the log file ('MySnitz_log.ldf' in the example) from the usual location (C:\Program Files\Microsoft SQL Server\MSSQL\Data), to the new disk location.
Attaching the DB can be accomplished with this, assuming I'm moving the log to the root of d:

sp_attach_db 'MySnitz', 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\MySnitz_data.mdf', 'd:\MySnitz_log.ldf'


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

pdrg
Support Moderator

United Kingdom
2897 Posts

Posted - 01 November 2005 :  05:29:12  Show Profile  Send pdrg a Yahoo! Message
A regular mantra here at HQ is 'do not run IIS and SQL on the same box', so if you can divide the hardware, it may help a lot. RAM - if you can go up to 4G, do so, just as a rule-of-thumb. In fact I think W2K3S can support upto 32G, but that would just be silly in your case ;-)

Which version of W2K3S and SQL SErver are you running? Proper enterprise ones (ie expensive licenses) or developer ones/MSDN ones/whatever? Cheap/free/etc ones are crippled, so you may get some performance gains from license upgrading, talk to MS about it or have a good dig around on microsoft.com.

detaching and reattaching the db is so simple as rui suggests above, or if you're nervous, it's all available through Enterprise Mangler too. Practice with Northwind and/or Pubs db's first, then you'll only have to go offline for maybe 30-seconds per db.

Also, check your logs are truncating OK, or use the detachment/reattachment as an opportunity to rebuild them altogether.
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 01 November 2005 :  10:31:13  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Will having the database file on the same drive (C:) as the operating system incur a performance hit?

Earlier this year I moved all non system databases files & logfiles to two seperate drives. It certainly made a difference. Is there a benefit also in moving the master, tempdb, msdb, model, databases too?

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 01 November 2005 :  11:28:01  Show Profile  Visit HuwR's Homepage
quote:


Will having the database file on the same drive (C:) as the operating system incur a performance hit?

Yes, some, but not that much, the important thing is to seperate log and data files, and if using fulltext searching, you should also be careful where you keep the catalogs. Placing the data files on a striped raid set will also give a big performance increase.
quote:
Is there a benefit also in moving the master, tempdb, msdb, model, databases too?

Moving tempdb will give some speed improvements, the others shouldn't make that much difference

Go to Top of Page

pdrg
Support Moderator

United Kingdom
2897 Posts

Posted - 01 November 2005 :  11:34:44  Show Profile  Send pdrg a Yahoo! Message
quote:
Will having the database file on the same drive (C:) as the operating system incur a performance hit?


Probably, some, but easily mitigated with a bit of RAM. Try it

quote:
Earlier this year I moved all non system databases files & logfiles to two seperate drives. It certainly made a difference. Is there a benefit also in moving the master, tempdb, msdb, model, databases too?


Master - maybe a little bit, not much at all
tempdb - if you use #temp and ##temp tables, certainly, maybe a bit otherwise, depending on your code
msdb - unlikely
model - no.

Look up 'System Databases and Data' in Books Online (SQL Server Help, by any other name) for details on how the 4 system db's work, and it'll all make sense, or you'll come back and challenge my comments, which is OK too
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 01 November 2005 :  11:55:11  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
I don't have any db's on the c drive. I have two other drives for db & log files only. I didn't think moving the system db's would make much difference. Certainly not worth the hassle.

Memory gives the "biggest bang for your buck" performance increase in my view.

SiSL, have you defragged your drives recently?

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 01 November 2005 :  14:40:37  Show Profile  Visit SiSL's Homepage
Yes I did...

Main performance hit occurs when using recordsets such as in rs.movenext or do..loops. I'm not really sure what causing this, recordsets are just fine with access db's but not with SQL.

As I said, my DB's are at different drive than C: also, so that's a plus. However not sure if my other settings were fine or not..

Also not sure if using virtual memory for SQL any good too. Because currently I can't get it past more than that :(

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod

Edited by - SiSL on 01 November 2005 14:44:30
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 01 November 2005 :  15:04:44  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Is there 1GB of ram in the machine? and you've set Sql Server to use 1024 mb?
Can you use the task manager to see which processes are using memory and how much? You could try disabling unnecessary services and setting the IIS Application Pool & SQL server to use equal amounts of ram e.g. IIS 448 MB, SQL Server 448 MB leaving 128 MB for the OS, etc. IIS could probably perform well with less memory but you can experiment.

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 01 November 2005 :  16:37:12  Show Profile  Visit SiSL's Homepage
Well, total 2 GB of ram, but 1GB reserved for SQL.

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 01 November 2005 :  17:11:54  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
That means theres another 1GB for IIS & the OS. You should use the task manager to find out how much memory w3wp.exe is using. There may be multiple instances of it.
In the application pool which serves the website for the forums is there a limit set on the amount of memory used?
Open IIS, click the + beside application pools.
Right click the application pool for the corresponding forum website and select properties.

It should tell you if there are any memory limits, request or cpu throttling, etc. Obviously you want to make use of all the available ram either by giving some extra to MSSQL or IIS.

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 01 November 2005 :  20:00:48  Show Profile  Visit SiSL's Homepage
There is no limit on any website really, but sometimes (probably because of old wrongly written asp codes) w3wp taking up all CPU (such as a search operation) and can't clean up those codes so I had to limit them to 30% CPU max for rest of websites to work. Beside that it was doing same slowness (and no reason I can think of beside SQL)

Currently 1GB of ram reserved for SQL, 1GB reserved for rest of IIS & OS, (which is currently w3wp(s) takes 720 mb's, sql takes 875 mb's of ram)

Thanks for responses, I've still got a lot to learn about it :)

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.85 seconds. Powered By: Snitz Forums 2000 Version 3.4.07