Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 18 Aug 2018, 12:34
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
XenialDog 64bit (Ubuntu 'Xenial Xerus' LTS, 64-bit)
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 21 of 27 [404 Posts]   Goto page: Previous 1, 2, 3, ..., 19, 20, 21, 22, 23, 24, 25, 26, 27 Next
Author Message
fredx181


Joined: 11 Dec 2013
Posts: 3215
Location: holland

PostPosted: Wed 17 Jan 2018, 13:05    Post subject:  

The Flying Cat wrote:
Is there a relatively painless way of installing another kernel? Or change kernel upgrade script to use another metapackage, say HWE from LTS releases or custom from PPA like liquorix? Maybe via integrating config files.
Was kinda curious about testing https://liquorix.net/, seems like it might be fast:)


Indeed, as stemsee wrote, the liquorix kernel will be problematic because it doesn't have aufs (porteus-boot needs it)
For testing, I just installed 4.14 kernel using "new-kernel" script, attached (NOT fake .gz, extract and run it) from here and works fine:
https://launchpad.net/~canonical-kernel-team/+archive/ubuntu/unstable/+sourcepub/8711254/+listing-archive-extra
Direct links to amd64 packages (you need also the linux-image-extra package (it contains aufs):
https://launchpad.net/~canonical-kernel-team/+archive/ubuntu/unstable/+files/linux-image-4.14.0-16-generic_4.14.0-16.19_amd64.deb
https://launchpad.net/~canonical-kernel-team/+archive/ubuntu/unstable/+files/linux-image-extra-4.14.0-16-generic_4.14.0-16.19_amd64.deb
Just download the deb packages, run the new-kernel script and select them both (using yad file-selector).
You can also search for other linux-image .deb packages, but as said, the linux-image-extra-.....-generic... is required.

Fred
new-kernel.tar.gz
Description  Extract, run "new-kernel", and select .deb packages
gz

 Download 
Filename  new-kernel.tar.gz 
Filesize  3.61 KB 
Downloaded  74 Time(s) 

_________________
Dog Linux website
Back to top
View user's profile Send private message 
The Flying Cat

Joined: 10 Oct 2016
Posts: 40

PostPosted: Thu 18 Jan 2018, 05:29    Post subject:  

Yep, new 4.14.0-16 kernel as expected have first wave of meltdown/spectre patches
Code:
root@live:~# cat /proc/cpuinfo | grep bugs
bugs      : cpu_meltdown

As an intel cpu owner I expected to get 0-10% performance drop (so liquorix could've been nice offset Razz )
But so far I have seen none
Code:
4.14.0-13
systemd-analyze
Startup finished in 5.495s (kernel) + 5.015s (userspace) = 10.510s
4.14.0-16
root@live:~# systemd-analyze
Startup finished in 5.263s (kernel) + 4.126s (userspace) = 9.390s

glmark2 also shows no performance drop, actually also small increase probably due better firmware (I heard they did a good job on opensource drivers)
I guess I'll fiddle a bit more with this

Forgot to mention: this is on Bionic Dog (really nice one btw)
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 934
Location: not Bulgaria

PostPosted: Fri 19 Jan 2018, 07:58    Post subject:  

backi wrote:

Here are 2 scripts to enable or disable zram on Demand :

Enable :

#!/bin/bash
swapon /dev/zram0

Disable :

#!/bin/bash
swapoff /dev/zram0

Regards !


Hi backi,

Yes, its useful to be able to enable or disable the zram swap when wished. I should point out that sometimes there is more than one zram swap created. Possible it is one per cpu core. Certainly on my intel core II duo machine the swap automatically provided is combination of /dev/ram0 and /dev/ram1. One way of disabling both at once is simply to disable all swap with:

Code:
swapoff -a


Cheers, wiak
Back to top
View user's profile Send private message 
backi

Joined: 27 Feb 2011
Posts: 1516
Location: GERMANY

PostPosted: Fri 19 Jan 2018, 11:10    Post subject:  

Hi wiak !

Quote:
I should point out that sometimes there is more than one zram swap created. Possible it is one per cpu core.


Yes thats`s the case .

Just one observation ---swapoff -a also disables swap-partition .

Zram is a cool thing for low-ram machines !

Regards ! Smile
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 934
Location: not Bulgaria

PostPosted: Fri 19 Jan 2018, 11:19    Post subject:  

backi wrote:

Just one observation ---swapoff -a also disables swap-partition .


Yes, I don't use a swap partition. But if you have a swap partition also does the system 'know' to use zram first before using slow swap partition?

wiak
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 3215
Location: holland

PostPosted: Fri 19 Jan 2018, 13:00    Post subject:  

wiak wrote:
But if you have a swap partition also does the system 'know' to use zram first before using slow swap partition?


You can set priority with the -p option, for example, I have swap partition sda6 and in /etc/rc.local:
Code:
modprobe zram

echo $((800*1024*1024)) > /sys/block/zram0/disksize    # 800MB size

mkswap /dev/zram0

swapon /dev/zram0 -p 1 # higher priority for zram
swapon /dev/sda6 -p 0


(this may be the old fashioned way to setup zram, I used to do it this way long time ago and just kept it)
Also for porteus-boot, you need to add noswap to the kernel boot line (since swapon is done from rc.local this way)

Fred

_________________
Dog Linux website
Back to top
View user's profile Send private message 
backi

Joined: 27 Feb 2011
Posts: 1516
Location: GERMANY

PostPosted: Fri 19 Jan 2018, 13:09    Post subject:  

Hi !

Quote:
Yes, I don't use a swap partition. But if you have a swap partition also does the system 'know' to use zram first before using slow swap partition?

By observing Conky i came to the Conclusion that Zram will be used automatically first .But could be wrong .
One should also consider "Swappiness " to avoid premature swapping .
I think a good value would be 10 .
Here how to set Swappiness :
https://askubuntu.com/questions/103915/how-do-i-configure-swappiness

Regards !
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 3215
Location: holland

PostPosted: Fri 19 Jan 2018, 13:20    Post subject:  

backi wrote:
One should also consider "Swappiness " to avoid premature swapping .
I think a good value would be 10


Sure. But most Dogs have it already by default, in /etc/sysctl.conf :

Code:
vm.swappiness=10

For SSD disks I often read that it's recommended to set swappiness to 1

Fred

_________________
Dog Linux website
Back to top
View user's profile Send private message 
dancytron

Joined: 18 Jul 2012
Posts: 1102

PostPosted: Fri 19 Jan 2018, 17:37    Post subject:  

This is the script I dug up off the internet to do zram. I modified it to use lz4.

Code:
#!/bin/sh
### BEGIN INIT INFO - copied from https://wiki.debian.org/ZRam
##"zramctl --raw" to check status.  usage "zram.sh start | stop"  See #120 from build_setup.txt.
#copied portion begins --
# Provides:          zram
# Required-Start:    $local_fs
# Required-Stop:     $local_fs
# Default-Start:     S
# Default-Stop:      0 1 6
# Short-Description: Use compressed RAM as in-memory swap
# Description:       Use compressed RAM as in-memory swap
### END INIT INFO

# Author: Antonio Galea <antonio.galea@gmail.com>
# Thanks to Przemysław Tomczyk for suggesting swapoff parallelization
# Distributed under the GPL version 3 or above, see terms at
#      https://gnu.org/licenses/gpl-3.0.txt

FRACTION=75

MEMORY=`perl -ne'/^MemTotal:\s+(\d+)/ && print $1*1024;' < /proc/meminfo`
CPUS=`nproc`
SIZE=$(( MEMORY * FRACTION / 100 / CPUS ))

case "$1" in
  "start")
    param=`modinfo zram|grep num_devices|cut -f2 -d:|tr -d ' '`
    modprobe zram $param=$CPUS
    for n in `seq $CPUS`; do
      i=$((n - 1))
#next line added by dan 1-18-18 see #122.
      echo lz4 > /sys/block/zram$i/comp_algorithm
      echo $SIZE > /sys/block/zram$i/disksize
      mkswap /dev/zram$i
      swapon /dev/zram$i -p 10
    done
    ;;
  "stop")
    for n in `seq $CPUS`; do
      i=$((n - 1))
      swapoff /dev/zram$i && echo "disabled disk $n of $CPUS" &
    done
    wait
    sleep .5
    modprobe -r zram
    ;;
  *)
    echo "Usage: `basename $0` (start | stop)"
    exit 1
    ;;
esac


Then put it in /usr/local/bin as zram.sh and start zram with "zram.sh start" and stop it with "zram.sh stop."

This is what it does on mine:

Code:
root@live:~/Desktop# ./zram.sh start
Setting up swapspace version 1, size = 1.1 GiB (1179811840 bytes)
no label, UUID=b9077645-1d5f-44ce-a6ea-de2xxxxxxxxxxxxxx
Setting up swapspace version 1, size = 1.1 GiB (1179811840 bytes)
no label, UUID=120b35f7-42c3-4718-9f2f-2xxxxxxxxxxxx

root@live:~/Desktop# zramctl
NAME       ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram0 lz4           1.1G   4K   64B    4K       2 [SWAP]
/dev/zram1 lz4           1.1G   4K   64B    4K       2 [SWAP]

root@live:~/Desktop# swapon -s
Filename            Type      Size   Used   Priority
/dev/sda3                                 partition   1430524   0   -1
/dev/zram0                                partition   1152160   0   10
/dev/zram1                                partition   1152160   0   10


I just added this a couple of days ago, so I haven't done anything to make it start automatically yet. Seems to work so far.
Back to top
View user's profile Send private message 
backi

Joined: 27 Feb 2011
Posts: 1516
Location: GERMANY

PostPosted: Sat 20 Jan 2018, 09:26    Post subject:  

Hi Dancytron !

Quite interesting .
Zram-config must be installed via Synaptic ?..... (I have )....It can be found in /etc/inid.d/zram .
I assume lz4 makes it work faster .
Put your script in /usr/local/bin .Seems working .
But when using " zram.sh start" in Terminal got somehow different output in Terminal than yours .Nevertheless it works .Zram is shown in Conky/Htop .
Does it somehow conflict with formerly installed zram-config Script?
Cool . Smile

Regards !
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 934
Location: not Bulgaria

PostPosted: Sat 20 Jan 2018, 10:34    Post subject:  

After installing with zram-config I find that /sys/block/zram0/comp_algorithm is already using lz4 on my XenialDog64 system.

wiak
Back to top
View user's profile Send private message 
backi

Joined: 27 Feb 2011
Posts: 1516
Location: GERMANY

PostPosted: Sat 20 Jan 2018, 10:43    Post subject:  

Hi wiak !
I am using DebDog Xenial 32 bit .
Naive as i am ......just installing zram-config makes lz4 compression enabled by default ?........no need to use Dancytrons Script ?
How to find it out if my Machine is using lz4 (just zram-config installed )?
Which are the magic Words (command) to find out ?

Greetings from good ole cold and rainy Germany !

Hendrix: Still Rainin', Still Dreamin'
https://www.youtube.com/watch?v=b0E6fLJixUs
Back to top
View user's profile Send private message 
backi

Joined: 27 Feb 2011
Posts: 1516
Location: GERMANY

PostPosted: Sat 20 Jan 2018, 10:56    Post subject:  

Hi wiak !

Found out myself ( /sys/block/zram0/comp_algorithm )
Back to top
View user's profile Send private message 
Lassar

Joined: 08 Jul 2014
Posts: 221

PostPosted: Sat 20 Jan 2018, 14:15    Post subject: Found out how to get icewm to work on XenialDog  

Icewm-xdgmenu needs a version 2 of a library, where as
zenaial dog has a version 3 of the library.

I tried copying the version 2 of the library over to zenialdog, and
it worked.

I guess I could use one the python scripts that does the same
thing.

Or someone could recompile icewm-xdgmenu to use version 3
of the library.

Where does one get the icewm-xdgmenu source code?
Back to top
View user's profile Send private message 
dancytron

Joined: 18 Jul 2012
Posts: 1102

PostPosted: Sat 20 Jan 2018, 21:05    Post subject:  

backi wrote:
Hi wiak !

Found out myself ( /sys/block/zram0/comp_algorithm )


"zramctl" will give you a status summary. Also, "swapon -s".

Code:
root@live:~/Desktop# zramctl
NAME       ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram0 lz4           1.1G   4K   64B    4K       2 [SWAP]
/dev/zram1 lz4           1.1G   4K   64B    4K       2 [SWAP]

root@live:~/Desktop# swapon -s
Filename            Type      Size   Used   Priority
/dev/sda3                                 partition   1430524   0   -1
/dev/zram0                                partition   1152160   0   10
/dev/zram1                                partition   1152160   0   10
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 21 of 27 [404 Posts]   Goto page: Previous 1, 2, 3, ..., 19, 20, 21, 22, 23, 24, 25, 26, 27 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0791s ][ Queries: 15 (0.0140s) ][ GZIP on ]