本文小編為大家詳細(xì)介紹“elasticsearch啟動時警告無法鎖定JVM內(nèi)存怎么解決”,內(nèi)容詳細(xì),步驟清晰,細(xì)節(jié)處理妥當(dāng),希望這篇“elasticsearch啟動時警告無法鎖定JVM內(nèi)存怎么解決”文章能幫助大家解決疑惑,下面跟著小編的思路慢慢深入,一起來學(xué)習(xí)新知識吧。
elasticsearch啟動警告
Unable to lock JVM memory (ENOMEM). This can result in part of the JVM being swapped out. Increase RLIMIT_MEMLOCK (ulimit).
內(nèi)存鎖定值的限制(max locked memory)
這個值只對普通用戶起作用,對超級用戶不起作用,這個問題是由于CAP_IPC_LOCK造成的.linux對內(nèi)存是分頁管理的,這意味著有不需要時,在物理內(nèi)存的數(shù)據(jù)會被換到交換區(qū)或磁盤上.有需要時會被交換到物理內(nèi)存,而將數(shù)據(jù)鎖定到物理內(nèi)存可以避免數(shù)據(jù)的換入/換出.采用鎖定內(nèi)存有兩個理由:1)由于程序設(shè)計上需要,比如oracle等軟件,就需要將數(shù)據(jù)鎖定到物理內(nèi)存.2)主要是安全上的需要,比如用戶名和密碼等等,被交換到swap或磁盤,有泄密的可能,所以一直將其鎖定到物理內(nèi)存.
查看項目進(jìn)程限制,17497為pid
cat /proc/17497/limits
查看系統(tǒng)限制ulimit -a
core file size (blocks, -c) unlimited data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 1032980 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 600000 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) unlimited cpu time (seconds, -t) unlimited max user processes (-u) 600000 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited
vim /etc/security/limits.conf增加2行,設(shè)為更大的值或者unlimited
soft memlock unlimited
hard memlock unlimited
其他可以使用ulimit添加自定義的限制(很多選項系統(tǒng)默認(rèn)未開啟),可以對一些不同用戶進(jìn)行限制
# # - core - limits the core file size (KB) # - data - max data size (KB) # - fsize - maximum filesize (KB) # - memlock - max locked-in-memory address space (KB) # - nofile - max number of open files # - rss - max resident set size (KB) # - stack - max stack size (KB) # - cpu - max CPU time (MIN) # - nproc - max number of processes # - as - address space limit (KB) # - maxlogins - max number of logins for this user # - maxsyslogins - max number of logins on the system # - priority - the priority to run user process with # - locks - max number of file locks the user can hold # - sigpending - max number of pending signals # - msgqueue - max memory used by POSIX message queues (bytes) # - nice - max nice priority allowed to raise to values: [-20, 19] # - rtprio - max realtime priority
讀到這里,這篇“elasticsearch啟動時警告無法鎖定JVM內(nèi)存怎么解決”文章已經(jīng)介紹完畢,想要掌握這篇文章的知識點(diǎn)還需要大家自己動手實踐使用過才能領(lǐng)會,如果想了解更多相關(guān)內(nèi)容的文章,歡迎關(guān)注創(chuàng)新互聯(lián)-成都網(wǎng)站建設(shè)公司行業(yè)資訊頻道。
標(biāo)題名稱:elasticsearch啟動時警告無法鎖定JVM內(nèi)存怎么解決-創(chuàng)新互聯(lián)
當(dāng)前URL:http://jinyejixie.com/article34/dphsse.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站策劃、標(biāo)簽優(yōu)化、網(wǎng)頁設(shè)計公司、定制網(wǎng)站、網(wǎng)站設(shè)計公司、手機(jī)網(wǎng)站建設(shè)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容