Posts Tagged ‘Performance’

July 30th, 2007

Vista Performance and Reliability Pack Unofficial Release

Please note: These fixes break all current methods of bypassing driver singing requirements except the good old F8 during boot (that you have to do every single time you start vista)

If you are using Rivatuner, atitool and or Peerguardian on 64bit vista, you will have to use F8 every single time to disable driver signing requirements to use those two programs. x86 version is unaffected.

These updates should go official on the next patch Tuesday (in one weeks time). Please read more for the download links and information on these updates.

938979 Vista Performance and Reliability Pack

This update resolves a number of individual issues which may be affecting some computers running Windows Vista. These issues have been reported by customers using the Error Reporting service, product support, or other means. Installing this update will improve the performance and responsiveness for some scenarios and improves reliability of Windows Vista in a variety of scenarios. Some examples of the improvements contained in this update are:

  • Improves performance in resuming back to the desktop from the Photo and Windows Energy screensaver.
  • Resolves an issue where some secured web pages using advanced security technologies may not get displayed in Internet Explorer on Windows Vista.
  • Resolves an issue where a shared printer may not get installed if the printer is connected to a Windows XP or Windows Server 2003 system and User Access Control is disabled on the Vista client.
  • Resolves an issue where creating AVI files on Vista may get corrupted.
  • Improves the performance in calculating the ‘estimated time remaining’ when copying/moving large files.
  • Improves performance in bringing up Login Screen after resuming from Hibernate.
  • Resolves an issue where synchronization of offline files to a server can get corrupted.
  • Resolves a compatibility issue with RAW images created by Canon EOS 1D/1DS Digital SLR Camera which can lead to data loss. This only affects RAW images created by these two specific camera models.
  • Resolves an issue where a computer can lose its default Gateway address when resuming from sleep mode.
  • Improves the performance when copying or moving entire directories containing large amounts of data or files.
  • Improves the performance of Vista’s Memory Manager in specific customer scenarios and prevents some issues which may lead to memory corruption.

938194 Vista Compatibility and Reliability Pack

This update resolves a number of individual issues which may be affecting some computers running Windows Vista. These issues have been reported by customers using the Error Reporting service, product support, or other means. Installing this update will improve the reliability and hardware compatibility of Windows Vista in a variety of scenarios. Some examples of the improvements contained in this update are:

  • Improved reliability and compatibility of Vista when used with newer graphics cards in several specific scenarios and configurations.
  • Improved reliability when working with external displays on a laptop.
  • Increased compatibility with many video drivers.
  • Improved visual appearance of games with high intensity graphics.
  • Improved quality of playback for HD-DVD and Blue-Ray disks on large monitors.
  • Improved reliability for Internet Explorer when some third party toolbars are installed on Vista.
  • Improved Vista reliability in networking configuration scenarios.
  • Improved the reliability of Windows Calendar in Vista.
  • Improved reliability of systems that were upgraded from XP to Vista.
  • Increased compatibility with many printer drivers.
  • Increased reliability and performance of Vista when entering sleep and resuming from sleep.

Download: Vista Compatibility and Reliability Pack for x64 or x86 version
Source: Neowin.net

Tags: , ,

Posted in Programming | kick it on DotNetKicks.com | Bookmark | View blog reactions | No Comments »

July 24th, 2007

Why Linux Has Failed on the Desktop

I found this great article about Con Kolivas on Slashdot today:

Linux is burdened with ‘enterprise crap’ that makes it run poorly on desktop PCs, says kernel developer Con Kolivas. Kolivas recently walked away from years of work on the kernel in despair. APCmag.com has a lengthy interview with Kolivas, who explains what he sees is wrong with Linux from a performance perspective and how Microsoft has succeeded in crushing innovation in personal computers.

This article is personally the first time I have heard of Con Kolivas, but in the article he makes many great points about performance and usability that every software developer should be concerned with. He also talks about the disconnect that the Linux Kernel Developers have with the common user and the weight corporations hold over the changes that go in to the Linux Kernel.

Tags: , ,

Posted in Programming, Rant | kick it on DotNetKicks.com | Bookmark | View blog reactions | No Comments »

June 30th, 2007

Which web server is better under load, IIS 6 or Apache?

One of the many techno-geek religious arguments that comes up a lot is which web server has a faster response time under load, IIS 6 or Apache? I am happy to say somebody actually put this to a test using what is known as the Digg-effect, basically a constant hammering of the server to keep it under load. The results may surprise some of the zealots out there and the test might be buried because of an unpopular fact. Here is the setup from the site:

This is a page to test the effect of high reddit and digg hits on two different servers one running IIS6 and the other Apache. The purpose is to see how each handles high hit loads and is the most reliable.

By using one server to load this page (not being tested) then calling a page from a dedicated IIS6 server into an iframe and a second page from a dedicated Apache server into a second iframe. The entire process is using PHP scripting and mysql data to store the results. To eliminate cache hits on both test servers, the page being returned to the iframe is dynamically created each time from a php script.

