Able to start SolydK only through recovery mode

New to SolydXK? This is the place to start.
Please check the other subforums to see if there's a more suitable place for your question.
User avatar
Zill
Posts: 1850
Joined: 13 Aug 2013 14:28
Location: Lincolnshire, UK

Re: Able to start SolydK only through recovery mode

Postby Zill » 15 Oct 2016 11:15

kurotsugi wrote:while I'm agree that reinstall might be a good idea, the swap things aren't really necessary. especially if you want to preserve windows. you can install like usual.
I agree that swap isn't always necessary, particularly if the machine has plenty of RAM. However, in this case, we are looking at just 1749.6MB of RAM... ;-)

kmaciel007
Posts: 10
Joined: 29 Sep 2016 18:17

Re: Able to start SolydK only through recovery mode

Postby kmaciel007 » 15 Oct 2016 14:39

Ok, guys. Thanks for your honest replies. I'll re-install the OS. I've been wondering whether it would be better installing solydX instead due to my machine hardware limitations for xfce is pretty lighter than kde. Tell me your opinion, please.

User avatar
Zill
Posts: 1850
Joined: 13 Aug 2013 14:28
Location: Lincolnshire, UK

Re: Able to start SolydK only through recovery mode

Postby Zill » 15 Oct 2016 15:21

kmaciel007: As you will see from my "userbar", I am very pleased to be a SolydX (XFCE) user. :-)

SolydX does everything I want and is fast and efficient, even on relatively low-spec hardware. OTOH, if you are really hooked on KDE bling then SolydK is the way to go - but it will, inevitably, be more sluggish on low-spec systems.

kurotsugi
Posts: 2214
Joined: 09 Jan 2014 00:17

Re: Able to start SolydK only through recovery mode

Postby kurotsugi » 15 Oct 2016 20:19

with the current hardware spec, swap will do nothing other than slowing down the system. we have zramswap and other new technologies to replace conventional swap. in these days conventional swap only exist for one reason, hibernation.

User avatar
Zill
Posts: 1850
Joined: 13 Aug 2013 14:28
Location: Lincolnshire, UK

Re: Able to start SolydK only through recovery mode

Postby Zill » 15 Oct 2016 21:59

kurotsugi wrote:... in these days conventional swap only exist for one reason, hibernation.
Err... conventional swap is still used on my desktop system - no hibernation involved!

Code: Select all

roger@dino:~$ free -h
             total       used       free     shared    buffers     cached
Mem:          2.0G       1.8G       205M       113M        60M       851M
-/+ buffers/cache:       896M       1.1G
Swap:         3.9G       116M       3.8G

kurotsugi
Posts: 2214
Joined: 09 Jan 2014 00:17

Re: Able to start SolydK only through recovery mode

Postby kurotsugi » 15 Oct 2016 22:34

https://ubuntuforums.org/showthread.php ... dc7a8ffa01
http://www.makeuseof.com/tag/ubuntu-run ... -linux-pc/
http://askubuntu.com/questions/411958/s ... nning-slow

perhaps you didn't realize that if you're not using hibernate, swap is doing nothing than slowing down your system (and in some cases, slowly kills your HDD). "some people still use X" never means that "X is good". the memory management side of swap is already replaced by new technologies like zramswap. if you're not using hibernation you should use zramswap instead.

User avatar
ilu
Posts: 2424
Joined: 09 Oct 2013 12:45

Re: Able to start SolydK only through recovery mode

Postby ilu » 16 Oct 2016 05:15

I'd recommend to take SolydX. I'm using it :-) But seriously, it uses way less ressources than KDE.

20 GB for SolydX root is enough as zill said. Keeping your data on a separate partition is certainly a good idea - zill suggested a separate /home for this, but there are other - imho better - solutions as well that require a bit more tinkering - see here https://forums.solydxk.com/viewtopic.ph ... c0b#p61806.

Regarding the swap issue: I would do whatever the SolydXK installer recommends upon installation.

If you want to check yourself whether zill or kurotsugi is right, do the installation with swap and test it. If you want to test without swap, open /etc/fstab in mousepad as root and look for the line containing the word "swap". Put a # at the beginning of that line, save and reboot. Now you are running without swap. Removing the # and rebooting will bring back swap.

User avatar
Zill
Posts: 1850
Joined: 13 Aug 2013 14:28
Location: Lincolnshire, UK

Re: Able to start SolydK only through recovery mode

Postby Zill » 16 Oct 2016 09:32

ilu wrote:... Regarding the swap issue: I would do whatever the SolydXK installer recommends upon installation.
Good advice! With all new installations, I generally stick to the defaults unless I have a very good reason to do otherwise.

My thanks go to kurotsugi for the advice on the swap alternatives and I will research further on this. As an old-timer, I tend to keep with what I know works well and so I only change things when they become part of the distro defaults. I am a great believer in "if it ain't broke, don't fix it"! ;-)

User avatar
Zill
Posts: 1850
Joined: 13 Aug 2013 14:28
Location: Lincolnshire, UK

Re: Able to start SolydK only through recovery mode

Postby Zill » 16 Oct 2016 13:48

kurotsugi: The first two links you posted seem to be about "normal" swap and tweaking swappiness. The third link seemed to show a user's confusion in thinking that swap was taking RAM!

My understanding is that swap is only used, when necessary, to "top-up" memory when the RAM runs out of free space. As such, it doesn't normally slow down a system unless it is running memory-hungry applications.

