skywalking的那些配置参数

这篇具有很好参考价值的文章主要介绍了skywalking的那些配置参数。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

storage.elasticsearch.bulkActions

文档:

Async bulk size of the record data batch execution.

源码:

// org.apache.skywalking.library.elasticsearch.bulk.BulkProcessor
public CompletableFuture<Void> add(UpdateRequest request) {
        return internalAdd(request);
    }

    @SneakyThrows
    private CompletableFuture<Void> internalAdd(Object request) {
        requireNonNull(request, "request");
        final CompletableFuture<Void> f = new CompletableFuture<>();
        requests.put(new Holder(f, request));
        flushIfNeeded();
        return f;
    }

    @SneakyThrows
    private void flushIfNeeded() {
        if (requests.size() >= bulkActions) {
            flush();
        }
    }

就是多少个update请求会作为一批,一块flush.

storage.elasticsearch.flushInterval

文档:

Period of flush (in seconds). Does not matter whether bulkActions is reached or not. INT(flushInterval * 2/3) is used for index refresh period.

源码1:

BulkProcessor(
        final AtomicReference<ElasticSearch> es, final int bulkActions,
        final Duration flushInterval, final int concurrentRequests) {
        。。。
        scheduler.scheduleWithFixedDelay(
            this::flush, 0, flushInterval.getSeconds(), TimeUnit.SECONDS);
    }

就是每隔多少秒flush一次。

源码2:org.apache.skywalking.oap.server.storage.plugin.elasticsearch.base.StorageEsInstaller#createSetting

protected Map<String, Object> createSetting(Model model) throws StorageException {
        Map<String, Object> setting = new HashMap<>();
        // Set the index refresh period as INT(flushInterval * 2/3). At the edge case,
        // in low traffic(traffic < bulkActions in the whole period), there is a possible case, 2 period bulks are included in
        // one index refresh rebuild operation, which could cause version conflicts. And this case can't be fixed
        // through `core/persistentPeriod` as the bulk fresh is not controlled by the persistent timer anymore.
        int indexRefreshInterval = config.getFlushInterval() * 2 / 3;
        if (indexRefreshInterval < 5) {
            // The refresh interval should not be less than 5 seconds (the recommended default value = 10s),
            // and the bulk flush interval should not be set less than 8s (the recommended default value = 15s).
            // This is a precaution case which makes ElasticSearch server has reasonable refresh interval,
            // even this value is set too small by end user manually.
            indexRefreshInterval = 5;
        }
        setting.put("index.refresh_interval", indexRefreshInterval + "s");
        return setting;
    }

就是设置index.refresh_interval的值。
因此,storage.elasticsearch.flushInterval这参数实际是有2个作用的。

storage.elasticsearch.concurrentRequests

文档:

The number of concurrent requests allowed to be executed.

源码:

//org.apache.skywalking.library.elasticsearch.bulk.BulkProcessor#BulkProcessor
BulkProcessor(
        this.bulkActions = bulkActions;
        this.semaphore = new Semaphore(concurrentRequests > 0 ? concurrentRequests : 1);
}
// org.apache.skywalking.library.elasticsearch.bulk.BulkProcessor#flush
void flush() {
        if (requests.isEmpty()) {
            return;
        }
        try {
            semaphore.acquire();
        } catch (InterruptedException e) {
            log.error("Interrupted when trying to get semaphore to execute bulk requests", e);
            return;
        }
    }

就是允许多少个线程并发的执行flush。

ps:文档在这里文章来源地址https://www.toymoban.com/news/detail-425703.html

