equator 最近的时间轴更新
equator

equator

V2EX 第 485073 号会员,加入于 2020-04-20 22:11:21 +08:00
今日活跃度排名 1109
equator 最近回复了
12 小时 28 分钟前
回复了 equator 创建的主题 云计算 请教如何实现 KVM 虚拟机共享内存
@elehayym1618 嗯嗯,现在想找一个不用宿主机主动调用触发的方法🧐
14 小时 35 分钟前
回复了 equator 创建的主题 云计算 请教如何实现 KVM 虚拟机共享内存
还有个问题想请教下大佬们,测试 kvm 的时候,发现 kvm 虚拟机,即使虚拟机里面的进程退出了,不占用内存了,在宿主机上看到那个虚拟机的进程还是占用着内存没释放。是否有方法可以做到内存的及时回收呢,像容器一样,一个虚拟机不用内存了,内存马上就释放了,其它虚拟机就能使用这部分内存了。
15 小时 24 分钟前
回复了 equator 创建的主题 云计算 请教如何实现 KVM 虚拟机共享内存
@vsomeone 嗯呢,现在知道是 docker 虚拟化的啦,这里大佬好多,嘻嘻。
15 小时 29 分钟前
回复了 equator 创建的主题 云计算 请教如何实现 KVM 虚拟机共享内存
@yanqiyu 哈哈哈,大佬牛逼啊,systemd-detect-virt 的输出是 docker ,怎么加一下您,请您喝咖啡
16 小时 14 分钟前
回复了 equator 创建的主题 云计算 请教如何实现 KVM 虚拟机共享内存
我被自己之前的经验误导了,因为之前在 LXD 容器里面看 lscpu ,是看到 Hypervisor vendor: LXD 的。
经过各位大佬点拨,我也感觉不是 kvm 虚拟机了。

我买了一个测试用,不过这个是没有 root 权限的,看起来有点像 docker 哦。


tyu-ukhx1xmi@share-idebu4dywzt:~$ df -h
Filesystem Size Used Avail Use% Mounted on
overlay 20G 36M 20G 1% /
tmpfs 64M 0 64M 0% /dev
shm 64M 0 64M 0% /dev/shm
192.168.101.71:/share/dir_idebu4dywzt 98G 30G 63G 33% /mnt/data
/dev/sdb1 1000G 227G 773G 23% /etc/hosts
tmpfs 126G 72K 126G 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 10G 0 10G 0% /run/user/1000
tyu-ukhx1xmi@share-idebu4dywzt:~$ virt-what
-bash: virt-what: command not found
tyu-ukhx1xmi@share-idebu4dywzt:~$ ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 00:40 ? 00:00:00 /sbin/init
root 23 1 0 00:40 ? 00:00:00 /lib/systemd/systemd-journald
systemd+ 39 1 0 00:40 ? 00:00:00 /lib/systemd/systemd-resolved
message+ 41 1 0 00:40 ? 00:00:00 @dbus-daemon --system --address=systemd: --nofork
root 43 1 0 00:40 ? 00:02:02 /mnt/data/tool/miniconda3/envs/jupyterhub/bin/pyth
root 44 1 0 00:40 ? 00:00:00 /usr/bin/python3 /usr/bin/networkd-dispatcher --ru
root 47 1 0 00:40 ? 00:00:00 /lib/systemd/systemd-logind
rstudio+ 50 1 0 00:40 ? 00:00:40 /usr/lib/rstudio-server/bin/rserver
root 53 1 0 00:40 ? 00:00:00 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 sta
root 54 1 0 00:40 pts/0 00:00:00 /sbin/agetty -o -p -- \u --noclear --keep-baud con
root 87 1 0 00:40 ? 00:00:00 /sbin/agetty -o -p -- \u --noclear tty1 linux
root 175 43 0 00:41 ? 00:00:01 node /mnt/data/tool/miniconda3/envs/jupyterhub/bin
tyu-ukh+ 3655 43 0 00:47 ? 00:00:03 /mnt/data/tool/miniconda3/envs/jupyterhub/bin/pyth
tyu-ukh+ 3951 3655 0 00:48 pts/3 00:00:00 /bin/bash -l
root 12969 53 0 08:36 ? 00:00:00 sshd: tyu-ukhx1xmi [priv]
tyu-ukh+ 12972 1 0 08:36 ? 00:00:00 /lib/systemd/systemd --user
tyu-ukh+ 12973 12972 0 08:36 ? 00:00:00 (sd-pam)
tyu-ukh+ 12987 12969 0 08:36 ? 00:00:00 sshd: tyu-ukhx1xmi@pts/1,pts/2
tyu-ukh+ 12988 12987 0 08:36 pts/1 00:00:00 -bash
tyu-ukh+ 12992 12987 0 08:36 pts/2 00:00:00 -bash
tyu-ukh+ 12993 12987 0 08:36 ? 00:00:00 /usr/lib/openssh/sftp-server
tyu-ukh+ 13030 12992 0 08:36 pts/2 00:00:00 top
tyu-ukh+ 13563 12987 0 08:37 ? 00:00:00 bash -c export LANG="en_US";export LANGUAGE="en_US
tyu-ukh+ 13568 13563 0 08:37 ? 00:00:00 sleep 1
tyu-ukh+ 13569 12988 0 08:37 pts/1 00:00:00 ps -ef

