WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: *SOLVED* CorePlus-5.1 Installer creates swap file on USB flash drive: Why?  (Read 11662 times)

Offline Mike7

  • Full Member
  • ***
  • Posts: 143
Hi, all, and Happy Easter!

Everything I've read about running Linux on USB flash drives says not to use swap files as they seriously shorten the life of the drive. Yet after using the Installer app in CorePlus-5.1 to make a frugal install to a flash drive, I found this:

Control Panel>System Stats>mem:
SwapTotal:        248684 kB

Control Panel>System Stats>dmesg:
Adding 248684k swap on /dev/zram0.  Priority:-1 extents:1 across:248684k SS

What gives here? Is this 248MB swap file being used? Is it necessary? Why was it created? What should I do about it?

My computer has 1GB of RAM. Isn' t that enough to run TCL without a swap file?

And if I must have a swap file, wouldn' t it be better to have a separate swap partition or even a separate flash drive just for swapping, so as not to endanger the OS?

Can someone help me solve this issue so I don't keep worrying about it?

Thanks.

Cheers!

Mike
« Last Edit: April 28, 2014, 04:07:45 AM by Mike7 »
Asus eeePC 1000HA, Intel Atom N270 CPU, 1GB RAM, 160GB HDD, CorePlus-5.1 on 8GB flash drive.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: CorePlus-5.1 Installer creates swap file on USB flash drive: Why?
« Reply #1 on: April 18, 2014, 11:39:48 PM »
That is zswap. It is not on the flash drive.
Google zswap for more information.
To turn it off use the nozswap boot option.

Offline Mike7

  • Full Member
  • ***
  • Posts: 143
Re: CorePlus-5.1 Installer creates swap file on USB flash drive: Why?
« Reply #2 on: April 19, 2014, 10:27:17 AM »
Hi, Gerald. Happy Easter!

Quote
That is zswap. It is not on the flash drive.

That's a relief.

Quote
Google zswap for more information.

Found these:

========================================
kernel.org:

"Zswap is a lightweight compressed cache for swap pages. It takes pages that are in the process of being swapped out and attempts to compress them into a dynamically allocated RAM-based memory pool.  zswap basically trades CPU cycles for potentially reduced swap I/O.

Users with SSDs as swap devices can extend the life of the device by
drastically reducing life-shortening writes."

========================================
Wikipedia:

"As a result of reduced I/O, zswap offers advantages for various devices using flash-based storage, including embedded devices, netbooks and similar low-end hardware devices, as well as other devices using SSDs for storage. Flash memory has a limited lifespan due to its nature, so avoiding its usage for providing swap space prevents it from wearing out quickly."
========================================

It sounds like a very good thing, just the opposite of what I feared, so I won't be turning it off.

I guess it's enabled by default and being used?

Cheers.

Mike
Asus eeePC 1000HA, Intel Atom N270 CPU, 1GB RAM, 160GB HDD, CorePlus-5.1 on 8GB flash drive.

Offline volkerp

  • Jr. Member
  • **
  • Posts: 63
Re: CorePlus-5.1 Installer creates swap file on USB flash drive: Why?
« Reply #3 on: April 20, 2014, 04:18:53 AM »
Hi Mike7,

Yes, your'e right. The Corebook says:

Quote
10.33. nozswap - disable compressed swap in RAM

By default, Core uses a RAM compression technique allowing
you to use more RAM than you actually have. If you experience
problems with this, the nozswap bootcode lets you disable this.
Example:
• nozswap

As you don't experience any problems with this, there's no need for you to change anything. :)

Enjoy TC!

Volker

Offline Mike7

  • Full Member
  • ***
  • Posts: 143
Re: CorePlus-5.1 Installer creates swap file on USB flash drive: Why?
« Reply #4 on: April 22, 2014, 02:39:03 PM »
Volker-

You don't think zswap could be the cause of my problem watching videos in the browser?

M.
Asus eeePC 1000HA, Intel Atom N270 CPU, 1GB RAM, 160GB HDD, CorePlus-5.1 on 8GB flash drive.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: CorePlus-5.1 Installer creates swap file on USB flash drive: Why?
« Reply #5 on: April 22, 2014, 03:12:15 PM »
Volker-

You don't think zswap could be the cause of my problem watching videos in the browser?

M.

Don't ask. Disable and try. But for sure not.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Mike7

  • Full Member
  • ***
  • Posts: 143
Re: CorePlus-5.1 Installer creates swap file on USB flash drive: Why?
« Reply #6 on: April 22, 2014, 06:53:17 PM »
Hi, Béla.

Quote
Don't ask.

That's the opposite of what my mother taught me <grin>. Remember the first time you put your finger in a flame to see what would happen?

