European Windows 2012 Hosting BLOG

BLOG about Windows 2012 Hosting and SQL 2012 Hosting - Dedicated to European Windows Hosting Customer

European Windows 2008 R2 Hosting - Spain :: How to Determine I/O Usage on the Server?

clock September 18, 2013 11:29 by author Scott

Have you ever imagine what process that consume I/O usage on our server? I searched on on forums but I cant find definitely the answer. I still doubt about the answer. I try to find myself and make some experience.  In this post, I will show some analysis how can we determine the I/O usage on our server.

The easiest way to get a quick view into your I\O usage is to use Task Manager.  I will show you how to find that information.  First you need to open up Task Manager.  To do this, right click the task bar and choose Start Task Manager.  When you have it running, click the Processes tab.  Then from the menu choose View -> Select Columns… 

This will bring up the Select Process Page Columns.  Scroll down to the bottom and put a check beside I/O Reads, I/O Writes, I/O Read Bytes, and I/O Write Bytes. 

Click OK when you are finished and the columns will be added to Task Manager.  You should note that the numbers listed in Task Manager are totals for each of those items since the last boot of the system. 

Here is a description of the columns of the counters that were added to Task Manager above.

I/O Reads -  The number of read input/output operations generated by a process, including file, network, and device I/Os. I/O Reads directed to CONSOLE (console input object) handles are not counted.

I/O Writes – The number of write input/output operations generated by a process, including file, network, and device I/Os. I/O Writes directed to CONSOLE (console input object) handles are not counted.

I/O Read Bytes – The number of bytes read in input/output operations generated by a process, including file, network, and device I/Os. I/O Read Bytes directed to CONSOLE (console input object) handles are not counted.

I/O Write Bytes – The number of bytes written in input/output operations generated by a process, including file, network, and device I/Os. I/O Write Bytes directed to CONSOLE (console input object) handles are not counted.

You can look at the new columns that are showing up in Task Manager and see the processes that have used the most I/O since the last reboot of the server.  Often this is all the information you need to narrow down the top I/O usage per process.

Sometimes using Task Manager is not enough to help you narrow down the usage.  Maybe you need to know what is using the I\O right now or want to paint a picture of I\O usage over the next 7 days.  That is a good job for Performance Monitor.  Before we look at how to add the counters to Performance Monitor, here is the mapping of the Task Manager Columns that were described above and their corresponding Performance Monitor Counters:

Task Manager

Performance Monitor

I/O Reads

Process\I/O Read Operations/sec

I/O Writes

Process\I/O Write Operations/sec

I/O Read Bytes

Process\I/O Read Bytes/sec

I/O Write Bytes

Process\I/O Write Bytes/sec

To start up Performance Monitor click the Start button.  In the 'Search programs and files' text box enter perfmon. 

Select perfmon that shows up in the results to open up Performance Monitor.  Once you have it open, select Performance Monitor from the left menu so that it is highlighted.  That will start allowing Performance Monitor to collect information.  Next click the green Plus icon to add a counter. 

When the Add Counters dialog window comes up, look for the Process object and click the plus to the right of it.  That will expand the counters that are under the Process object.  Based on the information that you got from Task Manager above, you can now add the appropriate counter.  You will notice that when you select a counter it also wants to know if you want the _Total (the total amount from all processes for that counter), 'all instances' which will add all the instances to Performance Monitor, or a specific process.  I recommend that you set the counter up for one or more specific processes that you previously found with the total highest I/O listed in Task Manager.  Choosing 'all instances' will make it hard to read the results and might cause some additional resource usage on your server. 

Using this information you should now be able to track down what is using the most I/O on your system.

NOTE:  The step by step instructions in this article are based on Windows 2008 R2.  The I/O information pertains to earlier Operating Systems as well but the actual steps might be different.



Visual Studio 2012 Hosting - ASPHostPortal :: What is new in C# and Visual Basic in Visual Studio 2012

clock October 10, 2012 09:34 by author Scott

This post discusses the new language features that is introduced in Visual Studio 2012. One of the main things that language team introduced is the idea of producing windows 8 App. These APPs are talking to new API called windows runtime.

This release also brings iterators to Visual Basic. The main discussion in this post is around Asynchronous programming in C# language.