tyu-ukhx1xmi@share-idebu4dywzt:~$ df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
overlay overlay 20971520 33888 20937632 1% /
tmpfs tmpfs 65536 0 65536 0% /dev
shm tmpfs 65536 0 65536 0% /dev/shm
192.168.101.71:/share/dir_idebu4dywzt nfs4 102626304 31415296 65951744 33% /mnt/data
/dev/sdb1 xfs 1048061956 237704416 810357540 23% /etc/hosts
tmpfs tmpfs 132092204 72 132092132 1% /run
tmpfs tmpfs 5120 0 5120 0% /run/lock
tmpfs tmpfs 10485760 0 10485760 0% /run/user/1000
tyu-ukhx1xmi@share-idebu4dywzt:~$
1 天前
回复了 equator 创建的主题 云计算 请教如何实现 KVM 虚拟机共享内存
这个是 lscpu 的内容:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 46 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 80
On-line CPU(s) list: 0-79
Vendor ID: GenuineIntel
Model name: Intel Xeon Processor
CPU family: 6
Model: 85
Thread(s) per core: 2
Core(s) per socket: 20
Socket(s): 2
Stepping: 4
BogoMIPS: 5999.99
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mc
a cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall n
x pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopolog
y cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pci
d sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer
aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowp
refetch cpuid_fault invpcid_single ibrs ibpb fsgsbase b
mi1 hle avx2 smep bmi2 erms invpcid rtm avx512f avx512d
q rdseed adx smap clwb avx512cd avx512bw avx512vl xsave
opt xsavec xgetbv1 arat pku ospke
Virtualization features:
Hypervisor vendor: KVM
Virtualization type: full
Caches (sum of all):
L1d: 2.5 MiB (80 instances)
L1i: 2.5 MiB (80 instances)
L2: 160 MiB (40 instances)
L3: 32 MiB (2 instances)
NUMA:
NUMA node(s): 2
NUMA node0 CPU(s): 0-39
NUMA node1 CPU(s): 40-79
Vulnerabilities:
Gather data sampling: Unknown: Dependent on hypervisor status
Itlb multihit: KVM: Mitigation: VMX unsupported
L1tf: Mitigation; PTE Inversion
Mds: Vulnerable: Clear CPU buffers attempted, no microcode;
SMT Host state unknown
Meltdown: Vulnerable
Mmio stale data: Vulnerable: Clear CPU buffers attempted, no microcode;
SMT Host state unknown
Retbleed: Mitigation; IBRS
Spec rstack overflow: Not affected
Spec store bypass: Vulnerable
Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer
sanitization
Spectre v2: Mitigation; IBRS, IBPB conditional, STIBP disabled, RSB
filling, PBRSB-eIBRS Not affected
Srbds: Not affected
Tsx async abort: Vulnerable: Clear CPU buffers attempted, no microcode;
SMT Host state unknown
1 天前
回复了 equator 创建的主题 云计算 请教如何实现 KVM 虚拟机共享内存
@busier 有这个展示:Hypervisor vendor:KVM
1 天前
回复了 equator 创建的主题 云计算 请教如何实现 KVM 虚拟机共享内存
@busier 通过 lscpu 命令能看到是 KVM 虚拟化
1 天前
回复了 equator 创建的主题 云计算 请教如何实现 KVM 虚拟机共享内存
购买过他家的服务器,通过 lscpu 看到是 KVM 虚拟化的。应该不是内存气球技术,内存气球会导致虚拟机可见的内存变小,它是虚拟机能看到并使用宿主机的全部内存;登录 finalshell ,资源监控那里能看到其他人占用了内存,但是看不到具体是被谁使用的。
1 天前
回复了 equator 创建的主题 云计算 请教如何实现 KVM 虚拟机共享内存
市面上有明确的云厂商做到了,但是不知道具体咋做的
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   1413 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 15ms · UTC 16:57 · PVG 00:57 · LAX 08:57 · JFK 11:57
♥ Do have faith in what you're doing.