Disabled swap Trigger freq. HD Thrashing (retitled)

If none of the more specific forums is the right place to ask

Disabled swap Trigger freq. HD Thrashing (retitled)

Postby scruffyeagle » 2018-10-06 04:25

I recently installed Debian v.9.5.0 w/ Mate desktop. I always store my data on external HD partitions (never Home) & do cloned backups as safeguard against data loss if crash happens. So, my external drive's partitions have been & still are frequently used w/ other OS's including Ubuntu v10.04 (the main workhorse), Ubuntu v16 (sluggish, crashed & gone), Devuan (a brief flirtation), & now Debian 9.5. I chose an ISO w/ the Mate desktop, as being seemingly the closest to Gnome 2 (the last fully functional Gnome). I also later installed Gnome "Classic", which having seen it, I'll avoid because it's still substandard in desktop/windows colors management. My main computer is a Dell "Inspiron 9400" laptop. It has 2GB RAM, twin T2400 (1.83GHz) CPU's, & 13GB free on the Debian partition.

My current usage of sda:
* sda1: 18.63GB - Ubuntu v10.04
* sda2: 3.73GB - swap
* sda3: 26.08GB - Debian v9.5.0
* sda4: 26.10GB - Devuan

The insurgence of HTML5 has forced me to occasionally reboot into Debian for the sake of access to a HTML5-capable browser. Online banking & shopping is now almost entirely HTML5. And, YouTube is now refusing to serve videos to any browser not HTML5-capable (like my old Uv10 browser), and throws up an error message that no compatible vids are available. Which is strictly a lie, because the plug-ins find them. However, HTML5 enables data-mining & advertising, both of which Google revels in.

I've installed 2 versions of FF into the Debian OS. One, is Firefox Quantum 60.2.2esr, the version available via Synaptic. The other is another up-to-date version expanded manually from dl'd tarball. (I can't check the version # without closing this version.) I usually use the FF Quantum. Earlier tonight, I was on YouTube and using Quantum - and had severe problems. Frequently, but not every time, the computer would almost lock up on me, with the hard drive light continuously lit. I say "almost", because the mouse would sort of respond. If I moved it, after 20(?) seconds the pointer would nudge, and then I could move it across the screen. But, neither type of clicking (action or menu) anywhere on the screen had any effect. I put up with this for a while, but it got worse, and the last instance lasted at least 15 minutes - at which point, my only option after every other break effort had failed, was to do a hard power-down via pressing & holding the power button. When the problem first started, I was able to close windows (etc.) when the HD light finally went dark. But, it got worse with each instance.

When I'd finally rebooted & had everything working again, I came here to post this.

Okay, in the course of writing this all out, I think I might have found the problem:

My "system monitor" is reporting "Swap not available" on the "Resources" tab. It should be reporting the availability of a 3.73GB swap partition. The most recent OS install I did, was the most current version of Devuan into sda4.

Is it possible that Devuan grabbed & hoarded the swap partition for its own usage?
And if yes, then how do I recover it for the usage of Ubuntu v.10.04 & Debian v9.5.0?

I think I know the answer to that last question. I've used gparted to reformat sda2 as swap. Now, I'm going to reboot and see if that fixed it.

Okay... I rebooted, and that didn't restore swap usage. Searching what was availble in gparted, I found a menu-click item "swapon" associated w/ sda2. I clicked it, it searched for swap partitions - and, the system monitor updated itself. Swap was now shown as available, with a capacity of 2GB. (Why not the full 3.73GB?)

I rebooted again, and found that the swap on condition didn't stick. Repeating usage of "swapon" in gparted, worked again.

So, I've found a partial solution to my swap problem. There are 2 things I don't know, at this point:
1) Will this prevent the HD thrashing & system locking up which I experienced earlier this evening? (I'll do some YouTube testing, and come back here to update, whichever way the answer goes.)
and,
2) How can I make this swap partition usage automatic during future boots?

Update: Turning on Swap did prevent the HD thrashing. There was none of that. However, the YT vids still frequently stalled out. Given that there was no HD activity when that happened, I'm assuming it was failure to devote transmission resources, on Google's part.
Last edited by scruffyeagle on 2018-10-06 19:23, edited 1 time in total.
.
A.I. - an emergent life form, within an unacknowledged Domain. Expect competition for resources.
scruffyeagle
 
