# How much space do I need for FreeBSD.



## VectorPL (Oct 3, 2021)

I am planning to install FreeBSD for desktop on 16 GB ssd (system and programs) and home partition on other ssd disk. I have 32 gb RAM so I think I don't need swap partition. Is 16 gb enough for system and programs? Or should I install everything on the bigger ssd?


----------



## cmoerz (Oct 3, 2021)

This really depends on what you're planning to do with said system. If you plan to only run some general server with ssh and maybe some web applications, you'll probably be fine. If you intend to use it interactively with X, maybe Gnome or KDE, you might easily run short of space on your "programs" partition (usually /usr/local).

Can you give us more details on what you plan to do after installing the base system?


----------



## sidetone (Oct 3, 2021)

If you're going to play around on your computer, use heavy dependencies, if you're going to build ports, or use jails, install a lot, have lots of files, or for typical use, a 16 GB harddrive wouldn't be enough. A 16 GB harddisk would fit a very minimal install, maybe just for a command line environment. For an otherwise light windowmanager with email, internet browser and desktop applications, that won't be enough.

You can have two hardrives, use the 16GB harddisk for root, /var and swap. If you're careful, you could put /usr on it, but an additional harddisk would be needed to mount /usr/local, and /usr/home. If that swap won't be enough, an additional swap partition can be put on the second harddrive.

For a beginner question, 16GB won't be enough for everything needed for most uses.

On mine, I have a 120GB SSD hardisk for /, /usr, /usr/local, and /var. I have another SSD hardisk that's about twice as big as that for mounting: home, a jail directory, a file directory and a custom executable directory. I would still reconfigure the partition spaces, after learning about it from using my desktop on this.

My root directory is about 10GB, but I only did that for future planning, if I ever decided to install from a DVD while having 4GB of redundant space, or if I forget to mount a partition on install. If I mount the additional partitions correctly on install, I would only need about 800MB. By using other correct mounted partitions, this should be 800MB to 1GB. When, I repartition it later for a future install, I'll partition it to 2GB, to have redundant room, for future planning.

It will take learning to make the best use of a 16GB harddisk. Then, use an additional harddisk for partitions for what more is needed.


----------



## Vull (Oct 3, 2021)

Bare-bones FreeBSD-13.0-RELEASE install takes 1-2 GB. That's with no desktop environment or additional software.
My custom stuff including optional software brings that up to about 8 GB.

Adding Mate desktop environment to the mix brings it to 17 GB. On a separate but similar install, KDE takes about 19 GB.

I've never installed FreeBSD without a swap partition at least as large as my memory space. At minimum I usually allocate at least 24 GB for filesystem and (2*memory) for swap, but in tight situations I sometimes go a little lower, however, those are just test installs which are not intended for any extensive usage.


----------



## dd_ff_bb (Oct 3, 2021)

agree with above comments, if this is going to be your main system i would mount /usr in secondary ssd.

