摘要: JVM内存分为5个区域: 1.栈:函数当前运行中的临时变量(引用地址),线程执行完毕内容清空; 2.本地方法栈:存储c++的native方法等运行数据; 3.程序计数器:指向程序当前运行的位置; 4.堆:主要存储对象,包含老年代、年轻代,年轻代分为eden区、s0、s1三部分,三部分的空间比例为8: 阅读全文
posted @ 2025-08-28 14:41 唐老师很无聊 阅读(7) 评论(0) 推荐(0)
摘要: 不推荐使用Executors创建线程池使用 ExecutorService threadPool = Executors.newFixedThreadPool(5); //固定的线程数 ExecutorService threadPool = Executors.newSingleThreadExe 阅读全文
posted @ 2025-08-27 15:16 唐老师很无聊 阅读(9) 评论(0) 推荐(0)
摘要: 1.运行arthas-boot.jar 2.找到对应的应用程序,并输入对应的序号,回车 3.输入trace命令,进行跟踪,再次调用慢接口: 4.找到对应的慢方法,并根据对应arthas的listenerId,进行深入查找,可重开一个窗口,执行命令:telnet localhost 3658,链接当前 阅读全文
posted @ 2025-07-19 13:20 唐老师很无聊 阅读(78) 评论(0) 推荐(0)