Disk Write Caching
Nov 30, 2007
What's the best practice when it comes to disk write caching? Is it better to enable or disable this feature?
Thanks.
What's the best practice when it comes to disk write caching? Is it better to enable or disable this feature?
Thanks.
I needed to do lookup on tables with approx 1 million records (how else do I know if record already exists?).
View 7 Replies View RelatedDuring investigation problem with disk i found some issue, that every 2 minutes is writing on disk , it looks like to mdf file of database, but in almost 6-8milions Bytes / sec , it is about 1-2 sec , but every 2minutes... this is normal behaviour ? this is synchonyous writing to disk from memory.
View 4 Replies View RelatedI have do some benchmark test between the "Principle", "Mirror" and "Witness", things seems normal, the System usage (CPU, Disk Read/Write) on the "Witness" is very small and the CPU usage on Principle and Mirror is similar, However....
For the "Disk Write Bytes/sec", the usage on Principle is 200,000 and the Mirror is 1,500,000, the mirror server is talking about x7 times Disk Write Bytes/sec on the Mirror.
I cannot think of any reason why the Disk Write Bytes /sec is so much higher than the Principle, can somebody help me?
We are collecting perfmon counters every 15 second . Among the counters is Average Disk sec/Write . I under stand that it is the average time taken in second to write a data to the disk. However I do not understand what the is quantum of data written in one second. What is the measure or unit of data in Average Disk sec/Write or is it simply the average time taken for an I/O write request.
View 4 Replies View Relatedhello,all
I am new to Sql 2000,I installed sql 2000 database in C disk,but Now I found my C disk space is smaller than before,So I want to move my databse(include data and structure) from C Disk to D Disk(its space is very large) .
is it possible to do it ?
if its can be done ,do I need to change my asp.net program source code (exp: chaneg my crystal report connectstring ) ?
thanks in advanced!
If I return the Average, Minimum, and Maximum values for the counter Physical Disk: Avg. Disk Queue Length, and those values are 10, 0, 87 respectively, which value do I use to compute the Avg. Disk Queue Length for a 4 disk array(RAID 10): Average, Minimum, or Maximum? The disk(lun) is on a SAN.
-- Initialize Control Mechanism
DECLARE@Drive TINYINT,
@SQL VARCHAR(100)
SET@Drive = 97
-- Setup Staging Area
DECLARE@Drives TABLE
(
Drive CHAR(1),
Info VARCHAR(80)
)
WHILE @Drive <= 122
BEGIN
SET@SQL = 'EXEC XP_CMDSHELL ''fsutil volume diskfree ' + CHAR(@Drive) + ':'''
INSERT@Drives
(
Info
)
EXEC(@SQL)
UPDATE@Drives
SETDrive = CHAR(@Drive)
WHEREDrive IS NULL
SET@Drive = @Drive + 1
END
-- Show the expected output
SELECTDrive,
SUM(CASE WHEN Info LIKE 'Total # of bytes : %' THEN CAST(REPLACE(SUBSTRING(Info, 32, 48), CHAR(13), '') AS BIGINT) ELSE CAST(0 AS BIGINT) END) AS TotalBytes,
SUM(CASE WHEN Info LIKE 'Total # of free bytes : %' THEN CAST(REPLACE(SUBSTRING(Info, 32, 48), CHAR(13), '') AS BIGINT) ELSE CAST(0 AS BIGINT) END) AS FreeBytes,
SUM(CASE WHEN Info LIKE 'Total # of avail free bytes : %' THEN CAST(REPLACE(SUBSTRING(Info, 32, 48), CHAR(13), '') AS BIGINT) ELSE CAST(0 AS BIGINT) END) AS AvailFreeBytes
FROM(
SELECTDrive,
Info
FROM@Drives
WHEREInfo LIKE 'Total # of %'
) AS d
GROUP BYDrive
ORDER BYDrive
E 12°55'05.25"
N 56°04'39.16"
Hello,
I am trying to setup a test cluster and am having an issue. When I try to create the resource of a physical disk it takes both the drive e: and drive q: and doesn't seperate them into two physical disks as resources. This means when I try to associate the quorum disk it links the to physcial disk resource of drive e and q. Then when I try to install SQL2k5 I get the warning about installing SQL on the quorum disk. Am I missing something? Is there a way to seperate e and q onto two physical disk resources so I can specifically associate the quorum to q and the sql to e or should I be setting the quorum disk to a majority node set? Thanks in advance.
John
Hello,
this is my configuration :
1) 3 disks in RAID5 that hold the SQL data
2) 1 disk in RAID0 that holds the only paging file.
What will happen to the SQL data (DB) when the disk that holds the paging file crashes?
Kindest regards,
Luc.
Hi all,
Ok here goes,
I have a three tier system using SQL server 2000, we are currently experiencing IO bottle necks on our SCSI Raid 10 array, which holds the Data and the logs in separate partitions.
So my options as I understand it are:
Get Enterprise edition
or
Get another physical raid 10 array and separate the logs and data i.e. data on one array and logs on the other array.
I would like to try the latter but I am totally unsure how much difference this will make or whether it will make any difference at all.
Does anyone know how much performance increase I will get from using two arrays as opposed to one?
Any other advice on this scenario would be greatly appreciated.
Thanks
Hi All,I have an application that reads data from a very slow database link(like 10 seconds per call) though what I am looking for would be ofgeneric use for anyone who has long-running queries that arefrequently repeated.I would like to be able to cache the results of a query so that I donot have to re-execute that query if it is reissued. Ideally Ibelieve that this could be implemented by hiding the query inside aUDF and exposing the UDF through a view. The UDF could then "Checkthe cache" and only run the slow query if there wasn't a match (or ifthe match was too old). From what I understand the best way to dothis would be for the cache to be an extended stored procedure.Has anyone done or seen this? Has someone written a copy that Icould purchase? Does anyone care to offer their opinnion of how or ifthis could work?Thanks in Advance,Steven
View 4 Replies View RelatedHello All,
I want to use SQLDataSource as a base of all Gridview in my application. I have read that SQLDataSource support caching.
I want to know as SQLDataSource is a child control of page class. It will get unloaded when page is unloaded. So how caching works. Like I am using SQLDataSource as base of my GridView control. When I perform paging or sorting,In theory It says that It will not hit the Datbase again. It will keep that Data in memory as DataSet, but this will stay alive upto life of page, which starts again and again when a page is requested, So as its child controls.
Can anybody give me more intrinsics on this.
Any Help from Microsoft is appreciated !!!!
Thanks !!
I know I can use the SqlDataSource object and cache the results by setting it's enableCache property to true, but what if I am using essentially the same SqlDataSource control across multiple pages? For instance I have a States SqlDataSource on many pages in my site, if I enable caching on all of these objects won't they all be cached separately? Is the solution to not use the SqlDataSource and instead cache the datatable of results and bind the dropdownlists to that? Thanks in advance.
View 1 Replies View RelatedHi Expert, Am I doing it right? Can you give me any suggestions please? Thank you!!I followed the way for setting up the sql cache dependency from http://quickstarts.asp.net/QuickStartv20/aspnet/doc/caching/SQLInvalidation.aspx.However, I still have the following error:
When using SqlDependency without providing an options value, SqlDependency.Start() must be called prior to execution of a command added to the SqlDependency instance.
IssueSummary.aspx<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="IssueSummary.aspx.vb" Inherits="IssueSummary" title="Issue Summary" %><%@ Register Assembly="AtlasControlToolkit" Namespace="AtlasControlToolkit" TagPrefix="cc2" %><%@ Register Assembly="Microsoft.Web.Atlas" Namespace="Microsoft.Web.UI" TagPrefix="cc1" %><%@ OutputCache Duration="999999" VaryByParam="None" SqlDependency="CommandNotification" %>
Global.asaxSub Application_Start(ByVal sender As Object, ByVal e As EventArgs)Dim connectionString As String = ConfigurationManager.ConnectionStrings("ICTConnectionString").ConnectionStringDim needToInstall As Boolean = TrueTryDim tables() As Stringtables = SqlCacheDependencyAdmin.GetTablesEnabledForNotifications(connectionString)If (Not tables Is Nothing) ThenDim tbl As StringFor Each tbl In tablesIf (tbl.ToLower().Equals("IssueDetails")) ThenneedToInstall = FalseEnd IfNextEnd IfCatch ex As ExceptionneedToInstall = TrueEnd TryIf (needToInstall) ThenSqlCacheDependencyAdmin.EnableNotifications(connectionString)SqlCacheDependencyAdmin.EnableTableForNotifications(connectionString, "IssueDetails")End IfEnd Sub
Web.config<connectionStrings><add name="ICTConnectionString" connectionString="Data Source=jamesle-3;Initial Catalog=IssueCommunicationTool;Integrated Security=True" providerName="System.Data.SqlClient"/></connectionStrings><system.web><caching><sqlCacheDependency enabled="true" pollTime="1000" ><databases><add name="ICTDB" connectionStringName="ICTConnectionString" /></databases></sqlCacheDependency></caching>
SQL Server 2005 - Database - IssueCommunicationToolSELECT is_broker_enabled FROM sys.databases WHERE name = 'IssueCommunicationTool'
Return = 1, it means the broker service is enabled. Also, the database has created the table ASPNET_SQLCacheTableForChangeNotification, the trigger in IssueDetails table, and some other store procedures.
Hello, I have caching enabled in my application and I am using SqlCacheDependency to cache my tables. Well, the cache works fine but when the table is updated the information in my cache does not update. I DO have the broker service started and running but not sure what else i am missing. I am using sql server 2005.
View 1 Replies View RelatedI have a control that shows the top 5 best selling products. Thes list does not need to be up to date at all times. Ideally I would like to cache the data for say 24hr before pulling it again if someone accesses the control. I thought there was an easy way to do this, but I can't seem to find anything. Can anyone point me in the right direction.
View 7 Replies View RelatedHi, I'm trying to set up a SqlCacheDependency using the Query notifications of SQL Server 2005.
I haven't even got to the point of testing the notifications part. My problem is that my DataTable is not
even getting stored in the cache when I insert it. The cache seems to be getting invalided as soon
as I add the DataTable. Here is my code:
(am trying to get a simple example working first)protected void Page_Load(object sender, EventArgs e)
{ DataTable results = (DataTable)HttpRuntime.Cache.Get("supplyFunctions");
if (results == null)
{ Response.Write("Cache Invalidated, hitting DB. TIME: " + DateTime.Now.ToString());
results = getSupplyFunctions();
}
else
{ Response.Write("got from Cache, TIME: " + DateTime.Now);
} GridView1.DataSource = results;
GridView1.DataBind();
}private DataTable getSupplyFunctions()
{ DataTable results = new DataTable(); using (SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ToString()) )
{ using (SqlCommand command = connection.CreateCommand())
{
command.CommandText = "schema.myStoredProc"; command.CommandType = CommandType.StoredProcedure;
SqlCacheDependency dependency = new SqlCacheDependency(command); SqlDataAdapter adapter = new SqlDataAdapter();
adapter.SelectCommand = command; DataSet dataset = new DataSet();
adapter.Fill(dataset);
results = dataset.Tables[0];
HttpRuntime.Cache.Insert("supplyFunctions", results, dependency);
}
} return results;
}
Also, whats weird is that when I keep refreshing the page, after like 5 to 10 minutes it works, and starts caching the data.
This disturbs me-- I would like to know what is going on. I am pretty sure my stored procedure doesn't break the rules of the query notifications. Can someone help me out?!??!
Thanks!
Question for all Cache Gurus
I have a page in my website that pulls content for a
newsletter from a SQL Server 2000 database using a SqlDataSource and a
FormView. I add a new newsletter every week. Other than that weekly addition,
no changes are really ever needed or made to the data. Scott Gu says every
application can and should make use of caching and I would like to add some
kind of caching to improve the performance of this page. I have read about SqlCacheDependency with SQL
2000, but if I understand it correctly, it will poll the database for changes
every x seconds, an expensive operation that I just don’t need; the data only
changes once a week. I’ve seen some code examples using DataSets and the Cache
API but I’m really just looking for a simple, mostly declarative solution using the
SqlDataSource. Theoretically, I would
like the data cached forever until I insert a new item. I have set the
following cache-related properties on my SqlDataSource as follows:
EnableCaching = TrueDataSourceMode = DataSetCacheDuration = InfiniteCacheExpirationPolicy = Absolute
Setting these properties seems to work great for caching the
data but how do I programmatically invalidate the cache when a new item is
inserted? I have a separate admin page with a FormView that I use to insert the
newsletter each week. Is there some kind of code that I could put in the
ItemInserted event that would invalidate the cache so that the new item will be
displayed and then cached? I don't have any experience with caching; where am I going wrong? Are my expectations unrealistic? Thank you in advance to anyone who can shed some
light on this issue.
I've recently deployed an ASP.Net application, with admittedly not a lot of experience with SQL Server 2005 caching.A problem that I ran into is a user searching for a case number very soon after entering it, and it not showing up. However, after a few minutes and re-running the search it appeared.I'm guessing that this is a SQL Server caching issue, but I'm not sure what to do about it.On my search screen, I have a listview for the results, a textbox for the case # input, a button and a sqldatasource. The SqlDataSource uses a select statement, and two parameters for user(ensure the case belongs to that user) and casenumber. The SqlDataSource has enablecaching set to false. Any ideas what I can do about this issue? Also, any good places I can read about sql server caching? Thanks
View 4 Replies View RelatedI'm trying to performance tune a procedure and am sort of being thwarted by caching.
When I first run the procedure, it takes a few seconds which is too long in this case. Subsequent executions in Management Studio are nearly instantaneous, though, which I imagine is due to caching and does not reflect the behavior of the procedure in production.
Is there a way to disable caching so that each execution of the procedure in Management Studio will be consistent and reflect the "first run" performance?
Is there a way to manage the cache when a file is being FTP'd from a server? It writes the file to the d: drive but caches it to c: first. Can I add a command line switch to tell it not to cache the file first?
Thx
Hi,
I have prepared a time series model. The model works well with few cases. Answering time raises extremly after processing the model with all cases.
In a book I read sth. about a cahing possibilty. But how can this be defined in Visual Studio ?
Thanks in advance
Achim
Is it possible expire a report cache after less than one minute? I'm looking for a way to only have a report hit the database once every 10 seconds, no matter how many people are hitting it. Thanks.
View 1 Replies View RelatedHello Experts,
If i use the caching feature of the report. is there a way i can find or set in the report itself if the user if renedered from cache or actually connected to the database.
i mean if ON the Caching, for the 1st user the data will come from DB and the report manager stores the report in cache. next user if he tries to connect should get a message that the report was rendered from cache - taken 5 min back.
any possibility in reports.
/Soni
I have SQL Server 2005 and I am using .Net 2.0.
Is there a way to cache a query, basically I am going to do a SELECT * on a table that is called frequently.
I then want to query this DataTable that is in cache. I want to invalidate the cache when the table changes.
Everything I have read tells me to use the output caching directive. But, much of what I am doing doesn't end up in the output. Is there a way to invalidate the cache the same way without output caching and using the Service Broker?
Hi everyone!I tried to set my SqlDataSource's SelectCommandType to be a stored procedure. However the SqlDataSource failed to cache it. But if I just copy paste my stored procedure's content to my SqlDataSource's SelectCommand property, the cache just works. Is "StoredProcedure" as the "SelectCommandType" is not supported when caching the data? Or am I missing something here? Please help.
View 1 Replies View RelatedHello all,
I've got an application that calls a really simple stored procedure - just selects all records from the dbase. The problem is this seems to cache every now and then and as the same table is updated very frequently by other users this means the data returned isn't up to date. I thought it was Sql Server caching the results of the stored procedure, but I can do an iisreset and it will be up to date again. And unless I'm missing some point iisreset has no bearing on Sql Server. So is there an application data cache somewhere that I should be clearing to ensure the recordset is always up to date?
I'm in the process of optimizing a fairly large ASP.Net App.
One of the things I want to do is enable SQL Dependancy caching. I've set this up fine SQL2005 side but need a bit of advice .Net Side. I know if you use the SqlDataSource class you can set it to use the caching, unfortunatly this projects Datalayer uses the SqlDataAdapter is there any way of making this use SqlDependancy chacing?
Hope that makes sense and doesnt sound too dumb.
Thanks
I am wonder if i could use caching if i am using a stored procedure to select records from several tables? If so how do i accomplish this?
View 1 Replies View RelatedHi..I have a large database which powers an old ASP website, until I have time to migrate the old ASP pages over to .NET I was wondering if I am able to use any caching settings in SQL Express 2005??What I mean is, can I long in to SQL using the management interface - And set up some sort of caching for the databases I have in there? I wanted to cache the database for say 10 seconds.. As I get alot of hits on the site and this would help speed things up / save resources.Any tips / help appreciated...ThanksAlso I don't want to get into hacking around with the ASP code... As I am in the middle of migrating the pages, hence I was hoping this would be the quickest way if it was possible
View 2 Replies View RelatedHello, every one! This is my first post on the forum. I got some questions about caching data with SqlDataSource controls in asp.net 2005. Here are them: According to the vs.net 2005 documents, SqlDataSource controls will sustain an individual cache for each combination of ConnectionString, SelectCommand and values of SelectParameters. But how about FilterExpression and FilterParameters? If I enable caching and change the FilterExpression or values of FilterParameters, will the SelectCommand be reexcuted, or will the databinding controls just get data from the existing cache? And will multiple SqlDataSource controls with the same combination of ConnectionString, SelectCommand and values of SelectParameters share a common cache, or sustain caches of their own?
View 1 Replies View RelatedIs there any way to find out what SP's are cached? Top ten Stored PRocs used or anything close?
THanks,
David