Harddisk Partitions Planning

Hi All Masters, previously I have been given valuable advice on proper partition distribution for the installation of Zorin OS together with Win 10. As I am rather stupid and not very sure if I have gathered correctly, so I would like to check if the below is correct?

Boot/efi: 512 Mb | Efi System | /dev/sda1

       Root: 50Gb | Ext4 |/dev/sda2

Windows10: 100Gb | Ntfs | /dev/sda3

WinRE:1Gb | Ntfs | /dev/sda4

       Home: 500 Gb | Ext4 | /dev/sda5

       Swap: 8Gb | /dev/sda6

Slave for Windows:340Gb |    Ntfs | /dev/sda7

Thanks & Best Regards

Everything looks fine.

My one concern would be that Root is separated from your home directory with Windows OS taking the partitions in between.
If the two partitions are adjacent to each other (touching each other, side by side), you can resize them if you have need in the future to do so (For example, expanding root to 75 gigs by expanding into the 500Gig Home reducing it to 425gigs).

1 Like

Hi Aravisian, thank you so much for your quick reply.
Yes, good suggestion. Is the below correct?

Boot/efi: 512 Mb | Efi System | /dev/sda1
Root: 50Gb | Ext4 |/dev/sda2
Home: 500 Gb | Ext4 | /dev/sda3
    Windows10: 100Gb | Ntfs | /dev/sda4
WinRE:1Gb | Ntfs | /dev/sda5
Slave for Windows:340Gb | Ntfs | /dev/sda6
Swap: 8Gb | /dev/sda7

That looks great. And I compliment your reasonable swap allocation.

1 Like

Oh yes, Swap allocation. What do you think, should I change it to sda4 [just below home]?

No, there is no need to do that. Swap can be configured and reconfigured; but you should see no need to resize it. If you need less swap, you can afford a small amount of space being spare in that partition. You should not need more than 8gigs: Swap does not replace RAM, it merely allows overflow to catch what spills out from overflowed RAM to prevent freezing and crashing.

You only need a swap partition if intending to enable Suspend or Hibernate functionality. If you will not be using Suspend or Hibernate, then a Swap File is all you need.

1 Like

Since I would not be using 8Gb, should I reduce the Swap size?
If yes, what would be the recommended size?
I would like to take this opportunity to ask, will the app ‘Kaffeine’ [with TV dual Dvb-T2 tuners] still work if the PC is set to Suspend mode?

I stick with 2gigs, since it is an overflow catcher. It also can put strain on a drive if used a lot, since hard drives are not intended to operate at the speed and write cycles that RAM is.
Whether you reduce the Swap is a personal choice. In this case, 2gigs... 8gigs... It's just an amount. You would need to consistently fill your RAM, consistently keep running with full RAM for it to be a concern.

In Suspend mode, Kaffeine would not longer work since Suspend shuts down the peripheral devices like Tuners and USB. The CPU is in an idle state at minimal power usage, so software is not running.

1 Like

Master Aravisian, thank you so much for the awesome advice. Best Regards

1 Like

I am a Jedi.

2 Likes

I'd always wondered about that when setting up distributions. Many of those I've tried will, by default, push a swap partition. Ubuntu apparently recommends on systems over 1 GB RAM, swap of at least the square root of your RAM and at most double your RAM, and if using hibernation, swap equal to your RAM, plus the square root of your RAM. (This information is two years old and comes via itsfoss.com). I've always refused to give it a partition and have never crashed with excessive RAM use. (Though I never fill 64 GB unless I'm using an AI model of some sort anyway.)

I am running 32gigs of RAM and I can manage to fill it. I do not often do.
But I also maintain RAM swiftly if I worry about getting close to spills:

I use autokey to speed this process up.

A partition is needed for hibernate due to how hibernate shuts things down. A swap file may not be reachable early on during init, whereas the partition is read easily and quickly, early on by UUID.
Since it must be loaded that early - it must be on its own partition.

Whereas without Hibernate, a swap File is fine since it is a complete cold start, with RAM emptied and at its lowest state.

I was about to say "But Windows..." before the obvious "who says they initialize the same way?" kicked in. (Windows stores its hibernation file hidden in C:\ by default. On new installs, I always break hibernation so I can delete C:\hiberfil.sys, as it's a huge waste of space if you don't like hibernation.)

I am somewhat confused. When I close an application, the memory is freed. I can observe this with any number of utilities. If you're using so much that you're reaching the limit of what your computer has, closing an application should fix it. If you need all applications, they need the RAM they're using. What does the linked set of commands actually DO to reduce the memory usage of applications in progress? Barring memory leaks, I'm not sure what it's actually freeing without yanking things you need out from under you.

Linux aggressively caches. The Linux kernel uses free RAM as disk cache because unused RAM is wasted RAM.
So closing applications will free some RAm, but not all. The commands above clear both cache options (pagefiles and inodes), clearing that out as well preventing the need to Reboot or System log to reclaim the most RAM.

1 Like

I wonder if this explains why I sometimes have extremely large (70GB+) LLMs get derpy irreparably, well before hitting their context limit. I'll have to try that next time it happens. I don't assume VRAM needs the same kind of clearing as I can't imagine the kernel caches to VRAM, but I'll ask anyway.

No, it doesn't, that is the GPU's job.

Maybe.
LLM's can really munch a lot of memory.

You also could be quite right and my efforts in vain.

Interesting. It's the GPU's job to maintain VRAM, but not the CPU's to maintain system RAM? Or do you only mean that whatever program is issuing API calls to the GPU is supposed to do the job, but the kernel is that program for the CPU?

Huh?
heh heh...
I mean that the GPU manages vRAM independently. System RAM is managed by the Linux kernel... which would be CPU as well...

Right. what caught my attention was that the kernel was named for system RAM, but the GPU (a physical component) was named for VRAM. This implied a difference to me, even if it shouldn't have.

I think I am not fully understanding.

The operating system that we use is our U.I. - Windows, Zorin OS, Mac... We interact with it.
It utilizes the kernel.
The hardware on the machine has an operating system, separate (and much simpler) from the O.S. we interface with. Both communicate through the kernel.
When a user issues a command to the GPU, it is relayed via the kernel, then expressed to the GPU. The GPU processes this, then sends output to the kernel, which is experienced or relayed to you.
You do not interface with the GPU's operating system.

vRAM is part of your GPU, (Nvidia or AMD), and is managed by the GPU's operating system.
Your RAM is part of the motherboard, operated by the MotherBoard operating system.