1

現在的 vm.swappiness

 1 year ago
source link: https://blog.gslin.org/archives/2022/07/23/10809/%e7%8f%be%e5%9c%a8%e7%9a%84-vm-swappiness/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

現在的 vm.swappiness

查了一下現在的 vm.swappiness,發現跟以前又有一些差異。在「Documentation for /proc/sys/vm/」這邊可以看到說明。

很久以前應該是 0100,現在變成 0200 了,其中設定成 100 會在比重公式裡讓 memory 與 swap 的計算上有相同的比重:

This control is used to define the rough relative IO cost of swapping and filesystem paging, as a value between 0 and 200. At 100, the VM assumes equal IO cost and will thus apply memory pressure to the page cache and swap-backed pages equally; lower values signify more expensive swap IO, higher values indicates cheaper.

另外是設定 0 時的方式,在不夠用的時候還是會去用:

At 0, the kernel will not initiate swap until the amount of free and file-backed pages is less than the high watermark in a zone.

目前看起來之前建議設成 1 的方式應該是還 OK...

Related

Cloudflare 上的 Hertzbleed 解釋

除了 Hertzbleed 當初公佈時的論文與網頁外,Cloudflare 上也有一篇 Hertzbleed 的解釋:「Hertzbleed explained」。 會特別拿出來提是因為這篇是 Yingchen Wang 寫的,也就是 Hertzbleed 論文裡兩位第一作者之一 (另外一位是 Riccardo Paccagnella),而從她的網站上也可以看到 Cloudflare intern 的資訊: Graduate Research Intern at Cloudflare, 2022 Summer Hertzbleed 也是一種 side-channel attack,利用 CPU 會依照電量與溫度,而動態調整頻率的特性來達到遠端攻擊,而不需要在機器旁邊有功率錶之類儀器。 傳統上針對這類執行時間的程式會用 constant-time programming 來保護,但 Hertzbleed 則是利用了 CPU 會動態調整頻率的特性鑽出一個洞。現在學界對這個攻擊方式還不熟悉,等熟悉了以後應該是會把洞鑽大... 依照原理來說,定頻應該會是一個解法... 像是大家現在都很喜歡搞「降壓超頻」,算是某種定頻的方式,而一般大家會設定在全速跑也不會過熱降頻的情況。 目前 Intel 跟 AMD 都決定不 patch,依照洞一向都是愈挖愈大,來期待洞大到 RSA 或是…

July 12, 2022

In "Computer"

FreeBSD 的 Amazon EC2 Image 打算自動使用本機空間當作 Swap

Twitter 上看到 Colin Percival 說計畫將 FreeBSD EC2 image (AMI) 自動偵測並使用 ephemeral disk 的空間當作 swap: EC2 ephemeral ("instance store") disks are great for swap space, and in future FreeBSD releases they'll be used for that automatically.Next up: Use the rest of the space for ZFS L2ARC. pic.twitter.com/Dqs1Wg1y5M— Colin Percival (@cperciva) May…

May 17, 2022

In "AWS"

無名 Blog 匯出成 MT 格式

給不想看下面說明的人:備份服務的網址是 http://backup.hasname.com/blog/wretch/。 注意:這項服務還有一些小問題,有可能隨時都在改 code。 2006/10/05 20:54 更新:現在的版本會多開幾條連線平行化處理,下載的速度應該會快很多。 2006/10/05 17:30 更新:現在下載的檔名會是 backup-${username}.txt 了,這樣應該比較方便。 雖然在去年六月的時候為了幫 ashley 大姊姊 (a.k.a. 電視兒童) 從 無名 跳出來而用 Perl 寫了一個小程式,將 無名 Blog 上的文章匯出成 RSS 2.0 格式,再匯入 WordPress 裡。後來這個小程式就再加強一下,寫了一個網頁並公開出來 (參考 無名小站的 Blog 與 Album 備份及還原服務 這篇文章),並且希望 無名 提供更完整的匯出及匯入服務。 後來 養樂多 (Yam Roodo) 的 Blog 服務 提供 MT 格式 的匯出與匯入,而國外…

October 4, 2006

In "Blog"

a611ee8db44c8d03a20edf0bf5a71d80?s=49&d=identicon&r=gAuthor Gea-Suan LinPosted on July 23, 2022Categories Computer, Linux, Murmuring, OS, SoftwareTags kernel, linux, memory, swap, swappiness, vm

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment *

Name *

Email *

Website

Notify me of follow-up comments by email.

Notify me of new posts by email.

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Learn More)

Post navigation


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK