I use Azure Kubernetes service, which is connected to Log Analytics Workspace.
Log Analytics Workspace collects too much data, what is quite expensive.
After googling the ways to reduce the costs I found a few recommendations, but most of them about reducing the ContainerLogs size. My case is different. I do need all ContainerLogs, but nothing else.
On the image you can see the result of running this query:
union withsource = tt *
| where TimeGenerated > ago(1day)
| where _IsBillable == true
| summarize BillableDataMBytes = sum(_BilledSize)/ (1000. * 1000.) by tt
| render piechart
As you can see I need only 3% of all stored data, the rest 97% I want to disable or reduce (take new values much rare). Is it possible?
Is it possible to disable/reduce at least the "Perf"?
Basic Logs and Archive Logs options can help you. Please take a look at this article.
You can find explanation below regarding Basic Logs.
The first option is the introduction of “Basic Logs”. This sits
alongside the current option, called “Analytics Logs”. Basic logs
allow you to designate specific tables in your Log Analytics workspace
as “basic”. This then means that the cost of the data ingestion is
reduced; however, some of the features of Log Analytics are not
available on that data. This means that you cannot configure alerts on
this data, and the options for querying the data are limited. You also
pay a cost for running a query against the data.
For the Archive Logs:
The second change is adding an option for archiving logs. It is often
necessary to keep certain logs for an extended period due to company
or regulatory requirements. Log Analytics does support retention of
logs for up to two years, but you pay a retention cost that is
relatively high because the data is kept in live tables that can be
accessed at any time.
Archive logs allow you to move the data into an offline state where it
cannot be accessed directly but is significantly cheaper. Archive data
is charged at $0.025 per GB per month, compared to $0.12 per GB per
month for standard data retention. If you need to access the archive
data, you pay an additional fee for either querying the archive or
restoring it to active tables. This costs $0.007 per GB of data
scanned for querying or $0.123 per GB per day of data restored (so
effectively the same as standard data retention.). These prices were
correct at the time of publishing, please check the Azure Monitor
pricing page.
Related
After having some latencies on our Azure Storage and especially on some File Shares, we configured a log analytics workspace to see what's going on. I was surprised by the amount of failed queries : (during 4 hours)
To explain the situation, we have one entity that scans this shared folder to check if there is a file to consume. So the "ErrorCount" might represent the number of times the entity scan the folder.
Is that a common behavior?
"StatusCode" = 0 , what does it mean ?
I have a DWH running on Azure Synapse dedicated pool.
In addition to existing nightly/daily ETL processes, I need to add another in parallel that will kill performance of the current instance. That process is required to be run only 1 week per month during day time.
Similar to a Snowflake approach, is it possible to set up independent Azure Synapse compute to process the same data as the first instance? Not a copy of data, but the same data in the same files.
Or should I simply change instance size 2 times a day for 1 weak per month? (Requires to pause all activity)
Any advise will be appreciated!
Thanks!
I agree that scaling up or using a serverless SQL pool is a good option.
Before implementing I would also evaluate if the additional (and/or existing) process you are adding is properly optimized for MPP. Validate first that you are effectively co-locating data as much as possible via leveraging common HASH distributions. Often times ETL written first for SQL server (SMP) needs some amount of refactoring to truly leverage the power of MPP.
Look at query plans for long running jobs - is there excessive data broadcasting or shuffling? Fix via updating table distributions
Are statistics available and up to date?
My application relies heavily on a queue in in Windows Azure Storage (not Service Bus). Until two days ago, it worked like a charm, but all of a sudden my worker role is no longer able to process all the items in the queue. I've added several counters and from that data deduced that deleting items from the queue is the bottleneck. For example, deleting a single item from the queue can take up to 1 second!
On a SO post How to achive more 10 inserts per second with azure storage tables and on the MSDN blog
http://blogs.msdn.com/b/jnak/archive/2010/01/22/windows-azure-instances-storage-limits.aspx I found some info on how to speed up the communication with the queue, but those posts only look at insertion of new items. So far, I haven't been able to find anything on why deletion of queue items should be slow. So the questions are:
(1) Does anyone have a general idea why deletion suddenly may be slow?
(2) On Azure's status pages (https://azure.microsoft.com/en-us/status/#history) there is no mentioning of any service disruption in West Europe (which is where my stuff is situated); can I rely on the service pages?
(3) In the same storage, I have a lot of data in blobs and tables. Could that amount of data interfere with the ability to delete items from the queue? Also, does anyone know what happens if you're pushing the data limit of 2TB?
1) Sorry, no. Not a general one.
2) Can you rely on the service pages? They certainly will give you information, but there is always a lag from the time an issue occurs and when it shows up on the status board. They are getting better at automating the updates and in the management portal you are starting to see where they will notify you if your particular deployments might be affected. With that said, it is not unheard of that small issues crop up from time to time that may never be shown on the board as they don't break SLA or are resolved extremely quickly. It's good you checked this though, it's usually a good first step.
3) In general, no the amount of data you have within a storage account should NOT affect your throughput; however, there is a limit to the amount of throughput you'll get on a storage account (regardless of the data amount stored). You can read about the Storage Scalability and Performance targets, but the throughput target is up to 20,000 entities or messages a second for all access of a storage account. If you have a LOT of applications or systems attempting to access data out of this same storage account you might see some throttling or failures if you are approaching that limit. Note that as you saw with the posts on improving throughput for inserts these are the performance targets and how your code is written and configurations you use have a drastic affect on this. The data limit for a storage account (everything in it) is 500 TB, not 2TB. I believe once you hit the actual storage limit all writes will simply fail until more space is available (I've never even got close to it, so I'm not 100% sure on that).
Throughput is also limited at the partition level, and for a queue that's a target of Up to 2000 messages per second, which you clearly aren't getting at all. Since you have only a single worker role I'll take a guess that you don't have that many producers of the messages either, at least not enough to get near the 2,000 msgs per second.
I'd turn on storage analytics to see if you are getting throttled as well as check out the AverageE2ELatency and AverageServerLatency values (as Thomas also suggested in his answer) being recorded in the $MetricsMinutePrimaryTransactionQueue table that the analytics turns on. This will help give you an idea of trends over time as well as possibly help determine if it is a latency issue between the worker roles and the storage system.
The reason I asked about the size of the VM for the worker role is that there is a (unpublished) amount of throughput per VM based on it's size. An XS VM gets much less of the total throughput on the NIC than larger sizes. You can sometimes get more than you expect across the NIC, but only if the other deployments on the physical machine aren't using their portion of that bandwidth at the time. This can often lead to varying performance issues for network bound work when testing. I'd still expect much better throughput than what you are seeing though.
There is a network in between you and the Azure storage, which might degrade the latency.
Sudden peaks (e.g. from 20ms to 2s) can happen often, so you need to deal with this in your code.
To pinpoint this problem further down the road (e.g. client issues, network errors etc.) You can turn on storage analytics to see where the problem exists. There you can also see if the end2end latency is too big or just the server latency is the limiting factor. The former usually tells about network issues, the latter about something beeing wrong on the Queue itself.
Usually those latency issues a transient (just temporary) and there is no need to announce that as a service disruption, because it isn't one. If it has constantly bad performance, you should open a support ticket.
I'm looking at performance improvements for Azure Web Role and wondering if Diagnostics should be left on when publishing/deploying to the production site. This article says to disable it, but one of the comments say you lose critical data.
You should absolutely leave it enabled. How else will you do monitoring or auto-scaling of your application, once it is running in production?
Whether you use on-demand monitoring software like RedGate/Cerebrata's Diagnostic Manager or active monitoring/auto-scaling service like AzureWatch, you need to have Diagnostics enabled so that your instances are providing the external software with a way to monitor it and visualize performance data.
Just don't go crazy and enable every possible diagnostic data to be captured at the most frequent rate possible, but do so on a need basis.
Consider the reality that these "thousands of daily transactions" cost approximately 1 penny for 100k of transactions. So, if you transfer data once per minute to table storage, this is 1440 transactions per server per day, or 43,200 transactions per server per month. A whopping 0.43cents per server per month. If the ability to quickly debug or be notified of a production issue is not worth 0.43 cents per server per month, then you should reconsider your cost models :)
HTH
How do I resize my SQL Azure Web Edition 5 GB database to a 1 GB database? I no longer need the extra capacity and do not want to be billed at the higher rate. I don't see anything in the Management Portal and a quick web search also turned up nothing.
I answered a similar question here. It should be as simple as running an ALTER DATABASE command:
ALTER DATABASE MyDatabase MODIFY (EDITION='WEB', MAXSIZE=1GB)
Just keep this in mind: As long as your usage is <= 1GB, you'll be billed at the 1GB rate. Billing is monthly but amortized daily. So you actually don't need to reduce your max size unless you're relying on SQL Azure to prevent you from growing beyond 1GB.
EDIT: As of Feb. 2012, there's a new 100MB pricing tier (at $4.99, vs. $9.99 at 1GB). While you can't set MAXSIZE to 100MB, your monthly cost will drop if you stay under 100MB. See this blog post for more details.