TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Memory efficient Ubuntu VMs

49 点作者 attilagyorffy将近 12 年前

6 条评论

txutxu将近 12 年前
How much ram do you win, blacklisting those modules ?<p>All the kernel modules of my desktop sum a few KB. Only in 1 system I see &quot;nvidia&quot; is a big module, but it doesn&#x27;t use to be loaded in virtual machines.<p>About the blacklisting method... I use to never touch the distribution files inside &#x2F;etc&#x2F;modprobe.d (to ease upgrades, differences across hosts, etc).<p>I think it could be better to use something like &#x2F;etc&#x2F;modprobe.d&#x2F;local.conf or hostname.conf<p>And note, that the &quot;blacklist&quot; directive, by side effects, may avoid module autoloading at boot time, but the real way to disable a module (forever) is to use this instead of &quot;blacklist&quot;:<p><pre><code> install modname &#x2F;bin&#x2F;true </code></pre> For more information, see blacklist in: man 5 modprobe.d<p>I did expect to see more tips about &quot;userspace&quot; configurations, where it&#x27;s more easy to win MB instead of KB.<p>At kernel level... after change the kernel for one more light, and tune which modules are loaded... if we go for details... still you could see which params are available for loaded modules (some params may affect ram usage) and which sysctl values we can tune in the kernel (buffers, limits, etc) to affect ram usage.
marios将近 12 年前
Modules are loaded as they are needed. I think it&#x27;s cleaner to configure your VM to _not_ have a sound card, rather than blacklisting all those snd* modules.
Daviey将近 12 年前
It would be really good to see a comparison between this, and re-using the Ubuntu Cloud images, which also provide easier initialization.<p><a href="http://ubuntu-smoser.blogspot.co.uk/2013/02/using-ubuntu-cloud-images-without-cloud.html" rel="nofollow">http:&#x2F;&#x2F;ubuntu-smoser.blogspot.co.uk&#x2F;2013&#x2F;02&#x2F;using-ubuntu-clo...</a>
评论 #6107806 未加载
zerop将近 12 年前
Wouldnt removing modules affect performance because some modules might be loaded for performance or memory purposes. Can there be adverse effects as well of doing this. If lightweight is only need, why not use the lightweight distributions like Tinycore linux.
评论 #6107820 未加载
harrytuttle将近 12 年前
I tend to use base debian for VMs. It&#x27;s much smaller than base Ubuntu from both a kernel and userspace perspective.
评论 #6107836 未加载
_sabe_将近 12 年前
Great tips! Thanks! :)