jvm

How to distribute Java Application

荒凉一梦 提交于 2020-12-28 07:50:44
问题 I would like to know about the various options for distributing a Java application. I know that you can Distribute the Source Code and let users compile it themselves, or provide make files, etc.. Package it into a JAR, and have self extracting archives and (I'm sure, myriad other ways) I'm hoping for some explanations about the most common options (and one's I haven't thought of) and in particular, do they require a user to have a JVM, or can it be bundled with one - personally I'm not too

初识JVM

无人久伴 提交于 2020-12-18 02:41:45
初识JVM: 大纲: n JVM的概念 n JVM发展历史 n JVM种类 n Java语言规范 n JVM规范 JVM的概念: n JVM是Java Virtual Machine的简称。意为Java虚拟机 n 虚拟机 – 指 通过软件模拟 的 具有完整硬件系统功能 的、 运行在一个完全隔离环境中 的 完整计算机系统 n 有哪些虚拟机 – VMWare – Visual Box – JVM n VMWare或者Visual Box都是使用软件模拟物理CPU的指令集 n JVM 使用软件模拟 Java 字节码的指令集 Java和JVM的历史: n 1996年 SUN JDK 1.0 Classic VM – 纯解释运行,使用外挂进行JIT n 1997年 JDK1.1 发布 – AWT、内部类、JDBC、RMI、反射 n 1998年 JDK1.2 Solaris Exact VM – JIT 解释器混合 – Accurate Memory Management 精确内存管理,数据类型敏感 – 提升的GC性能 – JDK1.2开始 称为Java 2。J2SE, J2EE, J2ME 的出现加入Swing Collections n 2000年 JDK 1.3 Hotspot 作为默认虚拟机发布,加入JavaSound n 2002年 JDK 1.4 Classic VM退出历史舞台

Compiled code in java 8 vs Compiled code in java 11

送分小仙女□ 提交于 2020-12-06 04:33:38
问题 We currently have code compiled in Java 8 but we are running that on Java 11 VM. Now we are trying to move our code to Java 11 compile time as well. Wondering if there are any benefits to compiled code in Java 8 vs Compiled code in Java 11 performance-wise, since both compilers will produce different class files (bytecode)? How does one differ from the other in terms of efficiency? 回答1: javac is not an optimizing compiler, so in general, don't expect it to produce "faster" bytecode from

Compiled code in java 8 vs Compiled code in java 11

北城余情 提交于 2020-12-06 04:33:29
问题 We currently have code compiled in Java 8 but we are running that on Java 11 VM. Now we are trying to move our code to Java 11 compile time as well. Wondering if there are any benefits to compiled code in Java 8 vs Compiled code in Java 11 performance-wise, since both compilers will produce different class files (bytecode)? How does one differ from the other in terms of efficiency? 回答1: javac is not an optimizing compiler, so in general, don't expect it to produce "faster" bytecode from

Cassandra add node problem, failed; error='Cannot allocate memory' (errno=12)

妖精的绣舞 提交于 2020-11-29 09:21:26
问题 I have a cluster of cassandra (v3.11.4) with 14 nodes and I wanna to add a new node. The machine has 256GB memory and I set heap size (max and min) to 64GB . But I cannot add a new node due to memory error! What is the exact problem and What I need to do? The last line of logs are as follows: INFO [CompactionExecutor:1153] 2020-06-11 10:51:09,719 NoSpamLogger.java:91 - Maximum memory usage reached (20971520000), cannot allocate chunk of 1048576 INFO [Service Thread] 2020-06-11 10:51:10,339

JVM 内存预警排查

不想你离开。 提交于 2020-11-24 03:29:36
问题:JVM 内存频繁预警,内存规律性波动。 一. 查看JVM 的GC Collector:Young GC:PS Scavenge | Full GC:PS MarkSweep PS Scavenge 新生代的收集器,也叫 Parallel Scavenge。 PS MarkSweep 老生代的收集器,也叫 Serial Old。 二. 内存曲线分析 1. 频繁 Young GC,产生大量碎片 2. 大对象直接进入老生代 三. 尝试优化 1. 调整内存 调大 JVM 之后(1G > 4G),曲线趋势并没有变化,更糟糕的是,内存越大,Full GC 扫描时间越长,时间越长, Stop the world 的时间越长,造成吞吐量损失越大。 2. 调整 JVM (1) 调试 JVM:-Xms -Xmx -Xmn (2) 调试 JVM Collector:-XX:+UseParNewGC -XX:+UseConcMarkSweepGC (2.1) 年轻代 -XX:+UseParNewGC ParNew 基本上和 Parallel Scavenge 非常相似,唯一的区别,在于它做了强化能够和 CMS 一起使用。 (2.2) 老生代 -XX:+UseConcMarkSweepGC 相当于"ParNew" + "CMS" + "Serial Old",即在 young generation