LINUX.ORG.RU

Linux mint 'Sarah' -> phpstorm + java == 6gb оперативки, как поставить ограничитель?

 , , ,


0

3

Подскажите пожалуйста, Почему после запуска программы phpstorm (2017.4 от jetbrans) Java съедает всю оперативку (забивает примерно за час работы, если не перезапустить то забьет 100% и происходит полнейший вис системы, которая лечится только перезагрузкой через кнопку на системнике)

https://savepice.ru/full/2017/11/27/eb58dede4df6358bf7661395eb8b6b54-full.png...

https://savepice.ru/full/2017/11/27/66bfe2e82a48d67896529b1c4ac093f1-full.png...

sergey@sergey-pc ~/ $ java -version
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)

Подскажите в какую сторону копать

PS vmoptions поставил ограничитель гиг (и в vmoptions64) (В названиях могу ошибиться, как то так они называются)



Последнее исправление: SergeySHevcheko (всего исправлений: 2)

Так быть не должно, опция -Xmx определяет максимальный доступный хип для приложения, по дефолту будет вроде 1/4 от доступной оперативки. Но может быть так, что либо лаунчер phpstorm его устанавливает по своему, тогда нужно заглянуть в него и поправить, скорее всего лаунчер на баше, либо используется direct ByteBuffer с аллокацией за пределами хипа jvm, что в этом случае делать я не скажу.

Aber ★★★★★
()
Ответ на: комментарий от xmikex

sergey@sergey-pc ~/web/domains/hlamada $ java -Xmx1024m Usage: java [-options] class [args...] (to execute a class) or java [-options] -jar jarfile [args...] (to execute a jar file) where options include: -d32 use a 32-bit data model if available -d64 use a 64-bit data model if available -server to select the «server» VM -zero to select the «zero» VM -dcevm to select the «dcevm» VM The default VM is server, because you are running on a server-class machine.

-cp <class search path of directories and zip/jar files> -classpath <class search path of directories and zip/jar files> A : separated list of directories, JAR archives, and ZIP archives to search for class files. -D<name>=<value> set a system property -verbose:[class|gc|jni] enable verbose output -version print product version and exit -version:<value> Warning: this feature is deprecated and will be removed in a future release. require the specified version to run -showversion print product version and continue -jre-restrict-search | -no-jre-restrict-search Warning: this feature is deprecated and will be removed in a future release. include/exclude user private JREs in the version search -? -help print this help message -X print help on non-standard options -ea[:<packagename>...|:<classname>] -enableassertions[:<packagename>...|:<classname>] enable assertions with specified granularity -da[:<packagename>...|:<classname>] -disableassertions[:<packagename>...|:<classname>] disable assertions with specified granularity -esa | -enablesystemassertions enable system assertions -dsa | -disablesystemassertions disable system assertions -agentlib:<libname>[=<options>] load native agent library <libname>, e.g. -agentlib:hprof see also, -agentlib:jdwp=help and -agentlib:hprof=help -agentpath:<pathname>[=<options>] load native agent library by full pathname -javaagent:<jarpath>[=<options>] load Java programming language agent, see java.lang.instrument -splash:<imagepath> show splash screen with specified image See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.

SergeySHevcheko
() автор топика
Ответ на: комментарий от SergeySHevcheko

sergey@sergey-pc ~/web/domains/hlamada $ java -X -Xmixed mixed mode execution (default) -Xint interpreted mode execution only -Xbootclasspath:<directories and zip/jar files separated by :> set search path for bootstrap classes and resources -Xbootclasspath/a:<directories and zip/jar files separated by :> append to end of bootstrap class path -Xbootclasspath/p:<directories and zip/jar files separated by :> prepend in front of bootstrap class path -Xdiag show additional diagnostic messages -Xnoclassgc disable class garbage collection -Xincgc enable incremental garbage collection -Xloggc:<file> log GC status to a file with time stamps -Xbatch disable background compilation -Xms<size> set initial Java heap size -Xmx<size> set maximum Java heap size -Xss<size> set java thread stack size -Xprof output cpu profiling data -Xfuture enable strictest checks, anticipating future default -Xrs reduce use of OS signals by Java/VM (see documentation) -Xcheck:jni perform additional checks for JNI functions -Xshare:off do not attempt to use shared class data -Xshare:auto use shared class data if possible (default) -Xshare:on require using shared class data, otherwise fail. -XshowSettings show all settings and continue -XshowSettings:all show all settings and continue -XshowSettings:vm show all vm related settings and continue -XshowSettings:properties show all property settings and continue -XshowSettings:locale show all locale related settings and continue