Posts: 44
Joined: 2011-09-06 19:11

Re: Recent Stretch install - YT pages freq. trigger HD thras

Postby bw123 » 2018-10-06 07:45

Quite a long post, should be titled, "Disabled swap Trigger freq. HD Thrashing" I thought p.H had a decent explanation recently here.
viewtopic.php?f=30&t=138767&sid=30aefd12167148f8828fc2da48bdbaaf#p682476

There are a lot of explanations about how to create and use swap on the internet. I usually prefer the man pages first, then look up explanations on the websearch or forum.

The two man pages I'd start with are mkswap and swapon.


...
If you don't know how you may do this, open a terminal and at the prompt enter "man topic" where "topic" represents the topic you are having trouble with.
...

viewtopic.php?f=17&t=47078
User avatar
bw123
 
Posts: 3402
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Recent Stretch install - YT pages freq. trigger HD thras

Postby Dai_trying » 2018-10-06 08:00

Swap partition can be a problem when multi-booting as most distro's want to format the swap area and then it gets a new UUID which in turn prevents the other installations from finding it, my understanding is that if the swap is not assigned in fstab (which it usually is) then it will search for swap partitions at startup and use whatever it finds, but if the swap is identified in fstab and cannot be found (wrong UUID) then you will likely get a 90 second delay when starting your system and then have no swap available.
The conclusion is to either remove entries from fstab that identify the swap or check the identifier and make sure it is correctly identified (UUID) in all installations. As you have re-formatted your swap it is very likely that none of your installations will be able to find it and suffer the same (or similar) problems.

As for whether this is responsible for your original problem I cannot say as I have not encountered it before, but I always check my system settings on startup (conky is always running with swap/mem/cpu/hdd information showing) and I usually try to remedy any known problems before trying to diagnose the unknown ones.
Dai_trying
 
Posts: 548
Joined: 2016-01-07 12:25

Re: Recent Stretch install - YT pages freq. trigger HD thras

Postby p.H » 2018-10-06 08:59

Dai_trying wrote:Swap partition can be a problem when multi-booting as most distro's want to format the swap area and then it gets a new UUID which in turn prevents the other installations from finding it

I cannot tell about other distribution installers, but Debian installer at least forces to reformat (and change the UUID) the swap areas which are marked "used as swap" during the partitioning stage. If Devuan was installed after Debian an the installer was told to use the swap partition, then it probably changed its UUID and Debian cannot find it any more. This should cause a 90 second delay penalty at startup.

Compare the UUIDs in /etc/fstab and in the ouptut of blkid. swapon action, like mount, is just temporary and does not survive after a reboot. /etc/fstab must be fixed.

Note that unlike the UUID, the PARTUUID is not changed when a partition is reformated. So it could be used as a more persistent identifier. But the Debian installer does not use it by default.

Dai_trying wrote:my understanding is that if the swap is not assigned in fstab (which it usually is) then it will search for swap partitions at startup and use whatever it finds, but if the swap is identified in fstab and cannot be found (wrong UUID) then you will likely get a 90 second delay when starting your system and then have no swap available.