到了这里,关于skywalking的那些配置参数的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • SkyWalking监控工具部署配置(单机模式:standalone)

    一、下载软件: 以最新版本8.9.0为例: 下载地址: https://skywalking.apache.org/downloads/ 1.下载APM监控平台程序: 2.下载代理探针工具程序: 2.解压下载的文件:  二、配置文件 1.配置APM:本机使用的话基本不用改动 配置文件位置:E:softwareapache-skywalking-apm-binconfigapplication.yml 2

    2024年02月16日
    浏览(34)
  • Skywalking 配置es 密码登陆 sky-oap 启动失败 docker启动skywalking失败 docker启动sky-oap 认证密码失败

    1. 首先 关闭es 密码认证,先让skywalking 启动成功,然后修改 skywalking的配置文件,添加账号,密码即可 步骤1 :进入es容器:     进入config 文件夹 配置文件为 elasticsearch.yml  : 步骤2 : 如果缺少vim命令 安装vim , 命令为:  步骤3 :配置es免密登陆,  将xpack.security.enabled:tru

    2024年02月12日
    浏览(34)
  • 5步带你玩转SpringBoot自定义自动配置那些知识点

    目前SpringBoot框架真的深受广大开发者喜爱,毕竟它最大的特点就是: 快速构建基于Spring的应用程序的框架,而且它提供了各种默认的功能和配置,可以让开发者快速搭建应用程序的基础结构。 但是,当我们需要自定义一些配置时,我们就需要使用自定义自动配置。 今天一定

    2024年02月09日
    浏览(26)
  • Spring RabbitMQ那些事(1-交换机配置&消息发送订阅实操)

    在上一节 RabbitMQ中的核心概念和交换机类型 中我们介绍了RabbitMQ中的一些核心概念,尤其是各种交换机的类型,接下来我们将具体讲解各种交换机的配置和消息订阅实操。 我们先上应用启动配置文件 application.yml ,如下: 备注:这里我们指定了 RabbitListenerContainerFactory 的类型

    2024年01月17日
    浏览(30)
  • Spring Cloud Config配置服务及那些你不知道的坑

    目录 1、为什么选择Spring Cloud Config 1.1 集中式管理 1.2 动态修改配置 2、Spring Cloud Config 简介 3、服务端配置 3.1 添加依赖 3.2 开启服务注册 3.3 添加YML配置 3.4 创建远程分支及Profile配置文件 3.5 启动并测试服务 4、客户端配置 4.1 添加依赖 4.2 开启服务注册 4.3 添加YML配置 4.4 启动并

    2024年02月05日
    浏览(27)
  • Linux安全配置步骤简述_linux的安全如何做?从那些方面人手

    先自我介绍一下,小编浙江大学毕业,去过华为、字节跳动等大厂,目前阿里P7 深知大多数程序员,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前! 因此收集整理了一份《2024年最新软件测试全套学习资料》

    2024年04月27日
    浏览(26)
  • .NET学习笔记----关于.NET Core那些事(3)【配置文件的读取、json文件的通用解析、读取静态文件】

    appsettings.json准备 控制器中读取json 定义与配置文件中需要获取的标签结构完全一致的实体类:IConfiguration .Bind() ----反序列化 要读取的json字符串 定义的实体类 读取json 用到的json字符串 == 用到的类 Startup.cs中的配置 控制器中的代码 运行结果 当我们用《关于.NET Core那些事(2)》

    2024年02月04日
    浏览(31)
  • Spring Cloud【SkyWalking日志、SkyWalking告警 、Skywalking自定义告警规则】(十五)

      目录 分布式请求链路追踪_SkyWalking日志 分布式请求链路追踪_SkyWalking告警 

    2024年02月14日
    浏览(25)
  • tomcat内存配置及配置参数详解

    tomcat内存配置及配置参数详解 1、jvm内存管理机制: 1)堆(Heap)和非堆(Non-heap)内存 按照官方的说法:“Java 虚拟机具有一个堆,堆是运行时数据区域,所有类实例和数组的内存均从此处分配。堆是在 Java 虚拟机启动时创建的。”“在JVM中堆之外的内存称为非堆内存(Non-heap memor

    2024年02月07日
    浏览(31)
  • SpringBoot 启动配置文件加载和参数配置修改问题

    SpringBoot 或者SpringCloud 有配置文件加载和参数修改的机制,本文将从两个角度阐述参数修改和配置文件启动覆盖问题。 以下几种方式都可以被@Value读取到 java -jar -Dserver.port=8080 -Xms1024m demo.jar java -jar demo.jar --server.port=8080 从操作系统的环境变量中读取 通过项目中配置文件boots

    2023年04月15日
    浏览(34)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包