Hi,
This is just recompiled version of Managed Stack Explorer which will run in x64 environment and IIS7.
File is here for download
Tuesday, April 27, 2010
Friday, March 05, 2010
Virtual CPUs and performance of virtual machine
Performance comparison of multi threaded application in relevance to multiple virtual CPUs in virtual machine
I was tasked (actually wanted to know myself) if common understanding going around that adding virtual CPUs to virtual machine does not affect performance of such. Idea behind this thought is that since CPU is virtual then hypervisor will be spreading load across physical CPUs anyway and hence additional CPUs will not increase performance of your application.
I wanted specifically to test multi threaded application since this is what majority of web servers are.
So to test raw CPU performance I acquired 4 CPU IBM box. I wanted to make a test against VM guest running inside ESX 3.5 with different number of virtual CPUs and 1 another test - against physical hardware (no hypervisor).
For test itself I wanted something which is very CPU intensive and has no IO dependencies. I figured calculating PI to certain digit will be a good choice in this case.
Entire Visual Studio 2008 solution can be downloaded below. It consists of web service which accepts only 1 parameter which is "Number of Digits of PI to be calculated to" and returns back total time taken to calculate that number.
Solution also contains sample webpage which will call web service, that page was called by 10 virtual clients simultaneously. Total number of pages served were calculated and presented in table and graph below.
Conclusion: Adding more virtual CPUs for multithreaded application does it in fact increase performance of application.
Number of logical CPUs | Number of requests served |
1 CPU | 24 |
2 CPU | 47 |
4 CPU | 65 |
Physical box with 4 CPUs | 70 |
Attachment:Download
Friday, May 22, 2009
How to use .NET profiler to troubleshoot ASP.NET page perfomance issues
How to use .NET profiler to troubleshoot slow ASP.NET page performance
I'm frequently tasked to figure out why certain pages or parts of websites are slow (assuming site is ASP.NET based). In this specific article I'll show how to use free .NET profiler from Equatec http://www.eqatec.com/tools/profiler to troubleshoot this issues.
My common troubleshooting steps (before diving into ASP.NET website performance troubleshooting are below).
- Use Fiddler tool (http://www.fiddler2.com/fiddler2/) to actually measure response time of web page. This works with AJAX based pages as well and will actually provide you information which you usually would not be able to see in browser window (simple GET/POST requests are so 90s in modern technologies).
- Once you get statistics and confirmed that you do in fact have backend problem other then networking issues I usually see if there are any known dependencies for the page (like SQL backend). This is pretty easy to figure out by looking through web.config file. I start SQL profiler on SQL server afterwards and resubmit request from browser again watching profiler statements coming through. Sometimes troubleshooting ends here (if you see that Execution time of stored procedure or ad-hoc query corresponds to total page response time.
- At this point if you ruled out backend slowness you are probably looking at some issues within ASP.NET website itself. I usually enable ASP.NET tracing at this point by going to web.config and adding following statement there
<trace enabled="true" localOnly="false" pageOutput="true"/>). This will output tracing information (most importanly times to takes to execute specific methods in pipeline). Sometimes it's enough to to see which part of the page pipeline fails. - Please note that page execution times listed trace output are not including times which are spends outside of the page (like authenticating request or processing events in global.asax). So you might see fast execution times in trace output but page will still be slow to render and hence we come to real purpose of this article, i.e. to use .NET profiler to see what is causing page to stall.
I wrote a sample website where I simulated different stalling conditions. Stalling in pre-page execution pipeline (in global.asax) and stalling inside page itself (SQL call or Web Services call or something of that nature). To simulate long running method I inserted following statement in relevant methods (System.Threading.Thread.Sleep(5000);). This makes current thread sleep for specified amount of time. I put Tracing statements through the code so you can actually see in screenshot below where latency are being introduced. Lines in red indicate Trace statements in the code. (First one in global.asax Application_BeginRequest event and second one inside Page_Load() statement of default.aspx page). In real life scenario you most likely would not have any Tracing statements in code you'll be troubleshooting though.
I compiled my test website and at this point all I have is what you probably would have in your case. You can download it here (ZIP). Once you installed it, navigate to default.aspx page and see how much it takes to load a page (shall be around 7s or so).
Next step is to install Equatec .NET profiler from here (Here).
- On first run it'll display default screen below
- Click browse button and navigate to installation directory of your website (BIN folder) and open precompiled binary for your application (profiler.dll in this case)
- Click "Build" button on bottom. Profiler will inject profiling information into your assembly and output results to the "Bin-Profiled" folder under the same root where your original "Bin" folder is. You'll see that you original DLL file grew up in size because of that.
- Copy all files from "Bin-Profiled" folder to "Bin" folder (replacing files)
- Switch to "Run" tab and navigate to your problem page. You'll notice that Control area will be updated with information "Profiled app Profiler started"
- Click on "Take snapshot" button. It'll generate report about execution time and put report under "View Snapshot reports" area.
- Click "View" button now with latest report selected. Result below is exactly what you'd expect to see from test file. Which is first 5 seconds were spent in BeginRequest event and next 2 in Page_Load calling "DoSQLQuery" method.
- Now since you know which specifics methods take that much time you need to take a look at what is being done inside those methods. In this case (and probably yours) you'll just have assembly (profile.dll). You need to use tool like .NET Reflector (Download here) to see contents in readable form.
Now we can see exactly why it took so long to execute this specific method. In your case it might be SQL call or web services or call or something of that nature.
Monday, April 06, 2009
Instructions how to enable SSTP VPN s...
Instructions how to enable SSTP VPN server in Windows 2008 simplified
In this brief 10 minutes procedure below you'll learn how to create VPN connection using SSTP (SSL tunnel) to your work/home location from anywhere where HTTPS is allowed.
Guide below assumes you don't want to use your VPN server as Internet Router and you have some other devices doing routing. Steps below will allow you to VPN in your remote location and route everything (including Internet traffic) through that VPN connection.
Difference from other guides on Internet:
- Don't need domain controller or certificate services for this to work
- Don't need 2 network adapters on your server to work
- Don't need to publish SSL CRL (certificate revocation list)
What is needed:
- Server SSL certificate (self-signed)
- Windows 2008 on your local network (single NIC)
- Vista SP1 or later
Steps:
- Create self-signed certificate and import it into certificate store on client and server
- Create self-signed certificate with domain name which you'll be using for your VPN server. I used this excellent utility (http://www.pluralsight.com/community/blogs/keith/archive/2009/01/22/create-self-signed-x-509-certificates-in-a-flash-with-self-cert.aspx). What you want to do is to put CN name as external name which you'll be using for your VPN server (like sstp.mydomain.com) and choose to export as PFX file. This will create PFX file with your certificate and designated location. In steps below it would be imported into client and server as Trusted CA.
- Import certificate on client computer by following this steps: Launch MMC and choose Add Snap-in, choose "Certificates", on next screen choose "Local Computer" and then choose "Trusted Root Certification Authorities" and import your certificate into that store.
- Import certificate on server computer exactly the same ways it was done on client.
- Import certificate on client computer by following this steps: Launch MMC and choose Add Snap-in, choose "Certificates", on next screen choose "Local Computer" and then choose "Trusted Root Certification Authorities" and import your certificate into that store.
- Create self-signed certificate with domain name which you'll be using for your VPN server. I used this excellent utility (http://www.pluralsight.com/community/blogs/keith/archive/2009/01/22/create-self-signed-x-509-certificates-in-a-flash-with-self-cert.aspx). What you want to do is to put CN name as external name which you'll be using for your VPN server (like sstp.mydomain.com) and choose to export as PFX file. This will create PFX file with your certificate and designated location. In steps below it would be imported into client and server as Trusted CA.
- Enabled RRAS role on Windows 2008 and configure SSTP.
- Install RRAS service on your server
- Add Server Role called "Network Policy and Access Services". Choose only "Remote Access Service" for service since we don't need routing. Go through installation process.
- Once server is setup, launch Routing and Remote Access MMC and choose to "Configure Routing and Remote Access server".
- Choose "Custom Configuration" and choose "VPN access".
- For your user go to user property pages. Choose "Dial-in" tab and choose "Allow access" under "Network Access Permission".
- Add Server Role called "Network Policy and Access Services". Choose only "Remote Access Service" for service since we don't need routing. Go through installation process.
- Configure your external router to port forward TCP 443 to your internal IP of your VPN server.
- Install RRAS service on your server
- Configure your Vista VPN client.
- Go to Network And Sharing Center/Setup Connection or network/Connect to a workplace. Choose "Use Internet Connection", put your hostname for connection and go through the rest of the steps. Use "skip" since connection will probably fail since we need to configure connection to use SSTP. Once connection is created, go to properties of connection/Networking and choose as type of VPN - SSTP, uncheck IpV6 since you don't need at this point.
At this point you shall be able to VPN into your remote home/office.
Friday, August 08, 2008
This is test I did in school when I was 10 years old (3d grade). See if your 10-11 old child will be able to make it. (Test for 7 year olds below this post)
Test 1.
Airplane needs to fly between 2 cities, distance between cities is 4150 km. First 2 hours airplane was flying 676 kmh, then 3 hours was flying with speed 760 kmh.
Question: How many km is left to fly?
Test 2.
Swimmer had swam 448 laps in first day. On second day he was swimming 2 hours less then first day and swam total of 336 laps.
Question: How many total hours swimmer was swimming on first day and on second day?
Test 3.
Your yard is 45 m in length and 24 m in width. What is perimeter of your yard?
Below answers from original paperwork filed in 1981
This is test which I did at the end of 1st grade in Moscow School on May 17th, 1978 when I was 7 years old.
See if your 7-8 year old child can answer questions below.
Test 1.
There are 27 airplanes and 16 helicopters at airport. 18 aircrafts took off. Question: How many aircrafts left at airport?
Test 2.
- 64 + 23 = ?
- 14 - 8 = ?
- 48 + 5 = ?
- 53 + 27 = ?
- 9 + 6 = ?
- 90 - 26 = ?
- Put <,>,= between 20-6 and 20-9
Monday, August 04, 2008
SSLScavenger available at codeplex
If you work in environment with a lot of SSL sites and need to keep track of SSL certificates and their expiration dates you might find this utility usefull.
You can download it from http://www.codeplex.com/sslscavenger/.
It provides output in XML file if any of certificates are already expired or about to expire in 30 day period.
You can download it from http://www.codeplex.com/sslscavenger/.
It provides output in XML file if any of certificates are already expired or about to expire in 30 day period.
Thursday, June 05, 2008
The best of freeware I find usefull
Free remote access to home or office computers. All software and services listed below are completely free.
- http://www.logmein.com/ has a free version of their product which will allow you to access any of your machines having LogMeIn installed form anywhere in the world. Current version supports popular features like multi monitor, clipboard sharing, chat.
- If you need instantaneous and fast desktop sharing with your peer I'd recommend http://www.crossloop.com which is very easy to install and use. It's based on well established VNC based remote desktop access. Excellent choice if you need quickly connect to your peer.
- http://ww.livemesh.com is in tech preview currently allows you to access your own remote computers and also supports file synchronisation both offline and online between devices.
Subscribe to:
Posts (Atom)