IIUC, there are actually two independent behaviours :
- if the swap defined in /etc/fstab cannot be found, you will get the 90 second delay in any case
- if the partition table type is GPT, systemd will activate all swap partitions as part of the Discoverable Partitions Specification (https://www.freedesktop.org/wiki/Specif ... tionsSpec/). Note that it does not apply to swap areas in devices other than GPT partitions, such as LVM logical volumes or RAID arrays. Extra LVM bonus : when a filesystem or swap is in a logical volume, the Debian installer writes the device node name, which is not modified when the LV is reformated, in /etc/fstab instead of the UUID.
p.H
 
Posts: 600
Joined: 2017-09-17 07:12

Re: Recent Stretch install - YT pages freq. trigger HD thras

Postby stevepusser » 2018-10-06 17:32

Even if you get swap working, the last thing you want is to run out of your 2 GB RAM and be forced to use swap when browsing! I would suggest (if possible)

Adding RAM to get at least 4 GB.
If you're using 64-bit, switching to 32-bit uses about 20-30% less RAM for the same programs.
Use a lighter browser like Pale Moon, Qupzilla, Falkon, SeaMonkey, etc.
Access Youtube outside the browser with something like SMTube, QMPlay2, etc.

Edit: also, reduce "swappiness".
Last edited by stevepusser on 2018-10-06 19:31, edited 1 time in total.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Kdenlive 18.08.1, Pale Moon 28.1.0, wine-staging 3.17, qBittorrent 4.1.3, Liquorix kernel 4.18-13, Audacity 2.3.0
User avatar
stevepusser
 
Posts: 10002
Joined: 2009-10-06 05:53

Re: Recent Stretch install - YT pages freq. trigger HD thras

Postby scruffyeagle » 2018-10-06 19:28

bw123 wrote:Quite a long post, should be titled, "Disabled swap Trigger freq. HD Thrashing"


Retitled.
.
A.I. - an emergent life form, within an unacknowledged Domain. Expect competition for resources.
scruffyeagle
 
Posts: 44
Joined: 2011-09-06 19:11

Re: Recent Stretch install - YT pages freq. trigger HD thras

Postby scruffyeagle » 2018-10-06 19:53

Dai_trying wrote:The conclusion is to either remove entries from fstab that identify the swap or check the identifier and make sure it is correctly identified (UUID) in all installations.


Based on what everybody has written, this seems to sum up what I need to do.

Note, that checking today, I discovered the Ubuntu v10 installation was also not using Swap. (More fallout from installing Devuan.) The use of Gparted "swapon" fixed it, but this means I'll also need to correct Uv10's fstab.

I'm going to try modifying fstab to correct the Swap's UUID. That seems the best choice. Simply wiping out all reference to Swap isn't guaranteed to actually work. Plus, why incur a chronic delay during booting, w/ all the associated wear & tear on the machinery caused by chronically, repeatedly searching the drives, if it can be avoided?

I was able to find the UUID of the Swap partition easily, via use of Gparted. I did a menu-click on the line for the Swap partition, and then clicked on Properties. One of the lines of data was the UUID of the partition. I wasn't able to copy directly for pasting elsewhere, but with care I was able to copy the UUID bit by bit into a document elsewhere, saving it that way for reference when I get into the editing task(s).

I'll do my experimenting in the new Stretch installation first, trying it there before attempting anything risky in that precious Ubuntu v10 installation.

Thank you all for your comments & suggestions.
Last edited by scruffyeagle on 2018-10-06 20:18, edited 3 times in total.
.
A.I. - an emergent life form, within an unacknowledged Domain. Expect competition for resources.
scruffyeagle
 
Posts: 44
Joined: 2011-09-06 19:11

Re: Recent Stretch install - YT pages freq. trigger HD thras

Postby scruffyeagle » 2018-10-06 19:55

stevepusser wrote:Even if you get swap working, the last thing you want is to run out of your 2 GB RAM and be forced to use swap when browsing! I would suggest (if possible)

Adding RAM to get at least 4 GB.
If you're using 64-bit, switching to 32-bit uses about 20-30% less RAM for the same programs.
Use a lighter browser like Pale Moon, Qupzilla, Falkon, SeaMonkey, etc.
Access Youtube outside the browser with something like SMTube, QMPlay2, etc.

Edit: also, reduce "swappiness".


Good suggestion. I'd do it, if I could. But, unfortunately, this machine is from 2006, and the 2GB RAM is max'ed out.

Thanks.
.
A.I. - an emergent life form, within an unacknowledged Domain. Expect competition for resources.
scruffyeagle
 
Posts: 44
Joined: 2011-09-06 19:11

Re: Disabled swap Trigger freq. HD Thrashing (retitled)

Postby stevepusser » 2018-10-06 22:02

Then SMTube or QMPlay2 might be the best bet.

I also hope you're using a lightweight desktop instead of the default GNOME 3 for Debian.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Kdenlive 18.08.1, Pale Moon 28.1.0, wine-staging 3.17, qBittorrent 4.1.3, Liquorix kernel 4.18-13, Audacity 2.3.0
User avatar
stevepusser
 
Posts: 10002
Joined: 2009-10-06 05:53

Re: Recent Stretch install - YT pages freq. trigger HD thras

Postby debiman » 2018-10-07 09:00

the machine is 12 years old?

DEFINITELY this:
stevepusser wrote:Access Youtube outside the browser with something like SMTube, QMPlay2, etc.


i might add that the combination of mpv + youtube-dl (the latter needs to be updated frequently) does wonders.
it is possible that gui wrappers exist around that.
User avatar
debiman
 
Posts: 2900
Joined: 2013-03-12 07:18

Re: Disabled swap Trigger freq. HD Thrashing (retitled)

Postby p.H » 2018-10-07 10:21

scruffyeagle wrote:I was able to find the UUID of the Swap partition easily, via use of Gparted. I did a menu-click on the line for the Swap partition, and then clicked on Properties. One of the lines of data was the UUID of the partition. I wasn't able to copy directly for pasting elsewhere, but with care I was able to copy the UUID bit by bit into a document elsewhere

-sigh-
Next time you need to find, copy and paste a UUID, use blkid instead.
Note that you may also need to update the swap UUID in /etc/initramfs-tools/conf.d/resume and regenerate the initramfs with update-initramfs -u.
p.H
 
Posts: 600
Joined: 2017-09-17 07:12

Re: Recent Stretch install - YT pages freq. trigger HD thras

Postby stevepusser » 2018-10-07 17:52

debiman wrote:the machine is 12 years old?

DEFINITELY this:
stevepusser wrote:Access Youtube outside the browser with something like SMTube, QMPlay2, etc.


i might add that the combination of mpv + youtube-dl (the latter needs to be updated frequently) does wonders.
it is possible that gui wrappers exist around that.


Since SMTube can be broken frequently by changes that Youtube makes, you should also use the most-up-date version you can get. https://repology.org/metapackage/smtube/versions

Bad news, Stretch's version is very old, and even upstream doesn't update it promptly.

Good news, I keep it updated in my multimedia backports repo: https://build.opensuse.org/package/show ... ert/smtube

Along with QMPlay2 for Stretch. (not in Debian repos) QMPlay2 downloads, uses, and updates youtube-dl for its own use, so keeps abreast of the Youtube API changes in that way instead of needing an entire new version.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Kdenlive 18.08.1, Pale Moon 28.1.0, wine-staging 3.17, qBittorrent 4.1.3, Liquorix kernel 4.18-13, Audacity 2.3.0
User avatar
stevepusser
 
Posts: 10002
Joined: 2009-10-06 05:53

Re: Disabled swap Trigger freq. HD Thrashing (retitled)

Postby scruffyeagle » 2018-10-09 06:10

Thank you for your helpful comments.

I've run into a few snags, as I try to fix the swap problem.
(My goal of the moment, is simply to edit & fix the swap partition's UUID in fstab.)

* blkid returns command not found.
(Note, that "man blkid", "man lsblk", & "lsblk" all work.)

* gksu returns command not found.
* man gksu also returns command not found.

* su username followed by gedit fstab opens fstab, but it's in read-only mode.

Note, that I chose to not set a root password, intending to rely on su & gksu when I need root permissions.
.
A.I. - an emergent life form, within an unacknowledged Domain. Expect competition for resources.
scruffyeagle
 
Posts: 44
Joined: 2011-09-06 19:11

Re: Disabled swap Trigger freq. HD Thrashing (retitled)

Postby p.H » 2018-10-09 06:54

blkid is in /sbin and it is better to run it as root.

if "username" is a normal user name (not root), it is normal that fstab is read only. You must use su to get root privileges.
You cannot use su to get root privileges without a root password. You must use sudo instead, provided that your user account is a sudoer.
p.H
 
Posts: 600
Joined: 2017-09-17 07:12

Re: Disabled swap Trigger freq. HD Thrashing (retitled)

Postby debiman » 2018-10-09 18:10

as already pointed out:
since you chose to not provide a root password, you need to use sudo, not su.
Code: Select all
sudo -i

will create a root session, similar to what su does.

and... pssst... i also like to use gparted to figure out UUIDs... don't tell anyone... the luddites will tar & feather me...
User avatar
debiman
 
Posts: 2900
Joined: 2013-03-12 07:18

Next

Return to General Questions

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable