V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
helloworld12
V2EX  ›  问与答

Linux free shared 比较大会是什么原因?

  •  
  •   helloworld12 · Oct 15, 2018 · 3449 views
    This topic created in 2759 days ago, the information mentioned may be changed or developed.

    两台运行程序相同的服务器 其中一台内存占的比较高,看了下 free

                  total        used        free      shared  buff/cache   available
    Mem:           3790        1336         957        1025        1497         972
    Swap:             0           0           0
    

    发现他的 shared 比较大(另一台的 shared 为 0 )

    会是什么原因导致的?

    查了下,shared 是多进程共享内存。。。。两台运行的服务都是 go 的,没涉及到什么共享内存,其他运行的进程是系统默认的

    查看了下

    [root@xx run]# df -BM
    文件系统        1M-块   已用   可用 已用% 挂载点
    /dev/vda1      40188M 24207M 13917M   64% /
    devtmpfs        1887M     0M  1887M    0% /dev
    tmpfs           1896M     0M  1896M    0% /dev/shm
    tmpfs           1896M  1026M   870M   55% /run
    tmpfs           1896M     0M  1896M    0% /sys/fs/cgroup
    tmpfs            380M     0M   380M    0% /run/user/0
    
    [root@x sessions]# pwd
    /run/systemd/sessions
    [root@x sessions]# du -sm 
    1022	.
    
    1 replies    2018-10-15 17:21:53 +08:00
    helloworld12
        1
    helloworld12  
    OP
       Oct 15, 2018
    这个是说,systemd 一直在重启服务?我节点的自动重启是用 systemd 进行的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5712 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 58ms · UTC 07:41 · PVG 15:41 · LAX 00:41 · JFK 03:41
    ♥ Do have faith in what you're doing.