Basic Azure SQL Performance

In order to consolidate some websites onto one platform I had plans to move my outdoor sites to Azure. None of my sites are particularly large in terms of load so I figured a B1 app instance and a Basic Azure SQL database would more than suffice. I spent quite some time getting my database on another provider all spruced up to make migrating to Azure easier and I moved everything over for testing not long ago. It did not go well.

I was hopeful for a slight improvement in performance by moving to Azure. My other hosting provider has some older machines and they haven’t always kept up with the latest versions of ASP.Net. With Azure I was going to keep up with the latest stuff and improve performance. Instead, performance got much worse. A main page which took 2.7 seconds to load was taking about 5 seconds on Azure.

Using the very handy WebPageTest site I came across something very interesting. When comparing the new and old sites all of the significant variance was in “first byte” time. This represents the time it takes for an HTTP request to end up with resulting output starting to appear at the client. A lot of the work to do this is database access so I tried tweaking things to see how much the database might be playing a role here.

First Byte
This Azure run was better than others, but still far slower for first byte than the old web provider (361 ms). Overall load time was 4.404 seconds. Way too much.

The first wild comparison test was one in which I pointed the Azure website back to my old hosted SQL Server instance. Realize that this database is not in the same data center as the app server. All database access would be spanning Texas. Despite this, the Azure website hitting the remote database loaded in just about 2.7 seconds. This is the same time recorded when all components were operating in their own data center. Azure Apps were not the problem. It was the database!

How Much For Performance?

One of the great things with Azure is the ability to scale objects as needed. This includes the throughput of a database. The Basic Azure SQL database is rated at 5 DTUs, a rather vague all encompassing label that doesn’t scream out performance. I’d be willing to bump up the scale of my database a bit if the results would be worth it. But how much would be required to mimic the performance I now had?

Azure SQL Performance

Leaving everything else the same I proceeded to bump up the scale of the Azure SQL database to see how many DTUs would be required to improve performance. Here are the results:

TestFirst Byte In Seconds
Current Provider.361
Remote DB.366
B 5 DTUs2.7
S0 10 DTUs1.7
S1 20 DTUs.998
S2 50 DTUs.347

Finally, I found performance that beat using the old remote database! The problem with this “solution” is the fact that the S2 database providing 50 DTUs of performance costs $75 a month. With the price of the app plan that will add up to about $120, quite a bit more than the $20 or so of the other host.

I’m willing to pay more for Azure but I’m not sure if I’m willing to pay 6 times more. Some might argue that the Azure SQL offering is more consistent with its capacity. The SQL Server on the other hosting provider may provide highly variable performance that might sometimes fall below the worst case scenario of Basic Azure SQL. I can’t deny that, but I also cannot accept pages that take twice as long to load and costs 6 times as much.

Does this mean the dream is over? Maybe not. Perhaps there’s some setting I’m overlooking. If anyone has a hint to offer I’m all ears! Until then, I’ll keep the majority of my sites where they currently reside and consider scaling back what I do have on Azure.

Posted in Programming | Tagged | Leave a comment

Emergency Lessons – Don’t Wait

This article is one of a series of posts that emerged due to the 2017 wildfires that ravaged California wine country near our home.

Emergencies don’t wait for you to be prepared before they spring up. They have their own schedule. So it’s important to start your preparation process early. Right now happens to be a good time.

What time is it?

I’ll offer myself up as an example of not following my own advice. Today is October 8, 2019 and our utility (PG&E) has informed most of Sonoma County and much of the North Bay that they will cut electricity to upwards of 800,000 people just on the chance that high winds will trigger another fire storm like we experienced in 2017.

Yes, we have an emergency bag. Yes, we have some emergency water. Do we have enough working flashlights? Ummm…. no as it turns out. What I thought was my go to flashlight simply doesn’t work even with 4 good AA batteries in it. We have 1 flashlight that takes D batteries and two that take C batteries. How many of those batteries do we have? Not enough. I was able to scrounge a couple of lights together, so we’ll be OK, but this was done with the electricity still on and lots of warning. Technically, this is not an emergency. It’s merely an annoyance.

In a real emergency the lights would be out before you knew what hit you. In the dark, can you find your emergency flashlights and be sure they will work? If the answer is no, then you are not prepared. Don’t forget all of the other stuff that should be in your emergency go bag.

Just a few moments ago I ordered a couple of new flashlights from Amazon that just so happen to use the many batteries we do have around the house. These won’t help with tonight’s blackout, should it come. But at least I’m starting to take my own advice; there’s no time like the present to prepare for the next emergency.

