How to Tune Up a PuppyLinux Frugal Install on a Virtual Machine

New to Puppy and have questions? Start here

Moderator: Forum moderators

Post Reply
JusGellin
Posts: 178
Joined: Fri Jan 19, 2024 11:12 pm
Has thanked: 10 times
Been thanked: 23 times

How to Tune Up a PuppyLinux Frugal Install on a Virtual Machine

Post by JusGellin »

How can I best tune up the memory and number of cpu's for a qemu virtual machine containing a frugal install of puppylinux? What tools could I use to see if this is the best set up and what to look for? I noticed a slight hesitation when I'm browsing with FirefoxESR (probably because I tend to open a lot of tabs) I don't think I need to be too concerned about the storage amount, or do I?

This virtual machine has:
BookwormPup64_10.0.6
4096 MiB memory
2 CPUs
5 GiB storage

I would like to tune this to what the minimum needs to be and still be the most efficient it can be and what are the best tools to help look at this.

Thanks

Geek3579
Posts: 245
Joined: Sat Jul 18, 2020 1:07 pm
Has thanked: 68 times
Been thanked: 62 times

Re: How to Tune Up a PuppyLinux Frugal Install on a Virtual Machine

Post by Geek3579 »

I often run Virtual machines under QEMU with a similar setup to yours and have had few problems.

But, even with non-virtual puppy OSs I sometimes need to clear the memory caches (especially running WINE) , so this may be helpful in any case.

I have adapted what others have written and linked it to a keystroke, so the memory can be cleared anytime. The script runs and self-exits after 8 seconds.
I find it really handy.

#!/bin/sh
# simple tool for puppy linux to clean caches
# Adapted from script by Joe Arose aka big_bass

echo "before flush"
echo
free -m
echo "--------------------------------------------------------------------"
echo
sync ; echo 3 > /proc/sys/vm/drop_caches

echo
echo "after flush"
echo

free -m
echo "--------------------------------------------------------------------"
echo
echo "closing after 8 seconds"
sleep 8 && exit

# bash

Some tips can also be found here: https://www.forum.puppylinux.com/viewtopic.php?t=2944

User avatar
bigpup
Moderator
Posts: 6268
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 732 times
Been thanked: 1292 times

Re: How to Tune Up a PuppyLinux Frugal Install on a Virtual Machine

Post by bigpup »

What type and speed is the memory in the computer?

What is the CPU in it?

I would not judge anything by how the browser works.
To many things affect them,
You already talk about one of the biggest things. What web sites is it displaying.

Forum Global Moderator
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

JusGellin
Posts: 178
Joined: Fri Jan 19, 2024 11:12 pm
Has thanked: 10 times
Been thanked: 23 times

Re: How to Tune Up a PuppyLinux Frugal Install on a Virtual Machine

Post by JusGellin »

Memory is 3200 MHz DDR4
CPU is i7-13700

So with my virtual machine I'm using 4 GiB memory and two cores of the CPU. I was just wondering how to better analyze this to see if those settings were doing enough. The browsing I'm doing is just normal type - just looking things up and running Youtube sometimes. But I did find that when I just gave it 2 GiB memory it would lock up quite a bit. So I increased it to 4 GiB.

It seems to be a good idea to clear the cache like @Geek3579 gave the script to try.
Thanks

User avatar
bigpup
Moderator
Posts: 6268
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 732 times
Been thanked: 1292 times

Re: How to Tune Up a PuppyLinux Frugal Install on a Virtual Machine

Post by bigpup »

BookwormPup64 is setup to use zram setup.

zram is a Linux kernel module for creating a compressed block device in RAM, i.e. a RAM disk with on-the-fly disk compression.
The block device created with zram can then be used for swap or as a general-purpose RAM disk.
The two most common uses for zram are for the storage of temporary files (/tmp) and as a swap device.

When it works correctly, it makes the RAM function as if there is more RAM than is physically there.

Not sure how that would work on a virtual setup.

Forum Global Moderator
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

JusGellin
Posts: 178
Joined: Fri Jan 19, 2024 11:12 pm
Has thanked: 10 times
Been thanked: 23 times

Re: How to Tune Up a PuppyLinux Frugal Install on a Virtual Machine

Post by JusGellin »

That looks like something interesting to try out. Is there any simple instruction to show how to do that?

But, by using a virtual machine I can easily give it more memory. I would just like to learn how to monitor this better. Maybe it would be just good for me to learn some basic tips for analyzing how well my puppylinux is running and how it works. I would like to learn more about this just to understand it better.
Thanks

