Just installed FreeBSD 12 in a new SSD (120gb)

I used the guided partitioning which creates efi (200m), root(about 102gb) and swap(3.8gb) partitions.

After the installation I rebooted into single-user mode and enabled TRIM in root.

As it is the first time I use an SSD with FreeBSD I want to know if I what I did is right and if there's anything else I should modify.
 
You might want to edit your /etc/fstab to mount your root partition with noatime, eg:
Code:
/dev/ada0pX /  ufs rw,noatime   1 1
to stop every read of the SSD also doing a write to the SSD.
 
Trim should be enabled on all file systems on an SSD if I am not mistaken, not just /. I run 2 SSDs: one for / and one for /home. Trim is enabled on both.
 
The Auto(UFS) option from the installer created the following:

6483


At firts boot I entered single-user mode and did:

Code:
tunefs -t enable /dev/ada1p2

After reboot:

Code:
tunefs -p /dev/ada1p2
tunefs: POSIX.1e ACLs: (-a)                                disabled
tunefs: NFSv4 ACLs: (-N)                                   disabled
tunefs: MAC multilabel: (-l)                               disabled
tunefs: soft updates: (-n)                                 enabled
tunefs: soft update journaling: (-j)                       enabled
tunefs: gjournal: (-J)                                     disabled
tunefs: trim: (-t)                                         enabled
tunefs: maximum blocks per file in a cylinder group: (-e)  4096
tunefs: average file size: (-f)                            16384
tunefs: average number of files in a directory: (-s)       64
tunefs: minimum percentage of free space: (-m)             8%
tunefs: space to hold for metadata blocks: (-k)            6408
tunefs: optimization preference: (-o)                      time
tunefs: volume label: (-L)

Trim can't be enabled for the other two partitions, because the first one, efi, is FAT32, and swap is free space if I understood correctly.

Should I instead use a swap file? like wblock's guide suggests: http://www.wonkity.com/~wblock/docs/html/ssd.html

Can it be done without starting over?
 
Ah, I didn't know you were dual-booting. You are right - I don't think you can enable trim for fat32 or swap. I don't know the advantages or disadvantages of a swap partition vice file: someone more experienced than I will need to answer that. I normally have so much ram in my machines, none of them have ever hit swap, lol.
 
Wblock's guide says:

"Allocating a partition ties up that swap space permanently, and data written to swap will not use TRIM. So we will use a swap file. Because the data goes through the file system, TRIM will be used, and the swap file can be resized without repartitioning the SSD."

This is what I think I should do:
  1. Disable swap with swapoff
  2. Expand / with growfs
  3. Create a 2GB swap file in /usr/swap and add it to fstab
Just a couple of doubts(if I'm not completely mistaken)

When creating the swap file should I do:
Code:
dd if=/dev/zero of=/usr/swap/swap bs=128k count=16384

or change the bs to something else?

Is it necesary to enable md with
Code:
geom_md_load="YES"
in /boot/loader.conf?
 
Back
Top