Mike Says Meh The blog of Sys Admin Mike Kauspedas

18Sep/150

It’s Friday – Here is a pic of a SQL server with 1.5TB of RAM

If you're a geek like me then this is pretty f'n cool. Kind of like being able to drive a really fast car. Another cool thing, there are three of these in production.

 

 

1.5TB RAM

 

Huge-SQL-Server

Filed under: Tech No Comments
16Sep/150

FTP access to Azure website with your publishing file

Here is an easy way to gain FTP access to your Azure website.

  1. Download your publishing file from the website dashboard.
  2. Open FileZilla and from the dashboard paste the FTPS address into the address bar. (Always use FTPS when available). The location is on the right hand side. This is an image of mine, yours may be a different address depending on where you website is hosted in Azure.

    azure ftps

  3. Open the publish file with notepad++ (or notepad). The file is going to be named YOUR-SITE-NAME.azurewebsites.net.PublishSettings.
  4. Your user name is the sitename\username. If your site name is contoso and your username is $contosouser in the publish file than your user name would be contoso\$contosouser in FileZilla.

    filezilla azure

  5. that's it, just click connect and accept the certificate.
Filed under: Tech No Comments
14Sep/150

Azure website phpmyadmin site extension “No route registered for ‘/phpmyadmin/”

If you aren't already aware there are some helpful tools for Azure websites found at https://YOUR-WEBSITE-NAME-HERE.scm.azurewebsites.net. For example if you website name in Azure websites is mikmeh than your scm URL would be https://mikmeh.scm.azurewebsites.net. You'll need to be logged in, or login to view the site. Lets assume you already know about this and you also discovered the site extensions gallery and you clicked the install button for phpmyadmin. Then after it installed you clicked the play button and you get this.

 No route registered for '/phpmyadmin/ 

There is a super easy fix. Just stop your website in Azure. You don't even need to start it back up, the scm runs under a different worker process. Now you have phpmyadmin the super easy way. It even connects to your existing databases.

Filed under: Tech No Comments
7Aug/150

Powershell script to collect a dump of a specific application pool

Procdump needs to be installed on the system. (procdump -i).


Import-Module WebAdministration
$apps = dir IIS:\AppPools\ | Select-Object -expand name
Write-host "Application Pools on this server:" -foregroundcolor red -backgroundcolor yellow
Write-Output $apps
$appname = Read-Host "Enter AppPool Name"
$apid = Get-WmiObject -NameSpace 'root\WebAdministration' -class 'WorkerProcess' -ComputerName 'LocalHost' | Where-Object {$_.AppPoolName -like "$appname"} | Select-Object -expand processId
procdump -ma -r $apid

First we import the webadmin module. Then list out the application pools on the server so you don't need to open IIS or run appcmd list wps. Then it asks you for the name of the app pool which you can now copy and paste from the list provided. Then it finds the process ID and invokes procdump to take a full user dump with reflection (-r) to prevent the application pool from going down.

I did some very minor testing by just running apache bench on a site to create a bunch of requests and then running this script to see if it brings it down. All my requests were successful and my DotNetNuke site didn't warm back up. I'm not 100% confident this is production safe, but at least it's ready for testing.

Filed under: Tech No Comments
29Jul/150

Replace command prompt with Windows Powershell in Windows 10

I'm an early adopter, yay! Well, actually I have a 2 in 1 laptop so Windows 10 seemed to make sense and I decided to upgrade today after reading about it. It's basically what Windows 8 should have been, although I like Win8 as well. Anywho, maybe this was availble in Win8 as well, but you can replace cmd with ps1!

1. Right click on your task bar and click properties.

2. Click on navigation and check the box to replace command prompt.

replace cmd with ps1

 

3. Now when you right click on the start menu button you will see Powershell instead of command prompt.

 

replace cmd with ps1 2

Filed under: Tech No Comments
15Jul/150

How to remove all partitions from a disk

