View Single Post
  #25   Report Post  
Posted to uk.d-i-y
[email protected] tabbypurr@gmail.com is offline
external usenet poster
 
Posts: 12,364
Default O/T: Ubuntu questions.

On Saturday, 28 November 2015 01:13:47 UTC, Johnny B Good wrote:
On Wed, 25 Nov 2015 20:42:07 -0800, tabbypurr wrote:

On Thursday, 26 November 2015 04:22:48 UTC, The Natural Philosopher
wrote:
On 26/11/15 01:05, nt wrote:
On Thursday, 26 November 2015 00:43:47 UTC, Rod Speed wrote:
"David Paste" wrote in message
...


What is Swap?

Stuff that needs more physical ram than the system has. That stuff
is put in the swap file, on the drive that is used for the swap
area.

Yes, but with modern multi-gig RAM you're unlikely to use swapfile
space at all.



Well actually you are.

Sometimes the system decides to swap stuff out that hasn't been used
for ages so it has more pages for disk cache.

It doesn't NEED to, but it does.


Depends on your system. I don't think I've ever seen this use swap.


It depends on the 'swappiness' setting. I don't know what it's defaulted
to in the OP's case but Linux Mint 17 uses a default value of 60 which is
ok when the OS is installed onto HDD but way too high in the case of an
SSD. I had to manually change from 60 to the recommended setting of 1 to
minimise write/erase block wear.

You can check this setting by opening a terminal and typing (or pasting)
the following into the command line:

cat /proc/sys/vm/swappiness

the result will be displayed (a 1 to 3 digit number) at the start of the
next line (values from 1 to 100). The default '60' is fine for an HDD
installation but, if the OP wants to install it to an SSD, he'd be well
advised to make sure it's set to 1 (I don't know how 'clever' the Ubuntu
installer is regarding SSD optimisations).

You can find comprehensive instructions dealing with SSD optimisations
he https://sites.google.com/site/easylinuxtipsproject/ssd

I take issue with his claim that the installers know to use AF aligned
partitions with SSDs. One would hope that the installer also knows to
align to Erase Block boundaries. A safe bet is to 'waste' the first 2MB
of disk space and start at LBA 512, a value that's guaranteed to align on
EB sizes from 16KB right up to 2MB. In fact, it's also a good default
with HDDs since it has been a good three decades since HDDs were small
enough for a mere 2MB of 'unusable space' to matter (in the case of my
very first HDD that would have wasted a massive 10% of the disk storage
capacity!).

By the time win7 came along, the autodetect between HDD and SSD to
implement a 2MB EB alignment probably had no such 'intelligence' at all.
My guess is that they simply applied a 2MB EB alignment regardless of
disk type. I suspect the *nix installers do exactly the same since it
doesn't harm performance on HDDs but is so critical with SSDs and a 4KB
alignment is assured with all drives, even the older models not using the
AF 4KB sector size.

There are quite few SSD optimisations on that page. The pertinent one,
btw, is number 10, "Limit swap wear". Interestingly, Firefox and Chrome/
Chromium settings get a mention too, "Limit the write actions of Firefox"
and "Limit the write actions of Chrome and Chromium". The Firefox
settings may also help mitigate the OP's problem (they'll be needed
anyway if he upgrades to an SSD).

HTH


SSDs can outlast intense OS use on default settings with journalling FSes etc. The early ones might have been more vulnerable I don't know.


NT