Ever looked at Performance wizard and seen a significant potion being taken by string.Format? one day I have and decided to try and find a faster string.Format, it took a couple of hours and I came up with a way to cache the static and dynamic portions of the string which speed up things by a bit, but not enough to permanently integrate it into the project, maintenance time is not worth it. But if you're program relies heavily on string.format and the difference you have with 1 million executions is worth the 100-500 ms you'll...
Monday, March 21, 2011
Saturday, March 19, 2011
Network information and tracing
We all have these times where we offer help or asked to do things outside our job description, some more reasonable then others, this tool was written to help those times and shorten the time we did something else so we can get back to the more interesting stuff. Here are some of the features: Fully multithreaded Tabbed browser-like environment Whois client, you can add your servers easily! Traceroute and see estimated distances between nodes. Watch your routes on the globe! ASN/Peers information Get Abuse emails for your hostnames Check if your IPs/Hostnames are...
Tags: C#, dns, trace route, whois
Thursday, March 3, 2011
Using FTP to Sync
I've needed a script to sync a remote folder, its a folder that is used to get updates dropped into it but I wanted to download only non existing files, I've found a script on dostips, which I've used for a while until I've stumbled on their note "Since all files are passed into the FTP`s MGET command there might be a limit to the number of files that can be processed at once." So I've changed the script, it batches downloads, you can specify how many files to download in a batch,...
Tags:
Checking SQL Load by Top Queries
So you're checking you SQL server, you see the CPU is very high for long periods of time or your users complain the database is slow, where can you start looking? Well, we can check the load and what is causing it. The basic query is: SELECT TOP 500 total_worker_time/execution_count AS [Avg CPU Time], (SELECT SUBSTRING(text,statement_start_offset/2,(CASE WHEN statement_end_offset = -1 then LEN(CONVERT(nvarchar(max), text)) * 2 ELSE statement_end_offset end -statement_start_offset)/2) FROM sys.dm_exec_sql_text(sql_handle)) AS query_text, creation_time, last_execution_time, execution_count, total_worker_time, last_worker_time, min_worker_time, max_worker_time, total_physical_reads, last_physical_reads, min_physical_reads, max_physical_reads, total_logical_writes, last_logical_writes, min_logical_writes, max_logical_writes, total_logical_reads, last_logical_reads, min_logical_reads, max_logical_reads, total_elapsed_time, last_elapsed_time,...
Tags:
Subscribe to:
Posts (Atom)