0

RAM load rises to 85% from 32G I have varnish and nginx installed on my server. Recently I noticed that the load on RAM is very high. I am afraid that it will continue to grow and the site will stop working.

My varnish has duplicated 200 treads in htop. it does not seem that if you reduce them, then the load will be less. I changed this in the daemon's natsryok but the threads are still 200 after rebooting the server

In htop, I have from large loads Redis.

enter image description here

mysqld

enter image description here

and 200 varnish threads

enter image description here enter image description here

SMA.s0.g_bytes  44.33M  0.00 . 44.31M 44.31M 44.31M
SMA.s0.g_space 6.81G 0.00 . 6.81G 6.81G 6.81G
SMA.Transient.g_bytes 602.84K 0.00 . 601.85K 601.85K 601.85K

enter image description here

MAIN.cache_hit 24576 0.00 12.21 0.39 0.43 0.43
MAIN.cache_miss 3730 0.00 1.85 1.92 2.07 2.07
MAIN.threads 200 0.00 . 200.00 200.00 200.00

How do I reconfigure the system to work correctly? and did not load my RAM activity on the site is now small. Server characteristics: CPU(s): 64 x Intel(R) Xeon(R) Gold 5218 CPU @ 2.30GHz (2 Sockets) RAM: 32G 1TB NVME SSD

Varnish configs: /lib/systemd/system/varnish.service enter image description here

[Service]
Type=simple
LimitNOFILE=131072
LimitMEMLOCK=82000
ExecStart=/usr/sbin/varnishd -j unix,user=vcache -F -a :80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,7018m
ExecReload=/usr/share/varnish/varnishreload
ProtectSystem=full
ProtectHome=true
PrivateTmp=true
PrivateDevices=true

[Install]
WantedBy=multi-user.target

/etc/default/varnish enter image description here

DAEMON_OPTS="-a :6081 \
#             -T localhost:6082 \
#             -f /etc/varnish/default.vcl \
#             -S /etc/varnish/secret \
             -p http_resp_hdr_len=65536 \
             -p http_resp_size=98304 \
         -p vcc_allow_inline_c=on \
             -p thread_pool_add_delay=2 \
             -p thread_pools=2 \
             -p thread_pool_min=25 \
             -p thread_pool_max=70 \
             -p timeout_linger=50 \
             -p first_byte_timeout=300 \
             -p pipe_timeout=300 \
             -p cli_buffer=65536 \
             -p syslog_cli_traffic=off \
             -p workspace_backend=64k \
             -p feature=+esi_disable_xml_check,+esi_ignore_other_elements,+esi_ignore_https \
             -T 127.0.0.1:6082 \
             -u varnish -g varnish \
             -f /etc/varnish/default.vcl \
             -S /etc/varnish/secret \
         -t 172800 \
             -s malloc,7018m"
Alice
  • 3
  • 2
  • It is unclear what the problem is. Edit the question to point us at the information that is causing concern. – ctrl-alt-delor Feb 05 '21 at 16:14
  • Please past text as text, so that it is easier to read. As is blind people can not read it, and I am finding some of it too small to read. (I can see that images of some of the Top output may be useful, but so would a text version). – ctrl-alt-delor Feb 05 '21 at 16:15
  • @ctrl-alt-delor edited – Alice Feb 05 '21 at 16:26
  • 1
    The output of `free` might be more informative since, at least with newer kernel versions, that will distinguish between used RAM that is locked and RAM that is available. High RAM usage is not a problem unless you start noticing lag. If not, that's probably [normal disk caching](http://linuxatemyram.com). – terdon Feb 05 '21 at 16:52

1 Answers1

1

If everything is working fine: no symptoms except RAM usage, then all may be fine.

Linux memory usage can be hard to interpret. It will use all available RAM to cache hard disc content.

If there is something more specific than all RAM is in use, then edit the question, so that a better answer can be given.

ctrl-alt-delor
  • 27,473
  • 9
  • 58
  • 102