After the pages are completely loaded, an ajax call is made to the primary server to record the times back into the sql database for statistics. All three servers are the same physically and in the same rack and network. Bandwidth is not a measurement issue, since only the execution of the php script is being measured.

I have taken the liberty of making a screen shot of the following site just in case it is taken down. The screen show is dated 2007-06-30.IIS 6 vs Apache Graph

I have included the results below for the same reason.

Reddit hits 27653
Digg hits 874
Seconds to call the iframes from main page this run 0.0528259277344
Total seconds to load all pages this run 4.02603888512
Average seconds to load the iframes (both) 2.60272280153
Average seconds to load IIS 2.2937795829352
Average seconds to load APACHE 2.9116660201344

This is a very interesting study, and I am going to keep following this site for updates.

Tags: , , ,

Posted in Programming | kick it on DotNetKicks.com | Bookmark | View blog reactions | No Comments »

June 19th, 2007

Waking Up Early - 15 Tips That Work

David Cheong, a fellow software developer, has some very good tips for how to wake up early on his blog. I personally use half of them to get my self out of bed in the morning. The most important one that I use is:

I’ve found this to be the single most important element in being an early riser. Days in which I did not crystallise the reasons for getting up were more likely to result in sleep ins. Now, I make it clear the night before what it is I want to wake up early for. Initially, I found writing things down to be helpful, but this isn’t always necessary, as long as it is clear what the reasons are.

Basically you have to enjoy what you are doing in life, and once you do that it makes waking up so much easier. Even after a long night of coding where you worked on a mind-boggling problem that kept you up till 1:00 AM. It is a very good read even if you are not a software developer.

Tags:

Posted in Programming | kick it on DotNetKicks.com | Bookmark | View blog reactions | No Comments »

June 12th, 2007

Apple Safari Browser Welcomed To Real World With 6 Zero Day Exploits

Apple has just released a public beta of its Safari browser for Windows yesterday. And there have been already 6 zero day exploits and many, many crashes for the browser. You can read about them here here here and here. Which makes the following image from the Apple website, borrowed from aviv.raffon.net, all the more funny.

Apple Safari Security

Also Apple has the following to say under the Security tab of their website:

Security

Now you can enjoy worry-free web browsing on any computer. Apple engineers designed Safari to be secure from day one.

For starters, Safari uses robust encryption to ensure that your private information stays that way. When you browse a secure site, Safari displays a lock icon in the upper-right corner of the browser. If you want to know more about the credentials of a secure site, click the lock icon and Safari displays detailed information about the site’s security certificate.

Safari supports SSL versions 2 and 3, as well as Transport Layer Security (TLS), the next generation of Internet security. Safari uses these technologies to provide a secure, encrypted channel that protects all your information from online eavesdroppers. And Safari lets you use standards-based authentication such as Kerberos single sign-on and X.509 personal certificates, or proprietary protocols like NTLMv2 to log in to secure sites.

Safari also supports a variety of proxy protocols — services that help firewalls control what flows in and out of the network — including Automatic Proxy configuration, FTP Proxy, Web Proxy (HTTP), Secure Web Proxy (HTTPS), Streaming Proxy (RTSP), SOCKS Proxy, and Gopher Proxy.

I don’t know about you, but it’s one thing to say that you have designed your browser to be secure from day one, but it’s another to actually prove it. Apple has fallen flat on its face with this release, and I know it is only a beta, but Fire Fox and IE have both been in beta before and haven’t nearly had this many problems.

All that I have to say is when you venture out in to the Windows world Apple, where the market share is at 90% you are not protected by your small margins anymore.

Tags: , , , , , , ,

Posted in Programming, Rant | kick it on DotNetKicks.com | Bookmark | View blog reactions | 1 Comment »

March 16th, 2007

Using Distributed Transactions in your Data Layer

Many developers use a pattern called ORM or Object Relation Mapping to generate data layers for their application. Many other developers choose to create their own data layers by hand. I have done both and I don’t have a preference of one over the other. With an ORM generator you have an easy to maintain data layer for your applications, when you create one by hand you have much more control of the data layer as far as object creation goes.

Most of the time a business layer will access the data layer in order to provide rules and logic to how the data objects in the data layer are accesses or relate to each other. An example of of how a business layer might relate to data layer is the following. You have a Sales table, a Products table, and a Customers table and objects for each of those in the data layer. In the business layer you may just have an object that is called Checkout that decrements the quantity in the Product table, and then combines the products and customer in the Sales table.

Data integrity is very important in applications like this, you cannot have a sale that is half complete because the revenue numbers would be off for the store. So one problem with keeping all these tables in separate objects is that it is hard to use some of the nice features that SQL provides, like Transactions.

Transactions:

A transaction is a sequence of operations performed as a single logical unit of work. A logical unit of work must exhibit four properties, called the atomicity, consistency, isolation, and durability (ACID) properties, to qualify as a transaction.