I was thinking of putting nozswap into extlinux.conf to see if that would improve video playing in my browser. Then I thought: suppose it doesn't and I want to re-activate zswap? Does removing nozswap from extlinux.conf re-create the zswap file? If not, how will I do that?

In other words, better to ask than to get into a bunch of trouble.

Cheers!

Mike

Asus eeePC 1000HA, Intel Atom N270 CPU, 1GB RAM, 160GB HDD, CorePlus-5.1 on 8GB flash drive.

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: CorePlus-5.1 Installer creates swap file on USB flash drive: Why?
« Reply #7 on: April 22, 2014, 07:11:48 PM »
zswap always gets enabled at boot if not explicitely disabled by the  nozswap  boot code.
You can safely add the  nozswap  to your boot loader and remove it to 're-enable' zswap.

Instead of editing your bootloaders config file, you can also just press TAB (for syslinux, extlinux, etc.) in the boot menu and edit the boot parameters without saving it to the config file.
Download a copy and keep it handy: Core book ;)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: CorePlus-5.1 Installer creates swap file on USB flash drive: Why?
« Reply #8 on: April 23, 2014, 01:59:23 AM »
Hi, Béla.

Quote
Don't ask.

That's the opposite of what my mother taught me <grin>. Remember the first time you put your finger in a flame to see what would happen?


Mike,

what I told:

Quote
Don't ask. Disable and try.

TC is all about learning and experimenting. What is better than to get hands on knowledge than reading books? At the end of the day you have to try anyhow to see wheter it helps or not.

:)

Bela
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Mike7

  • Full Member
  • ***
  • Posts: 143
Re: CorePlus-5.1 Installer creates swap file on USB flash drive: Why?
« Reply #9 on: April 23, 2014, 03:13:32 PM »
Hi, Béla.

You are right of course, in most situations, and I agree with you. For example, I have been reading the sections in Corebook about using Apps and tc-ab and tce-load, but no matter how many times I re-read them I still have to try to use them in order to understand how they work.

OTOH, there are many things that TCL does automatically, or by default, and unless I know how to un-do them I don't like to tamper with them. I just don't know enough yet.

Cheers!

Mike
Asus eeePC 1000HA, Intel Atom N270 CPU, 1GB RAM, 160GB HDD, CorePlus-5.1 on 8GB flash drive.

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: CorePlus-5.1 Installer creates swap file on USB flash drive: Why?
« Reply #10 on: April 23, 2014, 03:31:07 PM »
The good thing about TCL is that, compared to traditionally installed OSes, it's quite difficult to 'destroy' it.
If you have made some more or less important customizations, they are probably stored in your mydata.tgz (or core.gz if you have remastered this one).
So, if you don't trust in the changes you've made, you can just create copy of your mydata.tgz file before rebooting (where the mydata.tgz file gets updated) - Or choose the "save"-option at the 'TC Exit Options' if you're sure everything is working correctly.
So you're almost always able to recreate an earlier/working configuration.
Download a copy and keep it handy: Core book ;)

Offline Mike7

  • Full Member
  • ***
  • Posts: 143
Re: CorePlus-5.1 Installer creates swap file on USB flash drive: Why?
« Reply #11 on: April 26, 2014, 10:31:17 AM »
Hi, Misalf.

Thanks for the pep talk. I guess I needed it.

But I'm really not worried about making mistakes. The problems I'm having are built-in ones, like the use of Apps. For example, how come there are eight or so extensions (mostly dependencies) listed in "Load Apps Locally", when I never downloaded an extension except as onboot?

And why are almost all of the dependencies of applications that were pre-installed by CorePlus in onboot.lst, now forcing me to remove them one by one, a thankless task that Apps hasn't automated (so far as I can see)?

And how do I know which extensions to delete altogether, from over a hundred in the optional/ directory, probably half of which are unneeded?

Neither Corebook, nor the wikis, nor any here in the forum have been able or willing to explain to me how to do these things. Corebook passes over the Apps functions as if the people reading it already knew how to use them. Saying "Use the Dependencies and Deletions routines for managing dependencies" isn't any help at all.

Here are a few basic questions I need answers to before I can go any further with my TCL installation:
- Why were all extensions, including dependencies, put into onboot.lst by the CorePlus Installer?
- Why are some of these dependencies now no longer in onboot.lst (the ones appearing under "Load Apps Locally", I assume)? Are these dependencies of applications I deleted but which are also dependencies of other applications, so that when I deleted applications these dependencies were retained but are no longer in onboot.lst? (This is one possible explanation. The funny thing is that when I did "Fetch Missing dependencies" the list in "Load Apps Locally" didn't change. Apparently all the missing dependencies that were fetched went right back into onboot.lst, where they don' t belong.)
- How can I remove extensions (using Apps) that don't need to be in onboot.lst without writing them down by hand, one by one, and then removing them one by one?
- How do I know which extensions in the optional/ directory are not needed (firmware, libraries, dependencies of unused or deleted applications, etc.), so I can delete them?