just to give you a idea below stats from my new desktop ( 1 week old, running mate, i haven't even copied my backups yet)


```
root@m:~ # du -hs /usr
 30G    /usr
root@m:~ # du -hs /usr/home
 22G    /usr/home
```


----------



## mrbeastie0x19 (Oct 3, 2021)

Unless you are using KDE or GNOME I think you will be comfortable enough. A minimal Xorg install is not substantial, and even with Firefox I think I ran one on VirtualBox with an 8gb disk that had a functioning display system. I doubt you will be using jails or ports for your use case (a machine with a 16gb SSD does not sound like the kind of machine you build large projects with), if so I think you will be fine, just keep on top of it. It all depends on your use case really.

Edit: That's a lot of RAM. If you are interested in building ports i'd recommend a storage upgrade, seems like a massive waste not to use it.


----------



## VectorPL (Oct 4, 2021)

Thank you for advice. I think that I will buy 128 gb ssd, I found one on the internet which costs about as much as a good lunch at McDonalds in Poland.


----------



## D-FENS (Oct 4, 2021)

VectorPL said:


> I am planning to install FreeBSD for desktop on 16 GB ssd (system and programs) and home partition on other ssd disk. I have 32 gb RAM so I think I don't need swap partition. Is 16 gb enough for system and programs? Or should I install everything on the bigger ssd?


What exactly is your storage hardware configuration?
If you decide to install your system on ZFS, you can stripe the disks together and combine their space into a bigger storage. Then you can install your system and keep the ZFS filesystems separate but use the whole space. This option makes read operations actually faster but the disadvantage is that if one of your SSD breaks, you loose the whole data. If you do a regular backup this might be acceptable risk to you.
Another option with ZFS is to create two separate storage pools - one on each SSD. This would be similar to what you propose, but ZFS has a number of cool features which you can use, for example snapshots and rollbacks, nice binary filesystem replication and cloning. Also, you can expand your storage with additional disks which simply make your "partition" (or storage pool) bigger. Look into it!
And finally, you can simply start using your 16 GB SSD for system and programs. In case it gets too small, you could simply move stuff to the bigger SSD and change some mountpoints in order to bring the data where it needs to be (don't move base system files though, you could do it with stuff in /usr/local or /usr/var for example - your database files or web server data).

If you ask me, the simplest option would be to use ZFS and put the disks in a stripe, which would combine them into one big space. Then, as written - backup regularly (as you should anyway).
Another simple option is to put everything on the larger SSD with ZFS, and then add the smaller SSD as a ZFS cache device (if you plan to read data fast) or a log device (if you plan to write a lot of data fast). The 16 GB would not be used for space in this case, but it would accellerate your disk access.


----------



## Geezer (Oct 4, 2021)

VectorPL said:


> Thank you for advice. I think that I will buy 128 gb ssd, I found one on the internet which costs about as much as a good lunch at McDonalds in Poland.



Very candid about your priorities.


----------



## a6h (Oct 4, 2021)

If you are short on storage, just make sure to use two partitions, one for root / and one for swap.
This way you don't have to worry how to mange your partition scheme before hand.

If it's possible put /tmp on HDD, not SSD. I had bad luck with SSD.
There is an entry about /tmp and /var/tmp at tuning(7). Read that part.

Even better you can use tmpfs(5), to use your RAM for /tmp
This the tmpfs entry in my old fstab(5).

```
tmpfs    /tmp    tmpfs    rw,mode=01777,size=8589934592    0    0
```

You have enough RAM, thus 1-2GB swap is enough.
If you want kernel debugging, then you have to be more calculated about size of the swap.
In that case, refer to savecore(8) and FreeBSD Developers' Handbook | Chapter 10. Kernel Debugging


----------



## SirDice (Oct 4, 2021)

vigole said:


> Even better you can use tmpfs(5), to use your RAM for /tmp
> This the tmpfs entry in my old fstab(5).
> 
> ```
> ...


Or leave out the `size` parameter, then it'll dynamically resize itself.


----------



## grahamperrin@ (Oct 5, 2021)

VectorPL said:


> 128 gb



FWIW, that's what I routinely give to virtual disks. I can't recall what drove me to double the amount, but on at least one occasion: 64 was not enough.


----------



## hruodr (Oct 5, 2021)

Geezer said:


> Very candid about your priorities.


The golden retriever says that.


----------



## VectorPL (Oct 28, 2021)

I found out, after reading installation manual on freebsd.org, that partitions should have at least the following sizes:
/ - 2 GB
/tmp - 3 GB
/var - 5 GB

Thank you very much for your advice and guidance.


----------



## eternal_noob (Oct 28, 2021)

sidetone said:


> A 16 GB harddisk would fit a very minimal install, maybe just for a command line environment. For an otherwise light windowmanager with email, internet browser and desktop applications, that won't be enough.


I run FreeBSD 13.0 on a Raspberry Pi 400 / 16GB SSD with Openbox and Firefox and there is ~6.5GB left.

See my post here:








						FreeBSD Screen Shots
					

I've finalized the look I've been wanting for a while now, so this should be the last screenshot for a while :D. I only ran another konsole to show the non-WINE window decoration. On another note, this is such an underrated desktop environment..




					forums.freebsd.org


----------



## gpw928 (Oct 29, 2021)

VectorPL said:


> I found out, after reading installation manual on freebsd.org, that partitions should have at least the following sizes:


Please bear in mind that if you choose the ZFS file system, FreeBSD will, by default, install into the "zroot" pool, and the file systems created in it will all share a single common pool of spare space.

This makes space management a whole lot easier and more flexible, not to mention heaps of other good features offered.

You can set quotas on ZFS dataset sizes if you wish (e.g. zroot/var/log), but, with ZFS, the old ways of 2G for the root, 3G for /tmp, and 5G for /var, are relics of the past.

However, swap will be allocated on a disk partition outside the ZFS file system.


----------



## VectorPL (Nov 4, 2021)

I have 32GB RAM so I belive that 1GB swap should be enough, I not going to do anything that uses a lot of RAM, just average desktop.


----------