Properties of a transaction:

  • Atomicity:A transaction must be an atomic unit of work; either all of its data modifications are performed, or none of them is performed.
  • Consistency:When completed, a transaction must leave all data in a consistent state. In a relational database, all rules must be applied to the transaction’s modifications to maintain all data integrity. All internal data structures, such as B-tree indexes or doubly-linked lists, must be correct at the end of the transaction.
  • Isolation:Modifications made by concurrent transactions must be isolated from the modifications made by any other concurrent transactions. A transaction either recognizes data in the state it was in before another concurrent transaction modified it, or it recognizes the data after the second transaction has completed, but it does not recognize an intermediate state. This is referred to as serializability because it results in the ability to reload the starting data and replay a series of transactions to end up with the data in the same state it was in after the original transactions were performed.
  • Durability:After a transaction has completed, its effects are permanently in place in the system. The modifications persist even in the event of a system failure.

Creating Distributed Transactions:

A new feature introduced in the .NET Framework 2.0 is the System.Transactions namespace, which provides support for transactions across different types of transaction managers, which include data sources and message queues. The System.Transactions namespace defines the TransactionScope class, which automatically manages transactions for you.

To create and use transactions, create a TransactionScope block, and specify whether you want to create a new transaction context or enlist in an existing transaction context. You can also exclude operations from a transaction context if appropriate.

You can call multiple data layer objects, which really creates multiple database connection within the same transaction scope. The transaction scope decides whether to create a local transaction or a distributed transaction. The transaction scope, automatically promotes a local transaction to a distributed transaction if necessary, based on the following rules:

  • When you create a TransactionScope object, it initially creates a local, lightweight transaction. Lightweight transactions are more efficient than distributed transactions because they do not have the overhead of the Microsoft Distributed Transaction Coordinator (DTC).
  • For SQL Server 2005 databases the first connection that you open in a transaction is automatically set as a local transaction. The resource manager then works with the System.Transactions namespace and supports automatic promotion of local transactions to distributed transactions when additional connections are created in the transaction scope.
  • For Non SQL Server 2005 database the first connection that you open is automatically promoted to a distributed transaction. This promotion occurs because the resource managers for these Non SQL Server 2005 databases do not support automatic promotion from local to distributed transactions.

Integrating Transactions Into Your Code
So now that we have gone over what a transaction is and the different types of transactions that .NET can use depending on the database you are connecting too. Lets get to an actual example. We will once again use our example of the Store that needs to make a sales and deduct those quantities from the database.

public class ShoppingCart
{
	public Customer Customer { get; }

	public Product[] Products { get; }

	public bool Checkout ()
	{
		try
		{
			// create the transaction scope to guarantee that all the data gets committed to the database
			using (TransactionScope scope = new TransactionScope())
			{
				// create the sale
				Sale sale = new Sale();
				sale.Customer = this.Customer;

				// save the sale to the database
				sale.Save();

				decimal cost = 0.0M;

				foreach(Product p in Products)
				{
					SaleItem item = new SaleItem();
					item.SaleId = sale.SaleId;
					item.ProductId = p.ProductId;

					// subtract one item from quantity
					p.QuantityInStock–;

					// save the product quantity update to the database
					p.Save();

					// add cost of product
					cost += p.Cost;

					// save item to database
					item.Save();
				}

				sale.Cost = cost;

				// save the sale so the cost is reflected in the database
				sale.Save();

				// commit all database changes to database
				// if complete is not called, due to an exception from the code above, the transaction is rolled back
				scope.Complete();
			}
		}
		catch (Exception exc)
		{
			Debug.Write(exc.ToString());
		}
	}
}

What is happening above is two sales commits and a commit for each product. If any of the lines above the scope.Complete() were to throw an exception the TransactionScope using block would immediately exit and the database saves would be rolled back. Like I mentioned before this is done to keep the integrity of the data in the database intact. For instance if I never made it to the part where I updated the sale.Cost the revenue for the store would be out of whack.

Stay tuned I plan on documenting more of the new features coming in .NET 3.0 and .NET 3.5. I hope this post was informative.

Tags: , , , ,

Posted in C#, How To, Programming, SQL | kick it on DotNetKicks.com | Bookmark | View blog reactions | 1 Comment »

February 28th, 2007

Why Does Vista Use All My Memory?

This question comes up a lot when my friends and co-workers are arguing over the merits of Windows Vista. They say, “My {insert some Linux distro here} only uses {insert another useless amount of RAM here} RAM, why is Vista such a hog?” I usually go on to explain to them about SuperFetch and ReadyBoost, and all the advances and better memory management that went in to these two technologies. All information that is freely available from Part 1 and Part 2 of the Inside the Windows Vista Kernel articles.

However, I believe, Jeff Atwood from Coding Horror does a much better job.

Tags: , ,

Posted in Programming | kick it on DotNetKicks.com | Bookmark | View blog reactions | No Comments »