If you want to give importance on responsiveness of client and scalability in server App then you probably call Asynchronous API’s. These API’s take Callbacks as parameters and uses that Callback to notify you about result of available. When you start write these call backs then it is harder maintain the code but with new Async language support that introduced in Visual Basic and C# and it is easy consume these API’s.


Below is the synchronous code in C#




The code basically Searches the movie index in
Netflix using OData by taking Year as parameter. While it is downloading the movies using above code , you can notice you can not interact with your user interface. You can scroll along UI and explore the movies only after the search operation is complete. Users expects more responsive apps.

Why the above code is Unresponsive?

The call to DownloadString is of webclient type and it asks you to wait till it returns string. During this process your UI is going to hang-up and holds the thread until it returns the result back you.


Two different options here, you can put this code on background Thread and it is bit complicated. You may have to marshal and unmarshal the code. The second option is to interact with Asynchronous API there you have an overloaded function DownloadStringAsync, But when you use this method you are no longer take back data as result. You need to sign-up a call-back when a result is available. If you have multiple Async calls then you have to write multiple call-backs. In this case your code is getting more difficult to understand.

Solution

The new overload method is DownloadStringTaskAsync, This method now returns string of type Task, Task of string is object that notify you when result is available. Now you can change the signature of the method QueryMovies and mark this as async. This tells the compiler that this method is pausable and resumeable , they can wait without locking to the UI thread. Now change the return type of method from Movie array to Task<Movie[]> array. Write a word await to get the string from Task of objects from DownloadStringTaskAsync call.



Now you can call the above even from while loop




The compiler is now able to figure out how to handle the await inside the while loop and resume it when it gets the result. Now you should be able to interact with your UI without any hang-ups.

 



European Web Deploy Hosting - Amsterdam :: Common Error in Web Deploy and How to Solve it

clock April 20, 2012 11:33 by author Scott

In this post, I will show you common error in Web Deploy and how to solve it. Here are the most common publishing errors and solutions for them:

Error: “The application pool that you are trying to use has the ‘managedRuntimeVersion’ property set to ‘v2.0′. This application requires ‘v4.0′.”


Solution
: An application pool provides isolation for websites. Typically, web hosting providers create one application pool per website, and set default values for a number of attributes. One of these attributes is the version of the .NET framework. The user can often change this value between .NET 2.0 and .NET 4.0 through the web hosting provider’s control panel. You will see this error during publishing if you are publishing an ASP.NET Web Pages application, which requires .NET 4.0, to a hoster who has given you a website with a .NET 2.0 application pool. Similarly, you will see this error if you are publishing an application that requires .NET 2.0 to a website associated with an .NET 4.0 application pool. The solution is to set the .NET framework version in the web hosting provider’s control panel or, if there are no compatibility issues, change your application’s .NET framework version in WebMatrix’s Settings workspace.

Error: “Username or password incorrect” error when using Web Deploy

Solution
: This is probably because the value in Site Name is incorrect. Site Name must contain the name of the IIS site on the remote server. Typically, it matches your domain name, but it doesn’t have to. For example, it can be “Default Web Site” (if you have a dedicated server) or “foo” or “foo.com”. Web Deploy must authenticate to the site before it can execute any providers.

Error: Web management service not started on destination

Solution
: You may see this error if you are deploying to a server you have set up yourself. Web Deploy requires a service called Web Management Service (wmsvc) to be running on the remote server. You can get this error if the service is not started. This blog post is a good starting point to learn how to configure a remote server with Web Deploy and wmsvc.

Error: Failed to invoke provider “iisApp”

Solution: Under the covers, WebMatrix users Web Deploy’s iisApp provider to sync files and directories, and to mark folders as applications. You may see this error if delegation rules are not configured correctly on the remote server. Delegation rules allow the user to execute some actions that require administrative privileges, such as marking a folder as an application. This blog post and this one gives good information on how to configure delegation rules.

Error: Bad gateway: check proxy settings

Solution
: This one is literally what it says – check proxy settings because Web Deploy traffic is being blocked. Try installing your corporation’s required firewall client, and disabling all settings in Internet Explorer > Tools > Options > Connections > LAN settings.

If you need Web Deploy hosting, please consider us as we support Web Deploy. Please visit our site at http://www.hostforlife.eu for more information.



About HostForLIFE.eu

HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.

We have offered the latest Windows 2016 Hosting, ASP.NET Core 2.2.1 Hosting, ASP.NET MVC 6 Hosting and SQL 2017 Hosting.


Tag cloud

Sign in