The -X options are non-standard and subject to change without notice.

SergeySHevcheko
() автор топика
Ответ на: комментарий от SergeySHevcheko
sergey@sergey-pc ~/web/domains/hlamada $ java -Xmx1024m 
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)
where options include:
    -d32	  use a 32-bit data model if available
    -d64	  use a 64-bit data model if available
    -server	  to select the "server" VM
    -zero	  to select the "zero" VM
    -dcevm	  to select the "dcevm" VM
                  The default VM is server,
                  because you are running on a server-class machine.


    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
                  A : separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D<name>=<value>
                  set a system property
    -verbose:[class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -version:<value>
                  Warning: this feature is deprecated and will be removed
                  in a future release.
                  require the specified version to run
    -showversion  print product version and continue
    -jre-restrict-search | -no-jre-restrict-search
                  Warning: this feature is deprecated and will be removed
                  in a future release.
                  include/exclude user private JREs in the version search
    -? -help      print this help message
    -X            print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions with specified granularity
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions with specified granularity
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
    -agentlib:<libname>[=<options>]
                  load native agent library <libname>, e.g. -agentlib:hprof
                  see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
                  load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
                  load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
                  show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
sergey@sergey-pc ~/web/domains/hlamada $ java -X
    -Xmixed           mixed mode execution (default)
    -Xint             interpreted mode execution only
    -Xbootclasspath:<directories and zip/jar files separated by :>
                      set search path for bootstrap classes and resources
    -Xbootclasspath/a:<directories and zip/jar files separated by :>
                      append to end of bootstrap class path
    -Xbootclasspath/p:<directories and zip/jar files separated by :>
                      prepend in front of bootstrap class path
    -Xdiag            show additional diagnostic messages
    -Xnoclassgc       disable class garbage collection
    -Xincgc           enable incremental garbage collection
    -Xloggc:<file>    log GC status to a file with time stamps
    -Xbatch           disable background compilation
    -Xms<size>        set initial Java heap size
    -Xmx<size>        set maximum Java heap size
    -Xss<size>        set java thread stack size
    -Xprof            output cpu profiling data
    -Xfuture          enable strictest checks, anticipating future default
    -Xrs              reduce use of OS signals by Java/VM (see documentation)
    -Xcheck:jni       perform additional checks for JNI functions
    -Xshare:off       do not attempt to use shared class data
    -Xshare:auto      use shared class data if possible (default)
    -Xshare:on        require using shared class data, otherwise fail.
    -XshowSettings    show all settings and continue
    -XshowSettings:all
                      show all settings and continue
    -XshowSettings:vm show all vm related settings and continue
    -XshowSettings:properties
                      show all property settings and continue
    -XshowSettings:locale
                      show all locale related settings and continue

The -X options are non-standard and subject to change without notice.

SergeySHevcheko
() автор топика
Ответ на: комментарий от SergeySHevcheko
sergey@sergey-pc ~/web/domains/hlamada $ java -XshowSettings:all
VM settings:
    Max. Heap Size (Estimated): 1.69G
    Ergonomics Machine Class: server
    Using VM: OpenJDK 64-Bit Server VM

Property settings:
    awt.toolkit = sun.awt.X11.XToolkit
    file.encoding = UTF-8
    file.encoding.pkg = sun.io
    file.separator = /
    java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
    java.awt.printerjob = sun.print.PSPrinterJob
    java.class.path = .
    java.class.version = 52.0
    java.endorsed.dirs = /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/endorsed
    java.ext.dirs = /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext
        /usr/java/packages/lib/ext
    java.home = /usr/lib/jvm/java-8-openjdk-amd64/jre
    java.io.tmpdir = /tmp
    java.library.path = /usr/java/packages/lib/amd64
        /usr/lib/x86_64-linux-gnu/jni
        /lib/x86_64-linux-gnu
        /usr/lib/x86_64-linux-gnu
        /usr/lib/jni
        /lib
        /usr/lib
    java.runtime.name = OpenJDK Runtime Environment
    java.runtime.version = 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12
    java.specification.name = Java Platform API Specification
    java.specification.vendor = Oracle Corporation
    java.specification.version = 1.8
    java.vendor = Oracle Corporation
    java.vendor.url = http://java.oracle.com/
    java.vendor.url.bug = http://bugreport.sun.com/bugreport/
    java.version = 1.8.0_151
    java.vm.info = mixed mode
    java.vm.name = OpenJDK 64-Bit Server VM
    java.vm.specification.name = Java Virtual Machine Specification
    java.vm.specification.vendor = Oracle Corporation
    java.vm.specification.version = 1.8
    java.vm.vendor = Oracle Corporation
    java.vm.version = 25.151-b12
    line.separator = \n 
    os.arch = amd64
    os.name = Linux
    os.version = 4.4.0-98-generic
    path.separator = :
    sun.arch.data.model = 64
    sun.boot.class.path = /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/resources.jar
        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar
        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/sunrsasign.jar
        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jsse.jar
        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jce.jar
        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/charsets.jar
        /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jfr.jar
        /usr/lib/jvm/java-8-openjdk-amd64/jre/classes
    sun.boot.library.path = /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64
    sun.cpu.endian = little
    sun.cpu.isalist = 
    sun.desktop = gnome
    sun.io.unicode.encoding = UnicodeLittle
    sun.java.launcher = SUN_STANDARD
    sun.jnu.encoding = UTF-8
    sun.management.compiler = HotSpot 64-Bit Tiered Compilers
    sun.os.patch.level = unknown
    user.country = RU
    user.dir = /home/sergey/web/domains/hlamada
    user.home = /home/sergey
    user.language = ru
    user.name = sergey
    user.timezone = 

Locale settings:
    default locale = русский
    default display locale = русский (Россия)
    default format locale = русский (Россия)
    available locales = , ar, ar_AE, ar_BH, ar_DZ, ar_EG, ar_IQ, ar_JO, 
        ar_KW, ar_LB, ar_LY, ar_MA, ar_OM, ar_QA, ar_SA, ar_SD, 
        ar_SY, ar_TN, ar_YE, be, be_BY, bg, bg_BG, ca, 
        ca_ES, cs, cs_CZ, da, da_DK, de, de_AT, de_CH, 
        de_DE, de_GR, de_LU, el, el_CY, el_GR, en, en_AU, 
        en_CA, en_GB, en_IE, en_IN, en_MT, en_NZ, en_PH, en_SG, 
        en_US, en_ZA, es, es_AR, es_BO, es_CL, es_CO, es_CR, 
        es_CU, es_DO, es_EC, es_ES, es_GT, es_HN, es_MX, es_NI, 
        es_PA, es_PE, es_PR, es_PY, es_SV, es_US, es_UY, es_VE, 
        et, et_EE, fi, fi_FI, fr, fr_BE, fr_CA, fr_CH, 
        fr_FR, fr_LU, ga, ga_IE, hi, hi_IN, hr, hr_HR, 
        hu, hu_HU, in, in_ID, is, is_IS, it, it_CH, 
        it_IT, iw, iw_IL, ja, ja_JP, ja_JP_JP_#u-ca-japanese, ko, ko_KR, 
        lt, lt_LT, lv, lv_LV, mk, mk_MK, ms, ms_MY, 
        mt, mt_MT, nl, nl_BE, nl_NL, no, no_NO, no_NO_NY, 
        pl, pl_PL, pt, pt_BR, pt_PT, ro, ro_RO, ru, 
        ru_RU, sk, sk_SK, sl, sl_SI, sq, sq_AL, sr, 
        sr_BA, sr_BA_#Latn, sr_CS, sr_ME, sr_ME_#Latn, sr_RS, sr_RS_#Latn, sr__#Latn, 
        sv, sv_SE, th, th_TH, th_TH_TH_#u-nu-thai, tr, tr_TR, uk, 
        uk_UA, vi, vi_VN, zh, zh_CN, zh_HK, zh_SG, zh_TW
        
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)
where options include:
    -d32	  use a 32-bit data model if available
    -d64	  use a 64-bit data model if available
    -server	  to select the "server" VM
    -zero	  to select the "zero" VM
    -dcevm	  to select the "dcevm" VM
                  The default VM is server,
                  because you are running on a server-class machine.


    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
                  A : separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D<name>=<value>
                  set a system property
    -verbose:[class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -version:<value>
                  Warning: this feature is deprecated and will be removed
                  in a future release.
                  require the specified version to run
    -showversion  print product version and continue
    -jre-restrict-search | -no-jre-restrict-search
                  Warning: this feature is deprecated and will be removed
                  in a future release.
                  include/exclude user private JREs in the version search
    -? -help      print this help message
    -X            print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions with specified granularity
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions with specified granularity
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
    -agentlib:<libname>[=<options>]
                  load native agent library <libname>, e.g. -agentlib:hprof
                  see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
                  load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
                  load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
                  show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.

SergeySHevcheko
() автор топика

Запусти идею, выполни ps ax | grep java и выхлоп кинь сюда. Для оформления выхлопа используй [code][/code]

hippi90 ★★★★★
()
Ответ на: комментарий от hippi90
sergey@sergey-pc ~/web/domains/hlamada $ ps ax | grep java
 1677 pts/2    S+     0:00 grep --color=auto java
 8161 ?        SLl  100:33 /home/sergey/Бинарники/PhpStorm-172.4155.41/jre64/bin/java -Xbootclasspath/a:/home/sergey/Бинарники/PhpStorm-172.4155.41/lib/boot.jar -classpath /home/sergey/Бинарники/PhpStorm-172.4155.41/lib/bootstrap.jar:/home/sergey/Бинарники/PhpStorm-172.4155.41/lib/extensions.jar:/home/sergey/Бинарники/PhpStorm-172.4155.41/lib/util.jar:/home/sergey/Бинарники/PhpStorm-172.4155.41/lib/jdom.jar:/home/sergey/Бинарники/PhpStorm-172.4155.41/lib/log4j.jar:/home/sergey/Бинарники/PhpStorm-172.4155.41/lib/trove4j.jar:/home/sergey/Бинарники/PhpStorm-172.4155.41/lib/jna.jar:/home/sergey/Бинарники/PhpStorm-172.4155.41/jre64/lib/tools.jar -Xms128m -Xmx1024m -XX:ReservedCodeCacheSize=240m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Dawt.useSystemAAFontSettings=lcd -Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine -XX:ErrorFile=/home/sergey/java_error_in_PHPSTORM_%p.log -XX:HeapDumpPath=/home/sergey/java_error_in_PHPSTORM.hprof -Didea.paths.selector=PhpStorm2017.2 -Djb.vmOptionsFile=/home/sergey/Бинарники/PhpStorm-172.4155.41/bin/phpstorm64.vmoptions -Didea.platform.prefix=PhpStorm -Didea.jre.check=true com.intellij.idea.Main

SergeySHevcheko
() автор топика

У меня на работе 6-8 гигабайт оперативки занятой на проект в 50kloc - это нормально. Учитывая, что системной всего 16.

Я думал, что для идеи такое поведение - норма.

Deleted
()

Какой Джавой пользуется phpstorm ? Он может пользоваться системной. С самим phpstorm идёт немного переделанная своя Джава. Рекомендуется использовать именно её. В Help/About можно посмотреть, какая Джава используется.

Kekek
()
Ответ на: комментарий от SergeySHevcheko

установи родную jdk от oracle а не openjdk он и тормозной и текущий и глючной и вообще странно что что-то работает

anonymous
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.