Posted in Emergency | 1 Comment

Goodbye Google+

Well, it’s been on its way out for some time, but I finally got around to removing the share on Google+ button from my outdoor sites (Texas Hiking, Austin Explorer and Hiking Trailhead).

Red lined for removal

It seems like it was only yesterday when the Google juggernaut set its sights on Facebook and prognosticators on both sides of the debate offered up their opinions on what the eventual outcome would be. Many thought Google would eat Facebook’s lunch. Spoiler alert… it didn’t happen.

Now that Google has thrown in the towel, the share button above just went nowhere for months now. I should have removed it some time back but it was just never a high priority.

There are some red flags for Facebook’s future even now, but they’re not coming from Google, but rather from some other competitors and/or changing behaviors of people online. Things are in constant flux.

Some might look at the list of share buttons above and see that I’m behind the times. Maybe some things never change after all!

Posted in Programming | Leave a comment

Virtual Geocache Confirmation Page

I made some changes to the virtual cache confirmation page on my Austin Explorer site. The layout is a bit improved. Yes, I know it’s still not great, but I’m not a designer and I don’t have that much time to devote to it!

Previously, AustinExplorer.com could only verify finds of virtual caches located within the Austin area (it’s a long story). With the changes just rolled out, any virtual cache owner can make use of the tool to verify cachers’ finds without having to use manual emails to do so.

What’s a virtual? What’s a cache? On the Geocaching.com site there is a type of geocache (a hidden item found with the use of GPS receivers) that does not use a physical container. Instead, finders have to navigate to the right location and then answer a question based on some clue that was present at the virtual cache site. For some time now Geocaching.com has not allowed any new virtuals to be created, but exiting ones were grandfathered in.

An example usage of the auto-confirm page would be a cacher who goes to find my Run of the Mill Cache. Along with the coordinates to the cache location there is a question that needs to be answered to log the cache find and a link to my site to do so:

A click on the auto-confirm link brings the cacher to the relevant page. The user supplies their Geocaching.com name and the answer and gets confirmation. The cache owner gets an email so they know that user X that just logged a find on Geocaching.com actually did find it.

If you are one of the few virtual cache owners who are growing a bit weary answering emails for virtual cache finds get in touch with me and we’ll set you up to automate things.

Update (5/19/2019)

Virtual caches remain a grandfathered cache type on Geocaching.com, but there is a window of opportunity to be one of the lucky few who own and maintain one. Geocaching.com has announced a Virtual Rewards 2.0 promotion through which 4,000 new virtual caches will be authorized. There is some eligibility criteria that I can’t meet, but if you can then consider registering to get a slot and then you can use AustinExplorer.com to handle some of the maintenance requirements for your cache. The deadline to apply is June 1, 2019.

Posted in Geocaching | Leave a comment

Vine Pruning

Since moving to Sonoma, Penny and I have taken an increased interest in wine. We’re not content to merely drink the final product, though that’s fun too. We both took an interest in how and why things are done the way they are. A recent event held at Benovia Winery provided us with another opportunity to create a greater appreciation for how wine is made.

Benovia Winery

The Benovia Pruning Seminar provided instruction and hands-on experience of vine pruning. We learned a lot and the vineyard workers who assisted the group were good sports. The speed at which they make pruning decisions is impressive.

There are multiple methods of pruning a vine and we learned two techniques, cordon pruning (a.k.a spur pruning) and cane pruning. Vineyard Manager Chris Kangas said we would never look at vineyards as we drove by them the same way after the seminar. He was right. As we drive through the countryside now we compare and contrast the pruning styles of each of the blocks we pass.

For our efforts we were each rewarded with a certificate of achievement.

Benovia Pruning Seminar Certificate
Benovia Pruning Seminar Certificate

What are the other methods of pruning? We’re not sure but we’ve seen some old vine Zin vineyards in particular that do not match any logical or uniform pattern. The growers just kind of let the vines do their own thing. We’ve coined the term laissez-faire pruning for those examples.

No visit to a winery would be complete without a tasting. We were able to sample some of Benovia’s Chardonnay, Pinot Noir and Zinfandel. A few of the wines were made with grapes from the very fields we had trampled on earlier. Smartly, the tasting took place after the participants handled sharp instruments in the vineyard!

Posted in Uncategorized | 1 Comment

Index Attribute in ASP.Net Core

I was attempting to add an [Index] attribute to a field on a project I started recently that’s using ASP.Net Core 2.2. Though the number of records in the table for now is not terribly large I was just planning for the future.

Despite adding the needed using statements to get access to the attribute I could not get Intellisense to quit squawking about it.