Here is an old one that I have been using for years and never thought to document here on my site. Btw, I use this blog a lot for my own documentation. Reason 1 to blog in IT. Want to get rid of everything on a drive? I mean everything, all partitions, data, EVERYTHING. So keep this in mind. Because if you want to save anything make sure to back it up first. Also, this doesn't completely wipe the drive, it could still be recovered using some utilities. If you want a military grade wipe go shoot it a few times, or use one of those military grade drive wiper cleaners, or toss it in a really hot fire while you're camping. Probably easier to use the software drive wipers.

1. Open command prompt as administrator.

2. Type diskpart and hit enter.

3. Type list disk and hit enter.

4. View the disks in the list and type select disk X with X being the number of the disk you want to wipe. Be very careful, triple check that list because you don't want to wipe the wrong drive. In my example I had 3 disks attached to my system but I only wanted to wipe one.

5. After you select the disk just type clean and hit enter. Here is what you should see.

C:\Windows\system32>diskpart

Microsoft DiskPart version 6.3.9600

Copyright (C) 1999-2013 Microsoft Corporation.

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          167 GB      0 B
  Disk 1    Online          298 GB      0 B        *
  Disk 2    Online          465 GB      0 B

DISKPART> select disk 2

Disk 2 is now the selected disk.

DISKPART> clean

DiskPart succeeded in cleaning the disk.

6. Voila, it's like a brand new hard drive.

Filed under: Tech No Comments
17Jun/150

Show classic ASP errors in Azure

Here is the web.config to show classic ASP (.asp files) in Azure, or in my case Windows Azure Pack with websites.

<configuration>
   <system.webServer>
		<asp scriptErrorSentToBrowser="true"/>
		<httpErrors existingResponse="PassThrough"/>
		<!--<httpErrors errorMode="Detailed"/>-->
   </system.webServer>
</configuration>

I commented out detailed error messages. With that enabled it would not show the classic ASP errors.

Filed under: Tech No Comments
13Jun/150

Fix Failed to retrieve configuration information. in Windows Azure pack Websites

Did you try enabling failed request tracing for a web site in the admin portal for Windows Azure Pack: Websites? And now you're getting this error when you try to open the configure tab?

Failed to retrieve configuration information.: Please try again. If the problem persists, contact support.

WAP error

Thanks to a kind gentleman on the WAP forums I got the module needed in powershell to edit the websites config. Here is how to fix it.

  1. From the controller open powershell as administrator the run the commands below.
  2. > Import-Module websitesdev
  3. > Set-WebSitesSiteConfig -name <sitename> -RequestTracingEnabled $false

Replace sitename with your site name in the portal. The site name can be found under your Cloud > Websites and the name column.

WAP portal

Here is the output from my CN (controller server).

PS C:\Windows\system32> Import-Module websitesdev
PS C:\Windows\system32> Set-WebSitesSiteConfig -name bake -RequestTracingEnabled $false
Configuration for website bake has been updated.

Filed under: Tech No Comments
29May/150

Dynamic vs Fixed Disk Benchmarks – Dynamic is faster

In the past I've never noticed much gain from going to a fixed disk over dynamic so I decided to finally put it to the test. I tested with two different disk arrays, one a slow SATA using storage spaces (RAID1+0) and another using SSD in straight RAID 0. Each array has 4 disks. Each connected over SATA600. The speed of the disks ultimately doesn't matter, I just want to find out if fixed really is faster than dynamic. I'm using crystal disk mark 4.0.1 x64 inside a VM. I ran two tests each, 3 passes with a 1GB file.

I first tested with SSD and after the results I thought maybe it was just SSD since those disks are so fast anyway. Maybe no latency wipes out any performance loss you get with the overhead of dynamic.