JusGellin
Posts: 178
Joined: Fri Jan 19, 2024 11:12 pm
Has thanked: 10 times
Been thanked: 23 times

Re: How to Tune Up a PuppyLinux Frugal Install on a Virtual Machine

Post by JusGellin »

I noticed that when I list the drives and partitions using the command lsblk that there is a zram0 using 3.7 GB and is a [SWAP]. Is this the same thing you mentioned?

User avatar
bigpup
Moderator
Posts: 6268
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 732 times
Been thanked: 1292 times

Re: How to Tune Up a PuppyLinux Frugal Install on a Virtual Machine

Post by bigpup »

Yes.
That is zram.
So, it seems to already be setup and being used.

That is normal operation of an install of BookwormPup64.
It sets up zram as part of a normal boot up.

This is really starting to be normal setup in Linux OS's.

In the RAM your computer has, it should work very well.

To better understand zram, you need to go read some of the info about it, posted on the Internet.

It is a totally different way to use swap and RAM.

Forum Global Moderator
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

JusGellin
Posts: 178
Joined: Fri Jan 19, 2024 11:12 pm
Has thanked: 10 times
Been thanked: 23 times

Re: How to Tune Up a PuppyLinux Frugal Install on a Virtual Machine

Post by JusGellin »

Thanks for that information to help me understand. :thumbup:

Clarity
Posts: 3270
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1347 times
Been thanked: 438 times

Re: How to Tune Up a PuppyLinux Frugal Install on a Virtual Machine

Post by Clarity »

@JusGellin think of a QEMU VM as just another PC that you build and use on the screen in front of you. That it!

The OS your run in that additional PC will behave in exactly the way it does on a real PC.

Its merely a PC that you (or utilities) use that is built via the QEMU command. So in essence you are on your main PC and can simultaneously run a 2nd (or more) virtual PC (a VM) ... together.

One of my test PCs has 2 physical CPUs that has 4 cores, each, with each core being hyper-threaded cores giving me a total of 16 CPUs to accomplish work to the real PC's needs. When running that PC, I use QEMU to make a virtual PC that is given 2 of the 16 cores, like RAM, video, audio and other features, When I boot an OS like a PUP, I now have 2 PCs useful on my TV (monitor). Further, if I choose, I can create an additional VM that has 1 CPU and ?GB RAM, etc giving me 3 PCs visually on my TV. And, I can do multiple additional by allocating more VMs for what my simultaneous needs are.

Thus 1 machine sharing its total resources, as I divide it up for use to my workloads.

Hope this simple example is helpful.

JusGellin
Posts: 178
Joined: Fri Jan 19, 2024 11:12 pm
Has thanked: 10 times
Been thanked: 23 times

Re: How to Tune Up a PuppyLinux Frugal Install on a Virtual Machine

Post by JusGellin »

@Clarity That's excellent!!
That's how I'm working toward, only I'm using qemu virt-manager to do it which does it well for what I need. I'm installing different distros and giving them their own virtual hard drive spaces. Virtual machines are just so useful for learning about linux and especially my hope of learning Puppy Linux more. As you might remember I still wish I was able to be able to clipboard copy text information between the host and guests like I can with other linux distros. I do have a work around by using a shared file between them which works, but is a little cumbersome.

Also by using virtual machines, I can vary the amount of memory and cpu's to tune up what it would take for my working with some of my other pcs.

Your setup seems great. You are even connecting to a TV monitor. I just have two 23 inch monitors attached to my big pc. I would like to have something hooked up to a big tv in a different room but haven't gotten that far yet.

Thanks more for your insights. I can see that you are really involved with helping people and you are really knowledgeable. I really appreciate that.

Clarity
Posts: 3270
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1347 times
Been thanked: 438 times

Re: How to Tune Up a PuppyLinux Frugal Install on a Virtual Machine

Post by Clarity »

JusGellin wrote: Sun Apr 14, 2024 10:57 am

... virt-manager to ...

YES! That is the Best of Breed for VMs. It is fully feature with help everywhere from documentation, multimedias, and discussed in EVERY major distro with many-many users in the world helping it in support.

Its use has been 'virtually' :) absent in this community for several reason (I wont cover). BUT, over the last year, I am seeing more and more members reporting their use of Virt-Manager.

AGAIN, it is 'the best' we have in the industry today as it is clear, simple and more than capable with constant upgrades for CPUs known to man.

Post Reply

Return to “Beginners Help”