作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个遗留应用程序,它在 Java 8 JVM 中启动,参数如下:
-XX:ThreadPriorityPolicy=42
我正在尝试在 Java 10 JVM 中运行相同的应用程序。但是,启动时遇到错误:
intx ThreadPriorityPolicy=42 is outside the allowed range [ 0 ... 1 ]
Improperly specified VM option 'ThreadPriorityPolicy=42'
这可能是由于 JVM 实现发生了变化,迁移到了 HotSpot JVM 的更高版本。我发现了许多有关 Cassandra 和此问题的问题,但我找不到任何文档/问题跟踪来记录 JVM 中的此更改。有什么地方可以读到这方面的内容吗?
此参数可能是出于正当原因添加到旧应用程序中的。在 Java 10 中我应该如何最好地处理这个问题?将值设置为 1
?省略参数?
最佳答案
不知道它是否对您有帮助,但以下是来源的描述:
"0 : Normal. "\
" VM chooses priorities that are appropriate for normal "\
" applications. On Solaris NORM_PRIORITY and above are mapped "\
" to normal native priority. Java priorities below " \
" NORM_PRIORITY map to lower native priority values. On "\
" Windows applications are allowed to use higher native "\
" priorities. However, with ThreadPriorityPolicy=0, VM will "\
" not use the highest possible native priority, "\
" THREAD_PRIORITY_TIME_CRITICAL, as it may interfere with "\
" system threads. On Linux thread priorities are ignored "\
" because the OS does not support static priority in "\
" SCHED_OTHER scheduling class which is the only choice for "\
" non-root, non-realtime applications. "\
"1 : Aggressive. "\
" Java thread priorities map over to the entire range of "\
" native thread priorities. Higher Java thread priorities map "\
" to higher native thread priorities. This policy should be "\
" used with care, as sometimes it can cause performance "\
" degradation in the application and/or the entire system. On "\
" Linux this policy requires root privilege.")
关于java - 更改 ThreadPriorityPolicy 范围,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49652232/
这个问题已经有答案了: Can't start Cassandra (Single-Node Cluster on CentOS7) [duplicate] (2 个回答) Cassandra and
最近,我从官方站点安装了JDK 9和Apache Cassandra。但是现在,当我在前台启动cassandra时,会收到以下消息: apache-cassandra-3.11.1/bin$ ./ca
当我尝试启动 Cassandra 时,它向我显示这样的错误我已经在 env.sh 中的 conf 文件中也做了更改,该文件也是。 没有类似类型错误的选项适用于此。 intx ThreadPriorit
我是一名优秀的程序员,十分优秀!