Skip to content

Instantly share code, notes, and snippets.

SSD写入优化与Chrome 自定义缓存/用户数据路径

随着大容量消费级SSD的普及,更多的用户选择使用SSD作为系统盘或程序盘 而在享受急速体验的同时,一小部分人认识到了SSD的寿命=容量*P/E次数=总可写入量 于是各种减少写入优化SSD的文章也如雨后春笋后冒了出来,虽有一定借鉴意义,可过于极端的配置却导致一定的易用性缺失 用户应该根据自己SSD的实际情况,有选择的进行优化

1. 首先了解自己SSD的容量颗粒介质可写入总量(TBW)

  • 通常SSD的总可写入量(TBW)=容量*可P/E总数,也有些厂商会标注出产品的TBW以方便用户查询
  • 对于使用SLC介质的SSD(例如Intel企业级)通常其P/E总数在100000次以上,即使64G的容量也有6250TBW的可写入量

SSD写入优化与Chrome 自定义缓存/用户数据路径

随着大容量消费级SSD的普及,更多的用户选择使用SSD作为系统盘或程序盘 而在享受急速体验的同时,一小部分人认识到了SSD的寿命=容量*P/E次数=总可写入量 于是各种减少写入优化SSD的文章也如雨后春笋后冒了出来,虽有一定借鉴意义,可过于极端的配置却导致一定的易用性缺失 用户应该根据自己SSD的实际情况,有选择的进行优化

1. 首先了解自己SSD的容量颗粒介质可写入总量(TBW)

  • 通常SSD的总可写入量(TBW)=容量*可P/E总数,也有些厂商会标注出产品的TBW以方便用户查询
  • 对于使用SLC介质的SSD(例如Intel企业级)通常其P/E总数在100000次以上,即使64G的容量也有6250TBW的可写入量

SSD写入优化与Chrome 自定义缓存/用户数据路径

随着大容量消费级SSD的普及,更多的用户选择使用SSD作为系统盘或程序盘 而在享受急速体验的同时,一小部分人认识到了SSD的寿命=容量*P/E次数=总可写入量 于是各种减少写入优化SSD的文章也如雨后春笋后冒了出来,虽有一定借鉴意义,可过于极端的配置却导致一定的易用性缺失 用户应该根据自己SSD的实际情况,有选择的进行优化

1. 首先了解自己SSD的容量颗粒介质可写入总量(TBW)

  • 通常SSD的总可写入量(TBW)=容量*可P/E总数,也有些厂商会标注出产品的TBW以方便用户查询
  • 对于使用SLC介质的SSD(例如Intel企业级)通常其P/E总数在100000次以上,即使64G的容量也有6250TBW的可写入量
@TahmedPublic
TahmedPublic / install_udocker.sh
Created December 20, 2024 17:40 — forked from George-Seven/install_udocker.sh
udocker for Termux, with patches applied to fix it. Now you can use it in Android too. udocker allows running docker images without root/custom kernels - https://github.com/indigo-dc/udocker
#!/data/data/com.termux/files/usr/bin/bash
install_udocker(){
apt update
yes | pkg install -y python-pip patch proot
if pip freeze | grep -Eq "^udocker=="; then
pip uninstall -y udocker
@TahmedPublic
TahmedPublic / docker.md
Created January 30, 2024 12:35 — forked from FreddieOliveira/docker.md
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@TahmedPublic
TahmedPublic / zram.sh
Created September 8, 2023 03:42 — forked from sultanqasim/zram.sh
ZRAM config for Raspberry Pi 3
#!/bin/bash
# Raspberry Pi ZRAM script
# Tuned for quad core, 1 GB RAM models
# put me in /etc/init.d/zram.sh and make me executable
# then run "sudo update-rc.d zram.sh defaults"
modprobe zram
echo 3 >/sys/devices/virtual/block/zram0/max_comp_streams
echo lz4 >/sys/devices/virtual/block/zram0/comp_algorithm
@TahmedPublic
TahmedPublic / zram.sh
Created September 8, 2023 03:42 — forked from sultanqasim/zram.sh
ZRAM config for Raspberry Pi 3
#!/bin/bash
# Raspberry Pi ZRAM script
# Tuned for quad core, 1 GB RAM models
# put me in /etc/init.d/zram.sh and make me executable
# then run "sudo update-rc.d zram.sh defaults"
modprobe zram
echo 3 >/sys/devices/virtual/block/zram0/max_comp_streams
echo lz4 >/sys/devices/virtual/block/zram0/comp_algorithm
Linking libstdc++ statically
Christopher Baus writes about his problems linking libstdc++ statically. Yes, making C++ binaries that will work properly in different Linux distributions is somewhat painful. The problem is not so much linking libstdc++ statically – it is just a library, after all – but the runtime support required by C++ code in general, to enable features like RTTI and exception handling.
The runtime support code used by different parts of a C++ application needs to be compatible. If one part of the program needs to dynamic_cast or catch objects provided by another, both parts must agree on certain implementation details: how to find vtables, how to unwind the stack, and so on.
For C++ and a few other GCC-supported languages with similar features, such details are specified by a C++ ABI. Whenever the ABI used by GCC changes you'll end up with incompatible libraries produced by the different GCC versions. The same is true for plain C, but the C ABI is much simpler and has been around a lot lon
@TahmedPublic
TahmedPublic / dev_signed_cert.sh
Created March 18, 2023 01:27 — forked from dobesv/dev_signed_cert.sh
Script to create (1) a local certificate authority, (2) a host certificate signed by that authority for the hostname of your choice
#!/usr/bin/env bash
#
# Usage: dev_signed_cert.sh HOSTNAME
#
# Creates a CA cert and then generates an SSL certificate signed by that CA for the
# given hostname.
#
# After running this, add the generated dev_cert_ca.cert.pem to the trusted root
# authorities in your browser / client system.
#