This document aims to customize the kernel for reducing its size and use additional files to cause the reduction.
du -cHA, top, perl files to compress the size of /bin and /sbin
| Different Changes | |||||
|---|---|---|---|---|---|
| Change | Kernel Size before Changing | Kernel Size After Changing | Difference | Useful Links | Notes |
| Machine Type Determination | 145670 KB | 143339 KB | 2331 KB | Show Kernels Sizes | See Section1 |
| MSDOSFS, UFS_DIRHASH, UFS_GJOURNAL | 143339 KB | 142848 KB | 491 KB | Show Kernels Sizes | – |
| INET6, SYSVSHM, SYSVMSG, SYSVSEM, KTRACE | 142848 KB | 141177 KB | 1671 KB | Show Kernels Sizes | – |
| Using Dynamic Executables and Remove Static Ones | /bin =⇒ 971 KB & /sbin =⇒ 3607 KB | /bin =⇒ 971 KB & /sbin =⇒ 2978 | 629 KB | 1.Size of /bin directory before applying Changes 2.Size of /sbin directory before applying changes 3.Show The directories sizes After Applying changes | See Section2 |
| Sysctl maxusers=4 | 1./var =⇒ 70582 KB 2.Free Available Memory = 445 | 1./var =⇒ 70556 KB 2. Free Available Memory = 446 | 1. /var =⇒ 26 KB 2. For Available Memory = 1MB | Show /var Before Changing maxusers Sizes Show /var Before Changing maxusers Sizes Show /var After Changing maxusers Sizes Show Available Memory at maxusers=243 Show /var Available Memory at maxusers=4 | See Section3 |
| Using Perl Files | /bin =⇒ 728 KB | /bin =⇒ 1367 KB | 639 KB | Show /bin before using the perl file Show /bin after using the perl file Download perl files with snapshots | See Section4 |
| Sysctl net.inet.tcp.msl=“5000” | Does not affect kernel size | – | – | – | See Section5 |
There were three different machines loaded in the kernel configuration file and minimized to only the exact machine type.Be Careful, if you don't know your machine type, you may get a kernel crash.
Lessen max segment life to conserve resources =⇒ ACK waiting time in milliseconds to 5000
You can send your comments and suggestions to mfarrag@FreeBSD.org