Does using a dedicated "first partition" for "swap memory" really improves performance or is just a meme?

does using a dedicated "first partition" for "swap memory" really improves performance or is just a meme?

Attached: Virtual+or+swap+memory[1].png (320x235, 20K)

Other urls found in this thread:

en.wikipedia.org/wiki/Zone_bit_recording
twitter.com/AnonBabble

Swap is pretty much a meme on systems with 8GB or more. If you run out of RAM on systems like those, you need to increase the resources, simple as that.

A decade ago carefully where the swap space was on a spindle drive mattered. These days with SSDs there just needs to be space. But swap sucks the big one compared to enough RAM.

Swap is irrelevant nowadays and should be disabled.
Warning: some shitty software may not like the absence of a swap

Hey there, home enthusiast. I regret to inform you that you're incorrect and spreading false information. Please refrain from spreading these lies in the future. I can think of many practical applications of swap on systems with more than 8GB of memory, which isn't very much. VDI comes to mind.

Swap on desktop is useless. if you start swapping, it's over.
Especially on loonix where user interface isn't prioritized over other processes, so when you start swapping you can't even kill the program which drains the memory.

It's not incorrect at all. In any kind of productive environment, people will laugh at you for suggesting to use swap over increasing resources.

this is for an old notebook (1 GB ram) that I still use from time to time, it definitevely experiences a lot of acces to virtual memory, I remember reading a long time ago that the best way to set it was using a dedicated first partition (first partition was important because supposedly the access to data could be faster in the first physical allocations on the hard disk)

I dont know if this makes a good diference or not but 15 years ago it was a very common advice, I have never tried it ...

>brainlet retards think having VFS flush on memory pressure is more ideal than having idle processes' memory in swap.

no. the HDD's physical layout is likely abstracted by a controller anyhow. where your partition is may not reflect where the data is physically. this same principle applies moreso to SSDs though.

yes, hdd's are fastest (both in throughput and access times) at the beginning of the disk, so it makes sense to have a swap partition first, followed by your OS and programs, then the rest

more /sys/fs/cgroup/memory/memory.swappiness

you want this to be low

>2019.6
>not working solely on RAMdisk

>the HDD's physical layout is likely abstracted by a controller anyhow. where your partition is may not reflect where the data is physically. this same principle applies moreso to SSDs though.
not even remotely close to an ssd
while there is some abstraction, the logical sectors are still laid out from the outermost to innermost cylinder
if it weren't, things like pic related would be less predictable

Attached: screenshot.png (476x418, 84K)

>using a ramdisk and not relying on filesystem caching to accomplish the same thing

but "defragmenting" tools supposedly re-locates in a phisically linear path (or as much as possible) from what I understand

meme
no matter how fast it is it's still slow

According to the Arch Wiki, swap partitions and swap files have zero performance difference. So I assume what you're talking about is a myth.

thats a great graph and it actually responds my question quite clearly...thanks!

I'm gonna check that utility and see what I got.

yes, there's no performance difference between a swap partition and swap file, because swap files are setup in a special way (must be contiguous, and must be immutable), such that they can be mapped and accessed without going through the filessytem driver, just like a partition
however, the key point in op is /first partition/, presumably meaning a partition at the beginning of the disk, this /does/ have a performance advantage over other parts of a disk. if you can place a swap file at the beginning of a disk, this will also have the same performance benefit

Aren't the angular density of sectors constant in HDD? Variable angular density would make layout difficult to manage. When this angular density is constant access time and transfer speed don't depends on track.
With variable density the best sectors would be the exterior ones

defragmenting what?

fat doesn't have a concept of fragmenting and NTFS defragmenting is about reordering data to solve fragmentation problems that leave unallocated space hard to use.

If the swap partition is on an SSD it doesn't matter. Swap is only useful "just in case" you manage to fill your memory and avoid data loss AND if you're hibernating.

I've heard the wisdom of "swap should be 2x of your op. memory amount" but I use 1:1 ratio and never had a problem.

HDD's are ZBR, they operate with CAV (constant spinning rate), but sectors become more dense as the cylinders become larger towards the outside of the platter
en.wikipedia.org/wiki/Zone_bit_recording

Attached: 600px-DiskStructure.svg.png (600x600, 127K)

well this is the inmidiate graph I got I didnt even close any windows..but this clearly responds my question, the acces time is clearly the highest the closer you get to the "intitial tracks" of the disc, this would be the edge of the disc and it fallows the same logic as an old vinyl disc, the linear velocity is the highest at the edge.

Attached: 2019-06-08 10_11_29-HD Tune website.png (582x508, 42K)

>swap should be 2x of your op. memory amount
this is obsolete advice
back in the day when you had 128M of ram and a hdd which could do 30M/s, swapping say, 50M onto disk only took a couple seconds
nowadays, ram has outpaced hdd speed, so dumping half your 16G ram onto a hdd which can only do 150M/s would take about a minute!
so really, the useful amount of swap on a hdd depends more on the speed of the hdd, not the amount of ram you have

>however, the key point in op is /first partition/, presumably meaning a partition at the beginning of the disk, this /does/ have a performance advantage over other parts of a disk. if you can place a swap file at the beginning of a disk, this will also have the same performance benefit

yep, you got it.

yes, the reason it's faster on the outside is exactly the same reason why the first track of a vinyl sounds the best, there's more media going past the read head each revolution

If you're on a desktop, sure. I'm talking generally, there is a use case for it. No sense in overbuilding something beyond your future growth needs. Swap is great with large environments, especially with RDS farms, VDI, etc. Users may have an idle session running that can be sitting on swap instead of loaded into RAM.

Nobody should be using a spinning disk for swap memory in 2019.

Install zram

>according to the Arch Wiki

Attached: 68557D83-8603-4222-AEEA-82D56FE1BBAC.jpg (250x202, 7K)

Swap does not need to be to be equal to your physical memory, really as little as 512MB might be sufficient. When an application initializes it may write to RAM but not all of the things written are accessed. The OS may determine that some things haven't been accessed recently and write them to the swap space and if resources become scarce the OS may evict those things from the RAM. You want there to be some swap but you don't need a lot of it, with most systems swap isn't used very often.

I use ram doubling software instead of swap.

>mfw the Arch Wiki told me how to do things that was behind Red Hat's paywall

my professor said that swap are intel fault
is that right?

Apple has handled this brilliantly desu..
It's built into the OS and managed heavily.
Anyone here have knowledge of how Apple did it so well but linux/windows still suck ass at it? 8GB ram mbp and its always slammed.. and using swap but its fast and transparent

well people seen to not give a fuck about this or think is just an obsolete funtion but is always been a integral part of any operatin system

RAM is dense enough and memory controllers address enough nowadays that it's a complete meme unless you're poor.