[root@VM-12-11-centos /]
Unable to find image 'elasticsearch:7.16.1' locally
7.16.1: Pulling from library/elasticsearch
7b1a6ab2e44d: Pull complete
f85c3fdbf085: Pull complete
0ee9ef16ef16: Pull complete
1b555fc21eda: Pull complete
5195df1d2493: Pull complete
b22dfd95268f: Pull complete
762293acfd23: Pull complete
e7d18a44f390: Pull complete
Digest: sha256:8d5fd89230d7985b106bc0586080647a6650ca0f6dfe6c22541ef149045ad52e
Status: Downloaded newer image for elasticsearch:7.16.1
2534b55310b55d4f1c07588535a0e345ea0205ef29ce99cbe428433edc6602db
  
查看命令发现系统都卡了 
[root@VM-12-11-centos /]
CONTAINER ID   IMAGE                  COMMAND                  CREATED          STATUS          PORTS                                                                                  NAMES
2534b55310b5   elasticsearch:7.16.1   "/bin/tini -- /usr/l…"   6 minutes ago    Up 6 minutes    0.0.0.0:9200->9200/tcp, :::9200->9200/tcp, 0.0.0.0:9300->9300/tcp, :::9300->9300/tcp   elasticsearch
1a2ecab867a0   tomcat                 "catalina.sh run"        57 minutes ago   Up 57 minutes   0.0.0.0:443->8080/tcp, :::443->8080/tcp                                                strange_faraday
bf9737d0bc4c   nginx                  "/docker-entrypoint.…"   9 hours ago      Up 9 hours      0.0.0.0:80->80/tcp, :::80->80/tcp                                                      nginx
b64cc5a0b6a5   centos                 "/bin/bash"              25 hours ago     Up 24 hours                                                                                            loving_curran
  
  
查看运行状态 
- 注意此时elasticsearch 使用内存 
2.169G, 总内存也就3.7G   
[root@VM-12-11-centos /]
CONTAINER ID   NAME              CPU %     MEM USAGE / LIMIT   MEM %     NET I/O           BLOCK I/O         PIDS
2534b55310b5   elasticsearch     0.17%     2.169GiB / 3.7GiB   58.63%    4.86kB / 1.58kB   59.8MB / 2.02MB   59
1a2ecab867a0   strange_faraday   0.16%     134MiB / 3.7GiB     3.54%     20.3kB / 164kB    0B / 0B           35
bf9737d0bc4c   nginx             0.00%     2.047MiB / 3.7GiB   0.05%     51kB / 60.1kB     0B / 4.1kB        3
b64cc5a0b6a5   loving_curran     0.00%     1.051MiB / 3.7GiB   0.03%     2.9kB / 0B        0B / 0B           2
^C
[root@VM-12-11-centos /]
  
进行访问 
[root@VM-12-11-centos /]
{
  "name" : "2534b55310b5",
  "cluster_name" : "docker-cluster",
  "cluster_uuid" : "P-71luqAQciaFAts_gwNTg",
  "version" : {
    "number" : "7.16.1",
    "build_flavor" : "default",
    "build_type" : "docker",
    "build_hash" : "5b38441b16b1ebb16a27c107a4c3865776e20c53",
    "build_date" : "2021-12-11T00:29:38.865893768Z",
    "build_snapshot" : false,
    "lucene_version" : "8.10.1",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}
  
停止elasticsearch 
[root@VM-12-11-centos ~]
CONTAINER ID   IMAGE                  COMMAND                  CREATED          STATUS          PORTS                                                                                  NAMES
2534b55310b5   elasticsearch:7.16.1   "/bin/tini -- /usr/l…"   39 minutes ago   Up 38 minutes   0.0.0.0:9200->9200/tcp, :::9200->9200/tcp, 0.0.0.0:9300->9300/tcp, :::9300->9300/tcp   elasticsearch
[root@VM-12-11-centos ~]
2534b55310b5
  
增加内存限制重启elasticsearch 
- 增加内存限制 
-e ES_JAVA_OPTS="-Xms64m -Xmx512m"   
[root@VM-12-11-centos ~]
9cb41b1d926069afd46c8ed4b8f1c507b6fe9449b8fa9ee50a348a55648efff8
  
再次查看内存使用情况 
- 注意此时elasticsearch 使用内存 
2.169G, 总内存也就3.7G   
[root@VM-12-11-centos ~]
CONTAINER ID   NAME              CPU %     MEM USAGE / LIMIT   MEM %     NET I/O           BLOCK I/O         PIDS
9cb41b1d9260   elasticsearch01   1.44%     504.7MiB / 3.7GiB   13.32%    7.51MB / 403kB    13.5MB / 12.7MB   59
1a2ecab867a0   strange_faraday   0.09%     133.5MiB / 3.7GiB   3.52%     25.4kB / 197kB    0B / 0B           35
bf9737d0bc4c   nginx             0.00%     2.047MiB / 3.7GiB   0.05%     51.4kB / 60.3kB   0B / 4.1kB        3
b64cc5a0b6a5   loving_curran     0.00%     1.051MiB / 3.7GiB   0.03%     3.13kB / 0B       0B / 0B           2
 
                
                
                
        
        
    
 
 |