V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
helloworld12
V2EX  ›  问与答

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

  •  
  •   helloworld12 · 2018-10-15 17:10:51 +08:00 · 2962 次点击
    这是一个创建于 2013 天前的主题,其中的信息可能已经有所发展或是发生改变。

    两台运行程序相同的服务器 其中一台内存占的比较高,看了下 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 条回复    2018-10-15 17:21:53 +08:00
    helloworld12
        1
    helloworld12  
    OP
       2018-10-15 17:21:53 +08:00
    这个是说,systemd 一直在重启服务?我节点的自动重启是用 systemd 进行的
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2584 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 77ms · UTC 01:41 · PVG 09:41 · LAX 18:41 · JFK 21:41
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.