Turns out there’s a difference between Entity Framework and Entity Framework Core in this case. Seems this feature was left out because of issues.

Leaving out the index attribute from the migration and then adding the index to the column after updating the database is easy enough to do but presents problems. If you have to back out that last migration for some reason and then reapply you’ll have to remember to perform the step to re-add the index. The same problem occurs if you try and run the code on a new installation elsewhere.

Instead, after the migration has been create and before it’s used to update the database just manually modify the migration’s Up() method to add the needed index.


protected override void Up(MigrationBuilder migrationBuilder)
{
    // Table creation code created by migration here

    migrationBuilder.CreateIndex(
        "IX_SomeRecords_Name",
        "SomeRecords",
        "Name"
    );
}

You should be able to update the database consistently now and in the future without any additional steps.

Posted in C#, Programming | Tagged | Leave a comment

Emergency Lessons – Get To Know Your Neighbors

This article is one of a series of posts that emerged due to the 2017 wildfires that ravaged California wine country near our home.

Communities usually come together when an emergency hits. There’s safety in numbers and assisting one another increases the ability of all to survive a hardship.

The time to build a community is not when disaster is knocking on your door. The time to do that is now! Getting to know your neighbors builds a bond of trust with people you may rely on in the future when an emergency occurs.

Who in your neighborhood needs extra assistance to evacuate? Who is that person loading up a car with your neighbors belongings? Who nearby has a specialty tool you need to make an emergency repair? These sorts of questions can only be answered by getting to know the folks in your neighborhood.

When we moved to Sonoma my wife and I looked around for a neighborhood group that organized happy hours or other events. There was none, so we started our own. We spread some flyers around the neighborhood that said we’d be in our front driveway with a snack and some wine and anyone else was willing to join us. This low level of effort led to monthly events with sometimes 50 people showing up. We continue to host them to this day.

Getting to know the neighbors

An online neighborhood email and contact list was developed to help organize things. How does this tie into emergencies? When the Sonoma wildfires were raging and threatening the city many neighbors evacuated. They used to contact list to keep in touch to ensure those who remained were safe and that our neighborhood was still there. Thankfully, we all were.

Personal emergencies could be a factor as well. Two neighbors left early one morning for a flight to Europe. At the airport they had a sinking suspicion that they had failed to close their garage door when they left. They contacted my wife who walked a short distance to their house to confirm they had indeed left it open and quickly closed it for them. Personal emergency avoided, they were able to enjoy their vacation.

So reach out to your neighbors, get to know them, organize a contact list and perhaps bring more of them on board with some common sense emergency preparedness steps.

Posted in Emergency | 1 Comment

A Fungus Among Us

Typically, the Bay Area gets a lot of rain showers throughout the winter. The near constant moisture in the air and soil has caused an explosion of mushroom growth in our yard.

Two of the larger examples to be found.
They’re everywhere! They’re Everywhere!

Are any of these edible? The only safe answer is no! Let’s just go with that.

Posted in Uncategorized | Leave a comment

Merry Christmas 2018

Merry Christmas to one and all from the Barron household. Curry, in particular, would like to share a word or two.

Have a Merry Christmas, or else!
Posted in Uncategorized | Leave a comment

The Best Christmas Songs

Many popular Christmas songs have been re-recorded numerous times. Do an Amazon MP3 search for some of the more popular ones and you might find more than one thousand listed.

But there can only be one best rendition.  Here is my list of some popular Christmas tunes that I think have been done as well as or better than any other effort over the years.

Song Artist
Baby, It’s Cold Outside Dean Martin
Blue Christmas Elvis Presley
The Christmas Song (Merry Christmas To You) Nat King Cole
Deck The Hall Nat King Cole
Hark! The Herald Angels Sing Nat King Cole
A Holly Jolly Christmas Burl Ives
Have Yourself a Merry Little Christmas Frank Sinatra
I’ll Be Home For Christmas Bing Crosby
It’s Beginning to Look a Lot Like Christmas Dean Martin
It’s the Most Wonderful Time of the Year Andy Williams
Jingle Bell Rock Bobby Helms
O Come All Ye Faithful Nat King Cole
O Holy Night Nat King Cole
Rockin’ Around The Christmas Tree Brenda Lee
Santa Claus Is Coming To Town Frank Sinatra
Silent Night Bing Crosby
Sleigh Ride Johnny Mathis
Silver And Gold Burl Ives
White Christmas Bing Crosby

I know there are a few that are missing here but there’s a solid play list for your Christmas parties this year.

Posted in Uncategorized | Leave a comment