January 2015 Summaries
5 posts from Elastic
Filter
Month:
Year:
Post Summaries
Back to Blog
Apache Lucene handles deleted documents by marking them in a per-segment bitset, deferring the reclaiming of disk space and term statistics updates until segments are merged. This approach avoids the high cost of immediate updates to the index's data structures and statistics but results in temporary disk space occupation and continued RAM usage for deleted documents. The default merge policy, TieredMergePolicy, prioritizes merging segments with more deletions to reclaim space, though overly aggressive settings can lead to inefficient merges. Search performance is affected as deleted documents still need to be skipped during searches, although the impact is generally less than the percentage of deletions. The optimize API in Elasticsearch allows for forceful space reclamation, but this can be costly and is better left to natural merging unless necessary. For time-sensitive applications, using time-based indices can provide a more efficient way to handle deletions compared to letting Lucene manage them. Overall, it's advisable to rely on Lucene's default settings for handling deletions and merges, as they generally balance performance and resource management effectively.
Jan 30, 2015
1,367 words in the original blog post.
Sub-aggregations in Elasticsearch allow for the embedding of aggregations, both buckets and metrics, within other aggregations, enabling more refined and hierarchical data analysis. This powerful feature facilitates the continuous refinement of criteria groups, applying metrics at various levels to enhance the depth of reports. For example, by embedding buckets within buckets, users can determine the top contributing factors to incidents within different boroughs, enriching the original aggregation data with additional insights. Moreover, metrics, when used as sub-aggregations, can compute values based on documents within a bucket, such as calculating the total number of cyclist injuries in each borough. This combination of buckets and metrics offers limitless possibilities for data analysis, allowing for detailed reports on incidents by month, cause, and borough. These aggregations can be executed rapidly and update in near real-time, providing dynamic insights as new data streams in, showcasing the robust capabilities of Elasticsearch and its integration with Kibana for real-time data summaries and analyses.
Jan 22, 2015
1,003 words in the original blog post.
Konrad Beiske's article discusses the importance of monitoring memory usage in Elasticsearch, particularly focusing on the memory pressure indicator within the Elastic Cloud (formerly Found) console. The indicator is based on the fill rate of the old generation pool in the Java Virtual Machine (JVM), as this provides a more stable measure compared to total memory usage, which fluctuates due to garbage collection processes. The article explains that memory usage below 75% is considered safe, while usage between 75% and 85% is acceptable if performance remains stable, but action should be taken to reduce memory consumption or add more memory if usage exceeds 85%. High memory pressure can lead to increased CPU usage due to more frequent garbage collections, and if memory approaches 100% without sufficient garbage collection, the system may experience allocation failures and switching to a stop-the-world garbage collector, which can temporarily halt Elasticsearch operations. Beiske emphasizes the importance of monitoring and maintaining memory usage to prevent performance degradation and potential system instability.
Jan 21, 2015
1,363 words in the original blog post.
Interfacing with Elasticsearch can initially be confusing due to the various client types and protocols available for connecting to it, but understanding these options can simplify the decision-making process. Official clients supported by Elasticsearch are available for many programming languages, with the HTTP protocol being the most commonly used due to its wide support and community backing. The Transport client, suitable for Java users, offers native JVM performance but requires synchronization of versions between server and client, while the Node client, also Java-based, integrates more deeply into the cluster but at the cost of increased complexity and resource usage. When it comes to HTTP clients, they offer flexibility and speed, often competing with native protocols, and are recommended for most use cases due to their ability to handle connection pooling and keep-alives efficiently. Other protocols, such as Memcached and Apache Thrift, offer additional flexibility through plugins but come with less community support and potential deprecation risks. Ultimately, the choice of client should be guided by performance benchmarks, language compatibility, and ease of use, with a preference for official clients or high-performance HTTP clients when possible.
Jan 14, 2015
1,433 words in the original blog post.
Elasticsearch, widely recognized for its search capabilities, is also a robust analytics engine that can be harnessed to analyze data and generate custom dashboards with near real-time responses. This article introduces developers to the use of Elasticsearch's aggregation features, which allow for data analysis by summarizing datasets rather than focusing on individual documents. By leveraging the same Lucene indices used for search, aggregations can produce immediate updates as data changes, offering advantages over traditional batch processing systems. The article provides a practical walkthrough using the New York City Traffic Incident dataset to demonstrate how aggregations can categorize data into buckets based on criteria such as boroughs and time, and calculate metrics like the total number of cyclist injuries. This developer-centric approach emphasizes the flexibility and efficiency of combining multiple aggregations in a single API call to create comprehensive reports, setting the stage for more advanced topics in subsequent articles.
Jan 13, 2015
1,497 words in the original blog post.