Understanding SEQ data storage and indexing and practical limits #1349
Replies: 2 comments 1 reply
|
Hi Matt! Thanks for checking out Seq. RE archiving and retrieving old data, the usual tactic with Seq is to use Seq.App.JsonArchive to stream incoming logs to a set of newline-delimited JSON files on a volume or file share accessible to the Seq server. These can be read back into the same Seq instance, but it's usually better to grab files of interest and analyze them on a local/individual instance of Seq, rather than to import them back into the original server. The Many-GB with Seq is typical; 100s of GB is also comfortable with a good configuration on suitable hardware. 1TB+ stores aren't super-unusual, though the comfort level of doing this depends heavily on the hardware, and the appropriate hardware will depend heavily:
Doing this is usually a matter of tuning over time - as you'd expect, it's not as straightforward as installing the software and dumping in a terabyte of data 😅. There unfortunately isn't a great alternative to testing with the expected load, but you might look at something like an AWS r5.4xlarge or r5.8xlarge as a reasonable starting point. Seq is also heavily geared towards avoiding the need for massive online data volumes; if you haven't spotted it already, you might find some interesting background in our recent blog post on storage management: https://blog.datalust.co/storage-view/ Quite often when teams end up with massive log volumes, it's due to a disproportionate amount of noise mixed in with the useful log data. This isn't always avoidable, but over time we've worked hard on fine-grained ingestion and retention controls to help battle this and keep costs under control. I'm Hope this helps! |
|
@mattchristenson In my workplace we're using a decent size production Seq instance ... currently ~782GB indexed. We've implemented retention policies for some very noisy non-prod data (7 days), very noisy prod data (30 days) and all other data (90 days). We apply a 'retention value' consideration against our logs; that is, logs with a lot of 'noise' that isn't useful are in the 30 day basket, while some high volume logging has no 'noise' but high value to hold online for the 90 days. We have Json archives set which export data based on signal, which allows us to have complete archives for each application that is logging to Seq, and gives us long term storage). One of my periodic efforts is to circle back on any additions to our Seq logging and ensure that a Json archive has been allocated. The Json archive app is excellent for purpose, and if we use an app like Agent Ransack to search the resulting Json files, we can generally even do without importing them back into a Seq instance. As touched on for the Json archives, we use signals to index our logs. Obviously this powers our ability to query logs - queries against signals always perform better - but also powers our monitoring and alerting, so that using signals, we can build 'views' that dashboards and apps can watch and alert on. I have a strong focus on trying to foster good structured logging in our environment, which has spilled over into the apps I've been creating and contributing to. This helps greatly with monitoring and alerting in particular, but as noted by @nblumhardt, structured events are much easier to query. This really is a matter of tuning over time ... for example while writing this, I found one of our devs had changed a signal into something that was less than ideal, so after correcting that, I've protected the signal to avoid future pain! I've also moved over time to a separate system drive, data drive (for Seq logs), archive drive, and page file to minimise IO impact on the data drive. We have an enterprise license, so my goal is to shift to a HA pair from 2021.3 onward, a separate non-prod instance, and probably a DR instance running on the free license for the sake of allowing apps in DR to log to Seq. Performance is dependent upon, in order - CPU, memory, and disk speed. @nblumhardt might well say that memory goes first - he'd know - but I've certainly found more CPU is of great value. In our environment, feeding Seq enough RAM to hold everything in memory isn't really viable, and once we resort to disk, queries will slow. A few tips;
I feel it's obvious that I love Seq, and I'm always finding opportunities to add more and more apps into our Seq logging, along with contributing back to the community by creating to new apps and collaborating on enhancements to other apps. I can't recommend it highly enough - cost effective, efficient, powerful, plenty of open source apps to leverage ... the list goes on. I used it as a single-user POC instance for some years before my workplace finally agreed to make the purchase, but that was actually to our advantage - I had the background knowledge on Seq, had done some development on POC implementations of Seq logging in our applications, and had a clear picture of what was needed (including mandating logging to a centralised application logging server, Seq). This is an ongoing effort - I've created common C# and Java log libraries, Linux scripts, Seq apps to suit needs and niches, extended other apps to improve the monitoring and alerting story, and dug down into how to make Seq apps interoperable. It needs a mindset focused towards logging that ultimately pays off in spades. Hope that's of some help. Cheers, Matt |
Uh oh!
There was an error while loading. Please reload this page.
Hello!
We're considering using SEQ at our organization. Initial tests show some great performance when searching and sorting and getting to the logs that are important to us, but I'm a little concerned about how the scalability of this works? When we get to having many GB , 100s of GB, or 1TB+ of logs, is there indexing that allows searches to continue to work well? How does archiving older records - say anything older than 90 days, but with some ability to bring that back in for analysis later work?
Can you share your high volume experiences with me?
Thanks for your time!
-Matt Christenson
All reactions