LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Bodhi (https://www.linuxquestions.org/questions/bodhi-92/)
-   -   Bodhi v5.0 32-bit on 4GB SSD plus 32 GB SD card, running Firefox (https://www.linuxquestions.org/questions/bodhi-92/bodhi-v5-0-32-bit-on-4gb-ssd-plus-32-gb-sd-card-running-firefox-4175651798/)

RonCam 04-09-2019 11:16 AM

Bodhi v5.0 32-bit on 4GB SSD plus 32 GB SD card, running Firefox
 
Hmmm ... LVM gets no hits, what a surprise. So let me ask this:

I am running, or trying to run, Bodhi v5.0 installed on a combination of a 4GiB SSD and a 32MB type A1 SD card. I put some of the installation directories/partitions on one and some on the other. Don't know if I made the best choices of which goes where.

The problem is with browsers: Midori runs quite well, but my usual browser (e.g., Firefox) is practically unusable. I suspect the (10 year old) SD interface which, of course, does not support A1 cards, is 'choking up' with the reads and writes when a new site is loaded. Once loaded, a web page scrolls back-and-forth perfectly.

I think Firefox is 'heavier' in this regard than is Midori. There may be some other reason, but my thinking is that whatever Firefox is doing could be better handled by the (also slow, but not that slow) SSD drive. I have /home on the SD card and I now wonder if that's the problem.

All other programs are quite responsive and run just fine. This makes me think there may be hope.

I have just now come across this, about running older netbooks with a 4GB SSD-SD card combination:
This sounds worth-while trying and maybe it would reduce the bottleneck when Firefox is 'doing it's thing' with the reads and writes, by bringing the SSD into play at these times. Or at least, I would hope ...

The only problem is, these directions are for Arch Linux, and not for a Ubuntu-derivative. There are references to configuration files that we (Bodhi users) don't have.

Does anyone having experience with running Bodhi on similar hardware know if this would be worth trying, or is there a better way achieving the objective? If there's a chance that LVM partitions might help, where would one find directions for setting this up?

RonCam 04-09-2019 01:23 PM

I am searching and reading about lvmcache, which allows a faster storage medium to cache for a slower one. I am wondering if this could work if the 'slowness' is worse when multiple reads-writes are taking place at one time, and maybe not so bad at other times.

Someone did set up a LVM installation a few years ago, on an older Ubuntu version. Don't see mention of creating a separate boot partition located outside of the LVM, but did see this elsewhere.

It is interesting that on the same netbook, Firefox is quite sprightly on a 'live' DVD (almost everything running from RAM, with only sporadic DVD access) but slows down considerably when running from an installed OS.

RonCam 04-09-2019 05:59 PM

If this is true, it's easier than I had thought ...
 
:redface: I have discovered that installing Bodhi v5.0 using LVM ... is right there, as one of the installation options.
Now I'm confused -- why are people posting complex directions on other forums, on how to do this, if you can simply check the box? Or, does this not do the job completely? :confused: Am I missing something?

When proceeding through the installation, with this box checked, is it straight-forward to create logical volumes including both the 4GB SSD and a 32GB SD card?

michaelk 04-09-2019 06:32 PM

My EeePC 900 with 4GB SSD died about 4 years ago and on occasion do miss it.

One of the advantages of LVM is that you can add disks and resize (somewhat depends on filesystem type) "on the fly". And as you have posted multiple partitions can appear as one filesystem. I'm not totally familiar with the installer and what it uses for its default partition schemes but many or most automatic installs default to using just the first drive found unless you select manual partitioning.

When LVM first came out the /boot partition could not be part of the LVM and while this isn't true today many installers still create a separate partition.

Yes, the USB and SD card reader will be much slower than the SSD. A live system will run from RAM but use a squash filesystem so the USB or SD card appears as one filesystem. The slow down only happens when the system has to access the media. Probably are going to have to stick with a lightweight browser over Firefox.

RonCam 04-10-2019 07:37 AM

Can anyone on this forum relate their experience in setting up LVM partitions covering both an internal SSD and an SD card, in the computer's card slot?

Without having the practical experience of this, I am wondering if the best way is to set up the logical volumes first, from terminal, while still running 'Live', and only then select 'Install' and 'tick' the Installation Type check-box, for LVM?

Or can this type of installation be managed just by running the Installer, itself?

I had tried to troubleshoot this by running the fatrace utility while Firefox was (slowly) preparing to display a web page, and noted a tremendous burst of read/write activity involving ~/.mozilla/firefox, in /home (which resides on the SD card). I then thought to recreate that directory structure on the SSD, put it on the path, remove the same directory from the SD card, and see if Firefox would then access (the relocated directory on) the SSD instead of going to the SD card.

But this 'hack' -- if it works -- would only work for Firefox and not for other browsers (except Midori, which doesn't need it) I may want to use in the future.

For this reason I am now exploring combining the SSD and SD card into one, with LVM. I think the only way I will know if it helps is to set it up, and see how it runs. So, any comments about the practical aspect of the a LVM set-up, in this use-case, will be most appreciated.

RonCam 04-10-2019 08:23 AM

I am continuing to search for directions.
The only advice I can find is five years old and most appreciated if someone could mention whether it applies to to Bodhi 5.0?
  1. You can do it all from the installation menu.
  2. Select manual partitioning and make (in the linked example) one partition per storage device.
  3. Then, select Manage LVM (again, this is the wording from 5-year-old link, above)
  4. create Volume Group and select the 2 partitions I made
  5. create 6 logical volumes of appropriate sizes (or presumably, create as many as you want)
  6. then mount them using ext4
Does this sound right, for the current Bodhi -- hopefully, someone here has done this?

RonCam 04-10-2019 09:55 AM

More recent reference here, on LVM setup during installation and it seems a lot of people are confused because there is a bug (in this case, an accidental omission) in the menu choices, for Ubuntu Desktop 18.04. If Bodhi inherited this bug, the linked discussion may be helpful to work through, or around, it.

michaelk 04-10-2019 10:07 AM

I am trying to create a virtual machine using a similar configuration to see how the installer works.

Update:
As posted no manual LVM capability so need to use parted and LVM utilities prior to installing. I've run out of time but will get back to it later.

michaelk 04-10-2019 05:49 PM

I successfully installed bodhi using LVM on multiple drives as explained in post #7. In my case I was playing around with the installer and selected LVM using the automatic installer but quit before it actually started installing files. It created a ~3GB root logical volume and ~1GB swap LV.

The second virtual drive is ~10GB and I created a partition table and a primary partition with a LVM label i.e. /dev/sdb1 and from there created a LVM physical volume using /dev/sdb1. I then extended the root volume group and root logical volume to include /dev/sdb1. The root LV is now ~13GB. I went ahead and formatted the root and swap LVs but the installer will also. By the way you can use any partitioning tool i.e. fdisk, parted, cfdisk etc to create the two partitions.

I then started the installer and selected something else. It recognized both LVs and from there you need to select the filesystem type and mount point for each i.e. in my case root LV, ext4 as / and swap LV as swap.

When all that is done click continue and the installer asks to enter a username/password and off it goes installing files...

As stated in the link from post #7 you do need to understand LVM basics and a few commands... pvcreate, lvcreate, vgcreate and lvextend as well as lvs, vgs, lvdisplay, vgdisplay, pvs, pvscan. There are a few howtos you can find and while not extremely difficult can be a little daunting since you are using the command line. I would probably put swap on the SD card or not use one at all but it did help on my 900 a little.

I can't see how it will help firefox but it is an interesting science project...

While this is just a summary explaining the steps ask away with anything you don't understand.

RonCam 04-11-2019 03:39 AM

First of all, :hattip: thanks so much for taking the time to show me how this is working, with the current Installer. I suspected some of the search results I read could be out-of-date. For example, you didn't mention coming across a missing menu entry in the Installer. Perhaps it was fixed after the Post #7 link was written?
Quote:

Originally Posted by michaelk (Post 5983430)
I successfully installed bodhi using LVM on multiple drives as explained in post #7. In my case I was playing around with the installer and selected LVM using the automatic installer but quit before it actually started installing files. It created a ~3GB root logical volume and ~1GB swap LV.

To make sure I understand each step, may I assume the boldfaced words mean you clicked <Cancel> and exited voluntarily, and not that the Installer spontaneously 'quit' due to some malfunction or lack of an appropriate option to continue?
[Edit: Yes, it was a voluntary <Cancel>, but the Installer does not have to be used to create logical volumes.]

Quote:

The second virtual drive is ~10GB and I created a partition table and a primary partition with a LVM label i.e. /dev/sdb1 and from there created a LVM physical volume using /dev/sdb1. I then extended the root volume group and root logical volume to include /dev/sdb1. The root LV is now ~13GB. I went ahead and formatted the root and swap LVs but the installer will also. By the way you can use any partitioning tool i.e. fdisk, parted, cfdisk etc to create the two partitions.
Here, you are working in terminal? And, is this just a matter of your choice, or because the none of the Installer menu options would be capable of doing this? I suspect the latter is the case ...?

Quote:

I then started the installer and selected something else. It recognized both LVs and from there you need to select the filesystem type and mount point for each i.e. in my case root LV, ext4 as / and swap LV as swap. When all that is done click continue and the installer asks to enter a username/password and off it goes installing files...
Great, the above is crystal-clear.

Quote:

I would probably put swap on the SD card or not use one at all but it did help on my 900 a little.
Quite clear, but are you recommending an optional Swap would be set-up outside the LVM partition(s), or inside it? In the above quote, you mentioned that Swap was set-up by the Installer, but when it's inside a logical volume, do you have control over to which physical device this partition is directed? Or, are the SSD and SD card in different logical volumes? :confused: This may be in your second paragraph but I'm having trouble following which device is the drive and which is the card.

Quote:

I can't see how it will help firefox but it is an interesting science project...
Well, I will take this one step at a time, but I was already thinking if Firefox still has problems with reads and writes exceeding the 701's SD card interface's capabilities, I would again run the fatrace utility to find where the problem lies and then try buffering the activity to that directory (directories) with lvmcache and the cache either on the SSD or in a RAM Disk (I have upgraded the 701 to the max, with 2GB RAM chips). But this may not be an issue, if for example, that ~/.mozilla/firefox directory 'happens' to locate itself (does the user have any control over this, in LVM-created partitions?) on the SSD, rather than the SD card.

RonCam 04-11-2019 04:14 AM

As an aside, the reason I suspect a bottleneck at the SD-card interface
 
This problem with Firefox probably wouldn't exist in a computer having a very recent SD-card interface because ...the specs for the SanDisk Ultra SDHC Type A1 UHS-1 Card, 'up to' 98MB/s (653x) have two asterisks after it.

The 'fine print' says that's only read speed, not write, but even more relevant to the eeePC 701, it assumes a hardware interface that's compatible with the standard for A1 cards, and this is almost certainly not the case in a 10-year-old netbook. All things considered, it's surprising it works as well as it does with practically everything else, except for Firefox.

michaelk 04-11-2019 08:02 AM

I did edit my post #8 which concurred with #7 that manually creating LVM was not possible.

I did go back and cancel while learning how the installer works.

I used the terminal as a matter of choice. There are not many GUI tools that support LVM and really did not know if there were any on the live system.

As far as swap goes, with an old SSD I don't know how good the wear leveling techniques were back then and would try to limit writes as much as possible. There are also ext4 options like using noatime to limit writes.

RonCam 04-11-2019 10:45 AM

Thanks again. I'm going to backup the entire SSD, put in a fresh SD card, and then go ahead and see how it runs. Some things cannot be predicted just by thinking about them ... too many variables!


All times are GMT -5. The time now is 08:26 AM.