摘要: ulimit 命令用来设置系统的资源限制。 1. 可以使用ulimit -a来查看系统各种资源的限制。如下: >>> ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling pri 阅读全文
posted @ 2024-01-23 11:48 软件匠工 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 1. 默认仓库,是国外的,安装会很慢 D:\workspace\vue-test>npm config get registry https://registry.npmjs.org/ 2. 设置npm仓库 D:\workspace\vue-test>npm config set registry 阅读全文
posted @ 2024-01-14 20:52 软件匠工 阅读(258) 评论(0) 推荐(0) 编辑
摘要: JVM里有一系列的跟踪相关的参数,如下图(JAVA 8) bool TraceBiasedLocking = false {product} bool TraceClassLoading = false {product rw} bool TraceClassLoadingPreorder = fa 阅读全文
posted @ 2023-12-27 15:52 软件匠工 阅读(1) 评论(0) 推荐(0) 编辑
摘要: ps -ef | grep java | grep -v grep | grep -oP '(?<=-jar )\S+\.jar' | xargs -Iname jar tf name | grep okhttp 阅读全文
posted @ 2023-12-20 14:47 软件匠工 阅读(1) 评论(0) 推荐(0) 编辑
摘要: socket = new Socket(); //TIME_WAIT状态下可以复用端口 socket.setReuseAddress(true); //空闲时发送数据包,确认服务端状态 socket.setKeepAlive(true); //关闭Nagle算法,尽快发送 socket.setTcp 阅读全文
posted @ 2023-11-23 11:49 软件匠工 阅读(12) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/blueheart20/article/details/51601441 阅读全文
posted @ 2023-01-05 14:58 软件匠工 阅读(43) 评论(0) 推荐(0) 编辑
摘要: 最近在做一个数据搬迁的工具,从ES里把数据读出来,写到mysql,又因ES的数据有延迟,所以,还需要大量的update 动作。 使用了Spring jdbcTempalte. 因数据量比较大,导致mysql不堪重负。做了些优化,性能提升了不少。特此做个笔记。 原来的做法: 1. 使用jdbcTemp 阅读全文
posted @ 2022-10-16 20:20 软件匠工 阅读(355) 评论(0) 推荐(0) 编辑
摘要: 1. https://docs.oracle.com/en/java/javase/11/gctuning/concurrent-mark-sweep-cms-collector.html#GUID-FF8150AC-73D9-4780-91DD-148E63FA1BFF 阅读全文
posted @ 2022-10-14 17:42 软件匠工 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 1. 查找Java进程,找关键字: ps -ef | grep java 2. 根据关键字找对应的服务 systemctl list-units | grep <关键字> 3. 停止服务:systemctl stop <服务名> 4. 启动服务:systemctl start <服务名> 参考文章: 阅读全文
posted @ 2022-02-23 11:31 软件匠工 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 1. 实现 PropertySourceLocator 接口,比如:NacosPropertySourceLocator 2. 把实现注册到spring 容器 @Bean public NacosPropertySourceLocator nacosPropertySourceLocator(Nac 阅读全文
posted @ 2022-01-13 14:14 软件匠工 阅读(276) 评论(0) 推荐(0) 编辑