开发者本地搭建性能监测工具(Windows)
ElasticSearch 8.9.0 开发模式安装
JDK安装
官方提供版本与JDK支持关系:https://www.elastic.co/cn/support/matrix#matrix_jvm
我们安装Elasticsearch 8.9.x,看到支持的最低JDK版本是17。
JDK(Windows/Mac含M1/M2 Arm原生JDK)安装,附各个版本JDK下载链接:https://es-cn.blog.csdn.net/article/details/126861940
Oracle JDK 官方下载:https://download.oracle.com/java/17/latest/jdk-17_windows-x64_bin.exe
按照默认设置进行安装。
安装之后我们默认的JDK版本会变成17,这是因为安装过程自动添加了环境变量。在Path环境变量中清理如下两个环境变量(一般在最上面,移动到下面也可以):
- C:\Program Files\Common Files\Oracle\Java\javapath
- C:\Program Files (x86)\Common Files\Oracle\Java\javapath
新建环境变量:
| 变量名 | 变量值 |
|---|---|
| ES_JAVA_HOME | C:\Program Files\Java\jdk-17 |
ElasticSearch下载安装
ElasticSearch下载页面:https://www.elastic.co/cn/downloads/elasticsearch
ElasticSearch 8.9.0 版本下载:https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.9.0-windows-x86_64.zip
注意:路径中不能存在空格
解压,修改config目录下elasticsearch.yml
# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
# 代表一个集群,集群中有多个节点,其中有一个为主节点,这个主节点是可以通过选举产生的,主从节点是对于集群内部来说的
# Elasticsearch的一个概念就是去中心化,字面上理解就是无中心节点,这是对于集群外部来说的,因为从外部来看Elasticsearch集群,在逻辑上是个整体,你与任何一个节点的通信和与整个Elasticsearch集群通信是等价的。
# cluster.name可以确定你的集群名称,当你的elasticsearch集群在同一个网段中elasticsearch会自动的找到具有相同cluster.name的Elasticsearch服务。所以当同一个网段具有多个Elasticsearch集群时cluster.name就成为同一个集群的标识。
# Use a descriptive name for your cluster:
# 集群名称,默认是elasticsearch
cluster.name: elasticsearch
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
# 节点名称同理,可自动生成也可手动配置.
node.name: es-node
#
# Add custom attributes to the node:
# 每个节点都可以定义一些与之关联的通用属性,用于后期集群进行碎片分配时的过滤
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
# 可以指定Elasticsearch的数据存储目录,默认存储在es_home/data目录下
#path.data: /path/to/data
#
# Path to log files:
# 可以指定Elasticsearch的日志存储目录,默认存储在es_home/logs目录下
#path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
# 当JVM开始写入交换空间时(swapping)ElasticSearch性能会低下,你应该保证它不会写入交换空间
# 锁定物理内存地址,防止elasticsearch内存被交换出去,也就是避免elasticsearch使用swap交换分区
bootstrap.memory_lock: true
#
# 确保ES_HEAP_SIZE参数设置为系统可用内存的一半左右
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.# 确保 ES_MIN_MEM 和 ES_MAX_MEM 环境变量设置为相同的值,以及机器有足够的内存分配给Elasticsearch
# 注意:内存也不是越大越好,一般64位机器,最大分配内存别才超过32G #
# 当系统进行内存交换的时候,elasticsearch的性能很差
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# By default Elasticsearch is only accessible on localhost. Set a different
# address here to expose this node on the network:
# 为Elasticsearch设置ip绑定,默认是127.0.0.1,也就是默认只能通过127.0.0.1 或者localhost才能访问
network.host: 127.0.0.1
#
# By default Elasticsearch listens for HTTP traffic on the first free port it
# finds starting at 9200. Set a specific HTTP port here:
# 为Elasticsearch设置自定义端口,默认是9200
http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.seed_hosts: ["host1", "host2"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
#cluster.initial_master_nodes: ["node-1", "node-2"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Allow wildcard deletion of indices:
#
#action.destructive_requires_name: false
# ---------------------------------- Xpack -----------------------------------
xpack.security.enabled: false
回到bin目录下,双击elasticsearch.bat启动
启动会占用系统物理内存的一半,建议根据实际情况调整jvm.options文件-Xms、-Xmx的值。
验证
访问:http://localhost:9200
ElasticSearch 8 默认启动Security,这对新手学习很不友好,实际上违背了Elastic官方设置开发模式的初衷,安全固然重要,但是没必要把门槛设置这么高。
参考:https://es-cn.blog.csdn.net/article/details/123936913
ElasticSearch目录结构
| 目录名称 | 描述 |
|---|---|
| bin | 可执行脚本文件,包括启动ElasticSearch服务、插件管理、函数命令等。 |
| config | 配置文件目录,如ElasticSearch配置、角色配置、jvm配置等。 |
| jdk | 7.x以后特有,自带的Java环境,8.x版本自带jdk 17 |
| lib | ElasticSearch所依赖的Java库 |
| logs | 默认的日志文件存储路径,生产环境要求必须修改 |
| modules | 包含所有的ElasticSearch模块,如Cluster、Discovery、Indices等。 |
| plugins | 已经安装的插件的目录 |
| data | 默认的数据存放目录,包含节点、分片、索引、文档的所有数据,生产环境要求必须修改 |
SkyWalking
SkyWalking下载安装
SkyWalking官网:https://skywalking.apache.org/
Application performance monitor tool for distributed systems, especially designed for microservices, cloud native and container-based (Kubernetes) architectures.
SkyWalking 9.5.0 版本下载:https://dlcdn.apache.org/skywalking/9.5.0/apache-skywalking-apm-9.5.0.tar.gz
解压缩
注意:路径中不能存在空格
修改bin目录下startup.bat文件中
@REM
@REM Licensed to the Apache Software Foundation (ASF) under one or more
@REM contributor license agreements. See the NOTICE file distributed with
@REM this work for additional information regarding copyright ownership.
@REM The ASF licenses this file to You under the Apache License, Version 2.0
@REM (the "License"); you may not use this file except in compliance with
@REM the License. You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing, software
@REM distributed under the License is distributed on an "AS IS" BASIS,
@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@REM See the License for the specific language governing permissions and
@REM limitations under the License.@echo offsetlocal
SET JAVA_HOME=%ES_JAVA_HOME%
call "%~dp0"\oapService.bat start
call "%~dp0"\webappService.bat start
endlocal
修改webapp目录下application.yml文件
serverPort: ${SW_SERVER_PORT:-8080}
修改为:
serverPort: ${SW_SERVER_PORT:-8888}
验证
访问:http://localhost:8888/
SkyWalking默认是使用H2作为存储的,我们修改为ElasticSearch。
修改config目录下application.yml文件
storage:selector: ${SW_STORAGE:elasticsearch}elasticsearch:namespace: ${SW_NAMESPACE:"elasticsearch"}clusterNodes: ${SW_STORAGE_ES_CLUSTER_NODES:localhost:9200}protocol: ${SW_STORAGE_ES_HTTP_PROTOCOL:"http"}connectTimeout: ${SW_STORAGE_ES_CONNECT_TIMEOUT:3000}socketTimeout: ${SW_STORAGE_ES_SOCKET_TIMEOUT:30000}responseTimeout: ${SW_STORAGE_ES_RESPONSE_TIMEOUT:15000}numHttpClientThread: ${SW_STORAGE_ES_NUM_HTTP_CLIENT_THREAD:0}user: ${SW_ES_USER:""}password: ${SW_ES_PASSWORD:""}
# trustStorePath: ${SW_STORAGE_ES_SSL_JKS_PATH:""}
# trustStorePass: ${SW_STORAGE_ES_SSL_JKS_PASS:""}secretsManagementFile: ${SW_ES_SECRETS_MANAGEMENT_FILE:""} # Secrets management file in the properties format includes the username, password, which are managed by 3rd party tool.dayStep: ${SW_STORAGE_DAY_STEP:1} # Represent the number of days in the one minute/hour/day index.indexShardsNumber: ${SW_STORAGE_ES_INDEX_SHARDS_NUMBER:1} # Shard number of new indexesindexReplicasNumber: ${SW_STORAGE_ES_INDEX_REPLICAS_NUMBER:1} # Replicas number of new indexes# Specify the settings for each index individually.# If configured, this setting has the highest priority and overrides the generic settings.specificIndexSettings: ${SW_STORAGE_ES_SPECIFIC_INDEX_SETTINGS:""}# Super data set has been defined in the codes, such as trace segments.The following 3 config would be improve es performance when storage super size data in es.superDatasetDayStep: ${SW_STORAGE_ES_SUPER_DATASET_DAY_STEP:-1} # Represent the number of days in the super size dataset record index, the default value is the same as dayStep when the value is less than 0superDatasetIndexShardsFactor: ${SW_STORAGE_ES_SUPER_DATASET_INDEX_SHARDS_FACTOR:5} # This factor provides more shards for the super data set, shards number = indexShardsNumber * superDatasetIndexShardsFactor. Also, this factor effects Zipkin traces.superDatasetIndexReplicasNumber: ${SW_STORAGE_ES_SUPER_DATASET_INDEX_REPLICAS_NUMBER:0} # Represent the replicas number in the super size dataset record index, the default value is 0.indexTemplateOrder: ${SW_STORAGE_ES_INDEX_TEMPLATE_ORDER:0} # the order of index templatebulkActions: ${SW_STORAGE_ES_BULK_ACTIONS:5000} # Execute the async bulk record data every ${SW_STORAGE_ES_BULK_ACTIONS} requestsbatchOfBytes: ${SW_STORAGE_ES_BATCH_OF_BYTES:10485760} # A threshold to control the max body size of ElasticSearch Bulk flush.# flush the bulk every 5 seconds whatever the number of requestsflushInterval: ${SW_STORAGE_ES_FLUSH_INTERVAL:5}concurrentRequests: ${SW_STORAGE_ES_CONCURRENT_REQUESTS:2} # the number of concurrent requestsresultWindowMaxSize: ${SW_STORAGE_ES_QUERY_MAX_WINDOW_SIZE:10000}metadataQueryMaxSize: ${SW_STORAGE_ES_QUERY_MAX_SIZE:10000}scrollingBatchSize: ${SW_STORAGE_ES_SCROLLING_BATCH_SIZE:5000}segmentQueryMaxSize: ${SW_STORAGE_ES_QUERY_SEGMENT_SIZE:200}profileTaskQueryMaxSize: ${SW_STORAGE_ES_QUERY_PROFILE_TASK_SIZE:200}profileDataQueryBatchSize: ${SW_STORAGE_ES_QUERY_PROFILE_DATA_BATCH_SIZE:100}oapAnalyzer: ${SW_STORAGE_ES_OAP_ANALYZER:"{\"analyzer\":{\"oap_analyzer\":{\"type\":\"stop\"}}}"} # the oap analyzer.oapLogAnalyzer: ${SW_STORAGE_ES_OAP_LOG_ANALYZER:"{\"analyzer\":{\"oap_log_analyzer\":{\"type\":\"standard\"}}}"} # the oap log analyzer. It could be customized by the ES analyzer configuration to support more language log formats, such as Chinese log, Japanese log and etc.advanced: ${SW_STORAGE_ES_ADVANCED:""}# Enable shard metrics and records indices into multi-physical indices, one index template per metric/meter aggregation function or record.logicSharding: ${SW_STORAGE_ES_LOGIC_SHARDING:false}# Custom routing can reduce the impact of searches. Instead of having to fan out a search request to all the shards in an index, the request can be sent to just the shard that matches the specific routing value (or values).enableCustomRouting: ${SW_STORAGE_ES_ENABLE_CUSTOM_ROUTING:false}
相关文章:
开发者本地搭建性能监测工具(Windows)
ElasticSearch 8.9.0 开发模式安装 JDK安装 官方提供版本与JDK支持关系:https://www.elastic.co/cn/support/matrix#matrix_jvm 我们安装Elasticsearch 8.9.x,看到支持的最低JDK版本是17。 JDK(Windows/Mac含M1/M2 Arm原生JDK)…...
嵌入式Linux开发实操(八):UART串口开发
串口可以说是非常好用的一个接口,它同USB、CAN、I2C、SPI等接口一样,为SOC/MCU构建了丰富的接口功能。那么在嵌入式linux中又是如何搭建和使用UART接口的呢? 一、Console接口即ttyS0 ttyS0通常做为u-boot(bootloader的一种,像是Windows的BIOS),它需要一个交互界面,一般…...
公告:微信小程序备案期限官方要求
备案期限要求 1、若微信小程序未上架,自2023年9月1日起,微信小程序须完成备案后才可上架,备案时间1-20日不等; 2、若微信小程序已上架,请于2024年3月31日前完成备案,逾期未完成备案,平台将按照…...
cesium中获取高度的误区
this.ellipsoid viewer.scene.globe.ellipsoid; var cartesian viewer.camera.pickEllipsoid(e.position, this.ellipsoid);if(cartesian){// 苗卡尔椭球体的三维坐标 转 地图坐标(弧度)var cartographic viewer.scene.globe.ellipsoid.cartesianToCa…...
基于Centos:服务器基础环境安装: JDK、Maven、Python、Go、Docker、K8s
创建用户 useradd dev groupadd op chown -R :op /opt chmod -R 770 /opt usermod -aG op devJDK8 yum install -y java-1.8.0-openjdk-devel echo export JAVA_HOME/usr/lib/jvm/java-1.8.0/>> /etc/profilesource /etc/profileJDK11 yum install -y java-11-openjd…...
Elasticsearch的数据删除策略只能触发一次
在Elasticsearch中,可以使用Index Lifecycle Management(ILM)来设置删除数据的保留时长。ILM是Elasticsearch的一项功能,用于管理索引的生命周期,包括数据保留、备份、归档等操作。 要设置删除数据的保留时长…...
Open3D 最小二乘拟合空间直线(方法一)
目录 一、算法原理1、空间直线2、最小二乘法拟合二、代码实现三、结果展示本文由CSDN点云侠原创,原文链接。如果你不是在点云侠的博客中看到该文章,那么此处便是不要脸的爬虫。 一、算法原理 1、空间直线 x −...
解决uniapp 二次登陆 登录页是首页时,登录页闪现问题
pages.json文件中,pages数组中第一项是登录页,用户第一次登录后,存储登录状态,以后再进入应用时,自动登录跳转至首页。 但是自动登录跳转至首页时,登录页总是会闪现一下。 第一步:manifest.js…...
如何快速制作一个房地产电子传单?
在如今高度数字化的时代,电子传单成为了宣传推广的一种重要方式。下面将介绍如何利用乔拓云平台快速制作一个房地产电子传单。 第一步,找一个可靠的第三方制作平台/工具,比如乔拓云平台。乔拓云平台是一个功能强大、简单易用的电子传单制作工…...
golang云原生项目之:etcd服务注册与发现
服务注册与发现:ETCD 1直接调包 kitex-contrib: 上面有实现的案例,直接cv。下面是具体的理解 2 相关概念 EtcdResolver: etcd resolver是一种DNS解析器,用于将域名转换为etcd集群中的具体地址,以便应用程序可以与et…...
arm:day4
1. 实现三盏灯的点亮 .text .global _start_start: led1初始化函数LED_INIT: 1 通过RCC_AHB4_ENSETR寄存器,设置GPIOE F组控制器使能 0x50000A28[5:4]1ldr r0,0X50000A28ldr r1,[r0]orr r1,r1,#(0X3<<4)str r1,[r0] 2.1 通过GPIOE_MODER寄存器,…...
flutter 常见的状态管理器
flutter 常见的状态管理器 前言一、Provider二、Bloc三、Redux四、GetX总结 前言 当我们构建复杂的移动应用时,有效的状态管理是至关重要的,因为应用的不同部分可能需要共享数据、相应用户交互并保持一致的状态。Flutter 中有多种状态管理解决方案&#…...
Kotlin的Map
在 Kotlin 中,Map 是一种键值对的集合数据结构,用于存储一组关联的键和值。Kotlin 标准库提供了 Map 接口和多种实现类,使得操作和处理键值对数据更加方便。下面详细描述 Kotlin 的 Map 的用法: 创建 Map Kotlin 提供了几种方式…...
STM32 串口复习
按数据通信方式分类: 串行通信:数据逐位按顺序依次传输。传输速率较低,抗干扰能力较强,通信距离较长,I/O资源占用较少,成本较低。并行通信:数据各位通过多条线同时传输。 按数据传输方向分类&…...
VScode替换cmd powershell为git bash 终端,并设置为默认
效果图 步骤 1. 解决VScode缺少git bash的问题_failed to start bash - is git-bash.exe on the syst_Rudon滨海渔村的博客-CSDN博客效果解决步骤找到git安装目录下的/bin/bash.exe,复制其绝对路径,例如D:\Program Files\Git\bin\bash.exe把路径的右斜…...
网络基础(一)桥接网络
网络基础知识 桥接网络 桥接网络是一种网络设计技术,其目的是将两个或多个网络段连接在一起,使它们在逻辑上表现为单个网络。这通过使用网络桥来实现,网络桥工作在数据链路层(第2层),只关心MAC地址&#…...
C#程序变量统一管理例子 - 开源研究系列文章
今天讲讲关于C#应用程序中使用到的变量的统一管理的代码例子。 我们知道,在C#里使用变量,除了private私有变量外,程序中使用到的公共变量就需要进行统一的存放和管理。这里笔者使用到的公共变量管理库划分为:1)窗体;2)…...
信息熵,信息增益,增益率的理解
西瓜数据集D如下: 编号色泽根蒂敲声纹理脐部触感好瓜1青绿蜷缩浊响清晰凹陷硬滑是2乌黑蜷缩沉闷清晰凹陷硬滑是3乌黑蜷缩浊响清晰凹陷硬滑是4青绿蜷缩沉闷清晰凹陷硬滑是5浅白蜷缩浊响清晰凹陷硬滑是6青绿稍蜷浊响清晰稍凹软粘是7乌黑稍蜷浊响稍糊稍凹软粘是8乌黑稍蜷浊响清晰…...
二级MySQL(一)——基本概念与方法
数据库系统的核心是【数据库管理系统】 E-R图提供了表示信息世界中的方法,主要有实体、属性和【联系】 E-R图是数据库设计的工具之一,一般适用于建立数据库的【概念模型】 将E-R图转换到关系模式时,实体与联系都可以表示成【关系】 关系数…...
13 Web全栈 pnpm
什么是pnpm? 可以理解成performant npm缩写 速度快、节省磁盘空间的软件包管理器 特点 快速- pnpm比其他包管理器快2倍高效- node_modules中的文件链接自特定的内容寻址存储库支持monorepos- 内置支持单仓多包严格- pnpm默认创建了一个非平铺的node_modules 因此代…...
微软PowerBI考试 PL300-选择 Power BI 模型框架【附练习数据】
微软PowerBI考试 PL300-选择 Power BI 模型框架 20 多年来,Microsoft 持续对企业商业智能 (BI) 进行大量投资。 Azure Analysis Services (AAS) 和 SQL Server Analysis Services (SSAS) 基于无数企业使用的成熟的 BI 数据建模技术。 同样的技术也是 Power BI 数据…...
Vue2 第一节_Vue2上手_插值表达式{{}}_访问数据和修改数据_Vue开发者工具
文章目录 1.Vue2上手-如何创建一个Vue实例,进行初始化渲染2. 插值表达式{{}}3. 访问数据和修改数据4. vue响应式5. Vue开发者工具--方便调试 1.Vue2上手-如何创建一个Vue实例,进行初始化渲染 准备容器引包创建Vue实例 new Vue()指定配置项 ->渲染数据 准备一个容器,例如: …...
Cinnamon修改面板小工具图标
Cinnamon开始菜单-CSDN博客 设置模块都是做好的,比GNOME简单得多! 在 applet.js 里增加 const Settings imports.ui.settings;this.settings new Settings.AppletSettings(this, HTYMenusonichy, instance_id); this.settings.bind(menu-icon, menu…...
工业自动化时代的精准装配革新:迁移科技3D视觉系统如何重塑机器人定位装配
AI3D视觉的工业赋能者 迁移科技成立于2017年,作为行业领先的3D工业相机及视觉系统供应商,累计完成数亿元融资。其核心技术覆盖硬件设计、算法优化及软件集成,通过稳定、易用、高回报的AI3D视觉系统,为汽车、新能源、金属制造等行…...
Android Bitmap治理全解析:从加载优化到泄漏防控的全生命周期管理
引言 Bitmap(位图)是Android应用内存占用的“头号杀手”。一张1080P(1920x1080)的图片以ARGB_8888格式加载时,内存占用高达8MB(192010804字节)。据统计,超过60%的应用OOM崩溃与Bitm…...
Rapidio门铃消息FIFO溢出机制
关于RapidIO门铃消息FIFO的溢出机制及其与中断抖动的关系,以下是深入解析: 门铃FIFO溢出的本质 在RapidIO系统中,门铃消息FIFO是硬件控制器内部的缓冲区,用于临时存储接收到的门铃消息(Doorbell Message)。…...
Web 架构之 CDN 加速原理与落地实践
文章目录 一、思维导图二、正文内容(一)CDN 基础概念1. 定义2. 组成部分 (二)CDN 加速原理1. 请求路由2. 内容缓存3. 内容更新 (三)CDN 落地实践1. 选择 CDN 服务商2. 配置 CDN3. 集成到 Web 架构 …...
技术栈RabbitMq的介绍和使用
目录 1. 什么是消息队列?2. 消息队列的优点3. RabbitMQ 消息队列概述4. RabbitMQ 安装5. Exchange 四种类型5.1 direct 精准匹配5.2 fanout 广播5.3 topic 正则匹配 6. RabbitMQ 队列模式6.1 简单队列模式6.2 工作队列模式6.3 发布/订阅模式6.4 路由模式6.5 主题模式…...
MySQL 知识小结(一)
一、my.cnf配置详解 我们知道安装MySQL有两种方式来安装咱们的MySQL数据库,分别是二进制安装编译数据库或者使用三方yum来进行安装,第三方yum的安装相对于二进制压缩包的安装更快捷,但是文件存放起来数据比较冗余,用二进制能够更好管理咱们M…...
Linux nano命令的基本使用
参考资料 GNU nanoを使いこなすnano基础 目录 一. 简介二. 文件打开2.1 普通方式打开文件2.2 只读方式打开文件 三. 文件查看3.1 打开文件时,显示行号3.2 翻页查看 四. 文件编辑4.1 Ctrl K 复制 和 Ctrl U 粘贴4.2 Alt/Esc U 撤回 五. 文件保存与退出5.1 Ctrl …...