Dynamic Test 1
Sequential Read (Q= 32,T= 1) :  5568.709 MB/s
Sequential Write (Q= 32,T= 1) :   662.037 MB/s
Random Read 4KiB (Q= 32,T= 1) :   139.494 MB/s [ 34056.2 IOPS]
Random Write 4KiB (Q= 32,T= 1) :   123.682 MB/s [ 30195.8 IOPS]
Sequential Read (T= 1) :   579.854 MB/s
Sequential Write (T= 1) :   576.732 MB/s
Random Read 4KiB (Q= 1,T= 1) :    19.219 MB/s [  4692.1 IOPS]
Random Write 4KiB (Q= 1,T= 1) :    34.639 MB/s [  8456.8 IOPS]

Dynamic Test 2
Sequential Read (Q= 32,T= 1) :  4511.435 MB/s
Sequential Write (Q= 32,T= 1) :   662.157 MB/s
Random Read 4KiB (Q= 32,T= 1) :   140.051 MB/s [ 34192.1 IOPS]
Random Write 4KiB (Q= 32,T= 1) :   123.475 MB/s [ 30145.3 IOPS]
Sequential Read (T= 1) :   576.089 MB/s
Sequential Write (T= 1) :   575.869 MB/s
Random Read 4KiB (Q= 1,T= 1) :    19.542 MB/s [  4771.0 IOPS]
Random Write 4KiB (Q= 1,T= 1) :    33.126 MB/s [  8087.4 IOPS]

Fixed Test 1
Sequential Read (Q= 32,T= 1) :   700.012 MB/s
Sequential Write (Q= 32,T= 1) :   659.203 MB/s
Random Read 4KiB (Q= 32,T= 1) :   140.867 MB/s [ 34391.4 IOPS]
Random Write 4KiB (Q= 32,T= 1) :   124.820 MB/s [ 30473.6 IOPS]
Sequential Read (T= 1) :   570.374 MB/s
Sequential Write (T= 1) :   570.917 MB/s
Random Read 4KiB (Q= 1,T= 1) :    18.859 MB/s [  4604.2 IOPS]
Random Write 4KiB (Q= 1,T= 1) :    34.872 MB/s [  8513.7 IOPS]

Fixed test 2
Sequential Read (Q= 32,T= 1) :   699.533 MB/s
Sequential Write (Q= 32,T= 1) :   656.096 MB/s
Random Read 4KiB (Q= 32,T= 1) :   141.714 MB/s [ 34598.1 IOPS]
Random Write 4KiB (Q= 32,T= 1) :   125.472 MB/s [ 30632.8 IOPS]
Sequential Read (T= 1) :   584.835 MB/s
Sequential Write (T= 1) :   568.106 MB/s
Random Read 4KiB (Q= 1,T= 1) :    18.880 MB/s [  4609.4 IOPS]
Random Write 4KiB (Q= 1,T= 1) :    35.024 MB/s [  8550.8 IOPS]

Slower SATA now. Read is awesome, incredibly high. But those numbers are consistent in SSD as well so I don't think it's a fluke.

Dynamic test 1
Sequential Read (Q= 32,T= 1) :  1768.289 MB/s
Sequential Write (Q= 32,T= 1) :    25.291 MB/s
Random Read 4KiB (Q= 32,T= 1) :     6.339 MB/s [  1547.6 IOPS]
Random Write 4KiB (Q= 32,T= 1) :     0.304 MB/s [    74.2 IOPS]
Sequential Read (T= 1) :    67.744 MB/s
Sequential Write (T= 1) :    26.213 MB/s
Random Read 4KiB (Q= 1,T= 1) :     0.593 MB/s [   144.8 IOPS]
Random Write 4KiB (Q= 1,T= 1) :     0.310 MB/s [    75.7 IOPS]

