Live data from Hacker News

Optimizing Linux for an AMD Xiaomi/Framework Laptop

jdecourval.com

31–36 of 36 posts

Re: Optimizing Linux for an AMD Xiaomi/Framework Laptop

#32
post #9

> By default, many modern SSDs, including the one in this laptop, report a smaller sector size than their optimal one. This is done for compatibility with Windows XP and older systems… I had never heard of this. Of course, checking on my new NVME SSD I also get the suboptimal 512 bytes. I won't do a reinstall for this, but I wonder how large the performance impact actually is?

I think wrong block sizes, or, to be more precise, misaligned blocks, affect writes more than reads, so the performance impact will be limited in all common cases. But they will worsen the write amplification and thus shorten the life of your SSD.

Re: Optimizing Linux for an AMD Xiaomi/Framework Laptop

#33
post #23
post #9

> By default, many modern SSDs, including the one in this laptop, report a smaller sector size than their optimal one. This is done for compatibility with Windows XP and older systems… I had never heard of this. Of course, checking on my new NVME SSD I also get the suboptimal 512 bytes. I won't do a reinstall for this, but I wonder how large the performance impact actually is?

Not much actually does 512-byte IOs, at least not in any performance-critical way. Your OS and filesystem are probably doing most stuff in increments of 4kB, and that's the granularity the SSD is tracking allocations with, even when it is presenting the illusion of 512-byte sectors. The flash itself probably has a page size of at least 16kB, and erase block size of several MB, but trying to align and chunk your IO to…

Thanks, I was expecting something along those lines. I assume misaligned partitions are kinda hard to produce these days if you are using the default partitioning from your GUI Linux distro installer? Last time I heard this being really relevant was over ten years ago iirc.

Re: Optimizing Linux for an AMD Xiaomi/Framework Laptop

#34
post #27

Thanks for the nice writeup! So how many hours does your laptop get after all this? It would also be interesting to see an "all default" install (arch or manjaro) somewhere, is someone knows a link.

With the computer idle, just a terminal open, screen on, but minimum brightness, I measure 4W power usage, so about 18h of autonomy. Real-world autonomy is probably closer to 8-12h which I think is really good.

Re: Optimizing Linux for an AMD Xiaomi/Framework Laptop

#35
post #31

Also since I saw jdecourval here, no pressure but if you made an rss feed for your articles I would happily subscribe. I don't see one

RSS should be available already from my website: https://jdecourval.com/index.xml Not sure how often I will be posting, though!

Re: Optimizing Linux for an AMD Xiaomi/Framework Laptop

#36
post #31

Also since I saw jdecourval here, no pressure but if you made an rss feed for your articles I would happily subscribe. I don't see one

RSS should be available already from my website: https://jdecourval.com/index.xml Not sure how often I will be posting, though!

Cool thanks (not linked to within the website source code, so I didn't see)
Post reply on HN