I have been unable to find any "how to" about using zramswap instead of swap on Debian Jessie systems. If you could point me to a link this would be much appreciated. Has zramswap now replaced swap in the default stable release?

p.s. My apologies to the OP for going slightly off-topic but I think this discussion is still relevant to us all.

kurotsugi
Posts: 2214
Joined: 09 Jan 2014 00:17

Re: Able to start SolydK only through recovery mode

Postby kurotsugi » 16 Oct 2016 22:08

that's not necessarily true. there's a kernel parameter called swappiness which define how often swap will be used. it still used even when you still have some space on ram. the default value is 60. you can check my statement by running 'free -m' command.

swap is slowing down things so the basic idea was to reduce swap usage, hence almost all tweaks about how to make linux faster will tell you to reduce swappiness (so that swap usage will reduced or not used at all). the recommended value is 10 to reduce swap usage, or 0 to not use swap at all.

as for the zramswap, the feature have been included in linux for quite a time but people rarely use it because it's not as popular as swap. I'm using a self-made zram script to activate and manage zram. I'm mobile but I'll give you the script later when I'm on my laptop.

kurotsugi
Posts: 2214
Joined: 09 Jan 2014 00:17

Re: Able to start SolydK only through recovery mode

Postby kurotsugi » 17 Oct 2016 06:53

as promised, here's my script.

Code: Select all

#!/bin/bash
### BEGIN INIT INFO
# Provides: zram
# Required-Start: $local_fs
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Increased Performance In Linux With zRam (Virtual Swap Compressed in RAM)
# Description: Adapted from systemd scripts at https://github.com/mystilleef/FedoraZram
# Included as part of antix-goodies package by anticapitalista <antiX@operamail.com>
# This script was written by tradetaxfree and is found at http://crunchbanglinux.org/forums/topic/15344/zram-a-good-idea/
# Extraneous commented (disabled) commands removed by djohnston at http://linuxvillage.net/
# Copy this script (as root) from /usr/local/bin to /etc/init.d and then #update-rc.d zram defaults
# After booting verify the module is loaded with: lsmod | grep zram
### END INIT INFO

start() {
    # get the number of CPUs
    num_cpus=$(grep -c processor /proc/cpuinfo)
    # if something goes wrong, assume we have 1
    [ "$num_cpus" != 0 ] || num_cpus=1

    # set decremented number of CPUs
    last_cpu=$((num_cpus - 1))
    
       #default Factor % = 90 change this value here or create /etc/default/zram[/b][/color]
       FACTOR=75
       #& put the above single line in /etc/default/zram with the value you want
	[ -f /etc/default/zram ] && source /etc/default/zram || true
	factor=$FACTOR # percentage

    # get the amount of memory in the machine
     memtotal=$(grep MemTotal /proc/meminfo | sed 's/[^0-9]\+//g')
     mem_by_cpu=$(($memtotal/$num_cpus*$factor/100*1024))

    # load dependency modules
    modprobe zram num_devices=$num_cpus
    
    if [ $? -gt 0 ]; then
      echo -e "Your Kernel needs to be compiled with ZRAM support:" \
      "\n\nDevice Drivers --> Staging Drivers --> Compressed RAM block device support (M)" \
      "\nDevice Drivers --> Staging Drivers --> Dynamic compression of swap pages and clean pagecache pages (*)" \
      "\n\nThe Liquorix Kernel (http://liquorix.net) has ZRAM support built in."
      exit 1
    fi
    echo "zram devices probed successfully"
    
    # initialize the devices
    for i in $(seq 0 $last_cpu); do
    echo $mem_by_cpu > /sys/block/zram$i/disksize
    # Creating swap filesystems
    mkswap /dev/zram$i
    # Switch the swaps on
    swapon -p 100 /dev/zram$i
    done
}

stop() {
    # get the number of CPUs
    num_cpus=$(grep -c processor /proc/cpuinfo)

    # set decremented number of CPUs
    last_cpu=$((num_cpus - 1))

    # Switching off swap
    for i in $(seq 0 $last_cpu); do
    if [ "$(grep /dev/zram$i /proc/swaps)" != "" ]; then
    swapoff /dev/zram$i
    sleep 1
    fi
    done

    sleep 1
    rmmod zram
}

case "$1" in
    start)
        start
        ;;
    stop)
        stop
        ;;
    restart)
        stop
        sleep 3
        start
        ;;
    *)
        echo "Usage: $0 {start|stop|restart}"
        RETVAL=1
esac
exit $RETVAL
debian also has it's own zram script as described here https://wiki.debian.org/ZRam. everything is done automatically so you only need to put the script on init.d and register it using insserv command. there's also a tutorial using systemd here http://www.techrapid.co.uk/linux/arch-l ... rch-linux/

User avatar
Zill
Posts: 1850
Joined: 13 Aug 2013 14:28
Location: Lincolnshire, UK

Re: Able to start SolydK only through recovery mode

Postby Zill » 17 Oct 2016 10:13

kurotsugi: Many thanks for posting this info and I am sure it will be of use to those wishing to fine-tune their systems for the fastest possible speed.

As a grumpy old-git who potters about in a 2005 Nissan Almera, I don't really have a "need for speed"! Shaving a few milliseconds memory access time will not make that much of a difference to my life. :roll:

I also like to keep my systems as "stock" as possible, so fiddling with swappiness and zram to "fix" something that has worked well for me for fifteen years does not seem to be a great idea for me.

However, I am sure there are more adventurous users who will do this and I wish them well. 8-)


Return to “Newbie Questions”

Who is online

Users browsing this forum: No registered users and 7 guests