My guess is that the people who wrote Apps don' t use it, using instead the terminal applications tce-ab and tce-load. For them, problems with the use or understanding of Apps don't matter. This is a cynical conclusion to come to, but after hassling with Apps for so long and getting no real help, it's the only conclusion I can come to.

I had similar problems with the Installer app when trying to install CorePlus to a USB flash drive. Everything about the Installer app gives the impression that it's not used by the people who wrote it. They don't use CorePlus, so why should they use the CorePlus Installer? It wasn't use-tested by a person like me who really needs it, so the problems with it never came out (Iike choosing between Frugal and USB-HDD, and the ambiguity of the boot code page).

In any case, I'll bear in mind that, like you kindly reminded me, there is a "Safe Backup" choice at shutdown, where I can save my unchanged mydata.tgz file. That does help a lot.

Cheers.

Mike
Asus eeePC 1000HA, Intel Atom N270 CPU, 1GB RAM, 160GB HDD, CorePlus-5.1 on 8GB flash drive.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: CorePlus-5.1 Installer creates swap file on USB flash drive: Why?
« Reply #12 on: April 26, 2014, 10:47:28 AM »
CorePlus installs a lot ov packages to support a lot of different hardware.
If you want a smaller installation use tthe TinyCore installer instead.

Core is not a normal distro.  It is a toolkit. It is designed for experienced people who need to build small systems.
If this is too difficult for you, you should try puppy or one of the other user oriented distros.

Offline Mike7

  • Full Member
  • ***
  • Posts: 143
Re: CorePlus-5.1 Installer creates swap file on USB flash drive: Why?
« Reply #13 on: April 26, 2014, 11:48:14 AM »
Hi, Gerald.

Quote
CorePlus installs a lot of packages to support a lot of different hardware.

But why does it put application dependencies in onboot.lst when they will be loaded at boot anyway (supposedly) by the application they are dependencies of?

Quote
If you want a smaller installation use tthe TinyCore installer instead.

I probably would have done so, but I needed the wifi apps. I have no ethernet connection.

Quote
Core is not a normal distro.  It is a toolkit. It is designed for experienced people who need to build small systems.

I can't claim to be experienced, but I do like small systems. However, TCL isn't all that small once the regular apps like file manager, browser, sound and media players, image and pdf viewers, etc. are installed. In fact it rapidly grows into a medium-size distro.

No, what attracted me to Core was the simplicity and elegance of the base apps like Editor, Wifi, Mount Tool, and the Control Panel utilities. Their austere look reminds me of the old xwindows in Unix, for which I have a lot of nostalgia, having worked at a Unix work station for five years in the early '90s.

I'm a minimalist at heart. I hate fancy gui's. For example, I've never really made the transition from B&W to color films <grin>, and I defend the artistic quality of B&W movies over color ones. Art was lost with the advent of color, IMO.

Quote
If this is too difficult for you, you should try puppy or one of the other user oriented distros.

I do have a Puppy distro on a pendrive (Puppeee4.4-atom). It has some nice apps, very well integrated, and a lovely clean desktop. But later versions of Puppy have gotten more and more fancy and unpleasant, and the nice simple apps were thrown out in favor of ones with bells and whistles that are of no interest to me. There is no longer any support for Puppeee, most regrettably. Progress killed it.

I'm very conservative in a lot of ways. I don't believe in constant updating. I believe applications should be perfected and then used for a long time. I like stability. I'm anti-consumerist and anti-modern.

So I kinda like TCL. Although I feel some dangerously progressive tendencies in it <grin>.

Mike
Asus eeePC 1000HA, Intel Atom N270 CPU, 1GB RAM, 160GB HDD, CorePlus-5.1 on 8GB flash drive.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: CorePlus-5.1 Installer creates swap file on USB flash drive: Why?
« Reply #14 on: April 26, 2014, 12:01:15 PM »
I suggest that you experiment more with Apps and the other utilities.  Even if you make a major mistake, it only takes about 5 minutes to completely reinstall it.
CorePlus puts more than is necessary in the onboot.lst, but trying to analyze your system and decide what you might want would over complicate the installation.
Just because program2 is a dependency of  program1, it does not follow that you might not want program2 even if you remove program1 from the onboot list.

Don't be afraid to play with it.  As you become more familiar with it you will appreciate the utilities more.