Dynamic test 2
Sequential Read (Q= 32,T= 1) :  1723.136 MB/s
Sequential Write (Q= 32,T= 1) :    25.242 MB/s
Random Read 4KiB (Q= 32,T= 1) :     6.186 MB/s [  1510.3 IOPS]
Random Write 4KiB (Q= 32,T= 1) :     0.315 MB/s [    76.9 IOPS]
Sequential Read (T= 1) :    66.275 MB/s
Sequential Write (T= 1) :    25.581 MB/s
Random Read 4KiB (Q= 1,T= 1) :     0.565 MB/s [   137.9 IOPS]
Random Write 4KiB (Q= 1,T= 1) :     0.312 MB/s [    76.2 IOPS]

Fixed test 1
Sequential Read (Q= 32,T= 1) :    67.003 MB/s
Sequential Write (Q= 32,T= 1) :    24.195 MB/s
Random Read 4KiB (Q= 32,T= 1) :     0.658 MB/s [   160.6 IOPS]
Random Write 4KiB (Q= 32,T= 1) :     0.264 MB/s [    64.5 IOPS]
Sequential Read (T= 1) :    65.013 MB/s
Sequential Write (T= 1) :    25.376 MB/s
Random Read 4KiB (Q= 1,T= 1) :     0.607 MB/s [   148.2 IOPS]
Random Write 4KiB (Q= 1,T= 1) :     0.263 MB/s [    64.2 IOPS]

Fixed test 2
Sequential Read (Q= 32,T= 1) :    77.594 MB/s
Sequential Write (Q= 32,T= 1) :    24.769 MB/s
Random Read 4KiB (Q= 32,T= 1) :     0.636 MB/s [   155.3 IOPS]
Random Write 4KiB (Q= 32,T= 1) :     0.261 MB/s [    63.7 IOPS]
Sequential Read (T= 1) :    65.016 MB/s
Sequential Write (T= 1) :    25.586 MB/s
Random Read 4KiB (Q= 1,T= 1) :     0.614 MB/s [   149.9 IOPS]
Random Write 4KiB (Q= 1,T= 1) :     0.269 MB/s [    65.7 IOPS]

I also did some more testing with Atto and got the same results. In each case Dynamic was always faster than fixed. I'm confused ...

Dynamic test

Testing dynamic vhdx

Testing dynamic vhdx

Fixed test

testing fixed vhdx

testing fixed vhdx

To be honest, they are pretty much even in performance, aside from those crazy read numbers. But it's also clear that dynamic edges out fixed. Maybe it's my environment or something else, because everything online says Fixed should be faster. There are even other bench marks.

Filed under: Tech No Comments
27May/150

Cannot add shared web worker role to Windows Azure Pack Websites

Ran into this issue after the CU6 update. Turns our it is an issue with the update. I believe Microsoft is pushing everyone to the new MMC console instead of the web portal for admin tasks. This could be part of that effort. If you are seeing these errors when adding a new web worker role in WAP:WS (Windows Azure Pack with the Websites role ) try adding the new role through the controller server.

My post to the azure forums is here.

Error in the web portal:
Please try again. If the problem persists, contact support.

Error in event logs (MgmtSvc-AdminSite) on the adminhub.
Error:ProtocolException: The remote server returned an unexpected response: (400) Bad Request.
<Exception>
<Type>ProtocolException</Type>
<Message>The remote server returned an unexpected response: (400) Bad Request.</Message>
<StackTrace><![CDATA[

And this. (I replaced the partial server name with MEHMEH)

Rest client received unsucessful response message with status code '404' and body '{"Code":"NotFound","Message":"Server MEHMEH is not accessible. Could not connect to the server 'MEHMEH'. This may be because the server is not available. Make sure the server name or address is correct and try again.","ExtendedCode":"10002","MessageTemplate":"Server {0} is not accessible.","Parameters":["MEHMEH"],"InnerErrors":null}'.

Work around:

  1. Login to the controller server.
  2. Open the Websites Management Console MMC.
  3. Click on Servers.
  4. Click Add Server from the right hand menu.
  5. Type in the name, choose the role (webworker), choose mode (shared), and choose large (WAP ignores this on shared roles).

  6. The role will add and immediately appear in the web portal as well.
Filed under: Tech No Comments