Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    [Announce][Fremantle] FlopSwap - Swap GUI Management

    Reply
    Page 28 of 36 | Prev | 18   26     27   28   29     30   | Next | Last
    misiak | # 271 | 2014-10-20, 19:01 | Report

    Originally Posted by malfunctioning View Post
    Everything makes sense and is clear, except the objection misiak proposed (I actually thought about this before I even saw his response ).

    It seems (at first sight, anyway) that the percentage of fresh swap remaining should be <= the total amount of swap space remaining reported by free.
    I agree. My inequality was meant for already used swap, not remaining free swap I agree with you, because in the most optimistic scenario all free remaining swap is "fresh" (therefore flopswap fresh swap = free swap reported by free cmd), but if some of this swap is not fresh, then the amount reported by free cmd will be bigger then the amount of "fresh" swap (and it should never be possible to be lower I think).

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to misiak For This Useful Post:
    malfunctioning

     
    sixwheeledbeast | # 272 | 2014-10-21, 14:37 | Report

    Originally Posted by malfunctioning View Post
    Everything makes sense and is clear, except the objection misiak proposed (I actually thought about this before I even saw his response ).

    It seems (at first sight, anyway) that the percentage of fresh swap remaining should be <= the total amount of swap space remaining reported by free.

    But I'm sure I'm wrong and you will clarify things.

    EDIT: One way I see this being possible is if the way FlopSwap works is by partitioning the swap space. So you might keep internally a cursor where you start writing sequentially (which is set for example when you make a fresh swap), but which is different of how free swap space is calculated by the free command.

    Just speculating.
    Well do bear in mind that free is in Kb whereas flopswap outputs Mb.

    To better understand what happens I'll explain.
    Flopswap gets it's values from /proc/diskstats/, these values are in blocks which are calculated from blocks into Mb, eventually.
    Originally Posted by peterleinchen View Post
    Each block is 512 bytes.
    You have to divide by 2 to get kB.
    And then of course by 2048 to get MB.
    So yes Flopswap has "a cursor", it stores a block value and calculates your fragmentation from this. When you then refresh this new block value is stored again.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to sixwheeledbeast For This Useful Post:
    malfunctioning

     
    malfunctioning | # 273 | 2014-10-21, 18:47 | Report

    Thanks for attempting to explain this. I have begun looking at your sources to see if I can really understand.

    Because, intuitively, there is some confusion.

    If you boot the N900, both free and flopswap should report 0% usage. As swap fills up, both would report the same % of swap memory used. I think when things start diverging is when the OS decides to swap off some application's data. Then, free will report an increased % of free swap (the additional swapped off memory, which will likely be fragmented), whereas flopswap will continue reporting the same percentage, which is solely based on the blocks used since the system booted up. Therefore, at this point, flopswap should report less remaining swap than free.

    I'm sure I got this wrong somehow, so take it with a huge mountain of salt.

    I'll just go through the source carefully.

    One question: Can block size in swap be different than 512 Bytes? As when making the swap partitions with gparted and not running mkswap, for example. If so, this might need to be looked into.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    malfunctioning | # 274 | 2014-10-21, 19:58 | Report

    In my N900, this is not working definitely (FlopSwap 0.1.9).

    I swapped to device. At this point, free displayed 0 bytes of swap used (I think this is a product of the problem going on). Then, I ran mkswap on both microSD card partitions to be safe. Did a fresh swap. Opened 12 applications. Checked free, which showed around 63 Mb of swap used.

    At this point, FlopSwap's Show Current shows the first microSD partition as active, which is expected. However, Check Status shows 0 Mb of swap used. (This is I think what causes free to display 0 Mb of swap used after Swapping for Device, I think).

    The thing is that I know swap memory is working based on performance tests, so I trust free's output.

    Some background: My whole system (eMMC and microSD card) was partitioned and formated using GParted. Linux Swap on eMMC is /dev/mmcblk0p3. The swap partitions in the microSD card are /dev/mmcblk1p2 and /dev/mmcblk1p3

    Let me know if any obvious ideas come to mind. Otherwise I'll go through the source and test when I have some extra time.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    sixwheeledbeast | # 275 | 2014-10-21, 20:00 | Report

    Flopswap 0.2.0 uploaded to extras-devel

    * New central statusbar
    * Bugfix - check status not drawn correctly

    New version number and pictures in the OP due to the new statusbar design.

    Please note the statusbar is only refreshed when you press the check status button.

    Originally Posted by malfunctioning View Post
    I'll just go through the source carefully.
    Feel free to look through the sources.
    This started from a few community created scripts to the GUI it is today. Most of the scripts have only had small additions and fixes from the early versions.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 3 Users Say Thank You to sixwheeledbeast For This Useful Post:
    Fatalist, klinglerware, malfunctioning

     
    sixwheeledbeast | # 276 | 2014-10-21, 20:47 | Report

    You also have to bear in mind that flopswap is counting sequentially whereas free will move up and down as swappiness values will swap things in and out of swap.

    Therefore I would expect flopswap to have a lower value than free at the start of a fresh swap and a higher value than free near fragmentation.

    I am sure I am not explaining this as verbosely as possible ...

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to sixwheeledbeast For This Useful Post:
    malfunctioning, misiak

     
    ste-phan | # 277 | 2014-10-22, 07:46 | Report

    Just got a new 64GB in and learned about his program only this week.

    With GParted I have formatted first P1 (Ext4) and P2 and P3 linux swap of each +/- 800 MB, at the end of the disc.

    FlopSwap reports only /dev/mmcblk0p3 (built in memory swap partition)

    No other swap space available.


    thanks sixwheeledbeast for the useful program. BTW it has a great name (imagine MeeSwap or MeeFlop in 2014)

    Edit | Forward | Quote | Quick Reply | Thanks

     
    sixwheeledbeast | # 278 | 2014-10-22, 11:07 | Report

    Originally Posted by ste-phan View Post
    Just got a new 64GB in and learned about his program only this week.

    With GParted I have formatted first P1 (Ext4) and P2 and P3 linux swap of each +/- 800 MB, at the end of the disc.

    FlopSwap reports only /dev/mmcblk0p3 (built in memory swap partition)

    No other swap space available.
    You sound like you have setup the swap partitions correctly.

    Flopswap controls which partitions are active it will never try to strip them. So you will start on your device swap if you are using version <=0.1.9, later versions I have made flopswap enable the "Use External Swap on boot" option in the menu as a default.

    If you are still having trouble can you pastebin or post the output of

    Code:
    blkid | grep swap     ##(needs root)
    dpkg-query -W -f='${Version}\n' upstart
    dpkg-query -W -f='${Version}\n' flopswap
    cat /etc/default/mount-opts-overwrite
    cat /etc/default/mount-opts
    cat /etc/fstab

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to sixwheeledbeast For This Useful Post:
    ste-phan

     
    ste-phan | # 279 | 2014-10-22, 11:39 | Report

    Originally Posted by sixwheeledbeast View Post
    You sound like you have setup the swap partitions correctly.

    Flopswap controls which partitions are active it will never try to strip them. So you will start on your device swap if you are using version <=0.1.9, later versions I have made flopswap enable the "Use External Swap on boot" option in the menu as a default.

    If you are still having trouble can you pastebin or post the output of

    Code:
    blkid | grep swap     ##(needs root)
    dpkg-query -W -f='${Version}\n' upstart
    dpkg-query -W -f='${Version}\n' flopswap
    cat /etc/default/mount-opts-overwrite
    cat /etc/default/mount-opts
    cat /etc/fstab

    Thank you for your suggestion! It seemed my card (Sandisk) was corrupt

    First I rechecked with GParted and noticed two exclamation marks near the swap partitions on the Swap partition.
    Reformatted and it worked: flopswap detected the swap partitions.

    Then I decided to torture test swap and started by opening aplication manager: spontaneous reboot -> no more applications listed in application manager

    The device started to behave erratically and reboot and again-> next reboot I rushed to FlopSwap to move swap back to device!

    This was an annoying as I had the option "use external swap on boot" checked and forgotten through previous attempts, so the device kept booting using an easily corruptible swap.

    I am going to try with another card and post perceived performance.



    Here is the result of the above code sequence, for anyone interested (of course now with swap on device):


    Code:
    BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso31+0cssu0) built-in shell (ash)
    Enter 'help' for a list of built-in commands.
    
    /home/user # blkid | grep swap     ##(needs root)
    /dev/mmcblk1p2: UUID="46b9ea3f-0398-4d32-abbc-76d0fa108e2b" TYPE="swap" 
    /dev/mmcblk1p3: UUID="18488e77-b6a0-41cb-94de-6f6c2ee80826" TYPE="swap" 
    /dev/mmcblk0p3: TYPE="swap" 
    /home/user # dpkg-query -W -f='${Version}\n' upstart
    0.3.8-68+0cssu7
    /home/user # dpkg-query -W -f='${Version}\n' flopswap
    0.2.0
    /home/user # cat /etc/default/mount-opts-overwrite
    swap_sd="0"
    /home/user # cat /etc/default/mount-opts
    # !!! Do not edit this file. It can be overwritten in next update !!!
    # !!! Instead create and edit file /etc/default/mount-opts-overwrite !!!
    
    # Options for mounting all filesystems
    common_opts="noatime,nodiratime"
    
    # Options for mounting root's filesystems (/, /home)
    root_opts="errors=continue,commit=1,data=writeback"
    
    # Options for mounting user's filesystems (MyDocs, SD cards, ...)
    user_opts="noauto,nodev,exec,nosuid"
    
    # Options for swap partitions
    swap_opts=""
    
    # Options for different filesystems
    vfat_opts="utf8,uid=29999,shortname=mixed,dmask=000,fmask=0000,rodir"
    ntfs_opts="nls=utf8,uid=29999,umask=0000"
    
    # Renerate fstab at boot time in /etc/event.d/rcS-late
    genfstab="1"
    
    # When generating fstab add also swap partitions from SD card (if exists)
    swap_sd="0"
    
    # Call fsck -p for /home at boot time in /etc/event.d/rcS-late
    home_fsck="1"
    
    # Call fsck -p for user's partitions (MyDocs, SD cards, ...)
    user_fsck="1"
    
    # Include overwrite file
    if [ -f /etc/default/mount-opts-overwrite ]; then
    	. /etc/default/mount-opts-overwrite
    fi
    /home/user # cat /etc/fstab
    # This file was generated by script /etc/event.d/rcS-late
    # !!! Do not edit this file. It will be overwritten in next device startup !!!
    # If you want static /etc/fstab add genfstab="0" to file /etc/default/mount-opts-overwrite
    rootfs / rootfs rw 0 0
    ubi0:rootfs / ubifs rw,bulk_read,no_chk_data_crc 0 0
    /dev/mmcblk0p2 /home ext3 noatime,nodiratime,errors=continue,commit=1,data=writeback 0 2
    /home/opt /opt none bind 0 0
    /dev/mmcblk0p1 /home/user/MyDocs vfat noatime,nodiratime,noauto,nodev,exec,nosuid,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0000,rodir 0 2
    /dev/mmcblk1p2 none swap sw 0 0
    /dev/mmcblk1p3 none swap sw 0 0
    /dev/mmcblk0p3 none swap sw 0 0
    /home/user #
    Edit: so I pushed the system a little bit and experience reasonable responsability, virtually unstuttering audio stream, workable front view and modrana.

    Kept SD Swap partiiton 1 active.
    Untill FlowSwap info said Fresh Swap Recommended
    Used 1497 MB , 196% of 763MB
    Conky reported about 300- 400 MB Swap used

    Swapping partitions took a while!

    -Conky
    -five MicroB windows
    -file manager
    -internet radio over bluetooth
    -Orechiette
    -Xournal
    -Frontview (still able to scan and size an image)
    -Modrana
    -WifiEye
    -Sketch
    -Cutetube
    -Image Gallery
    -Phone

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by ste-phan; 2014-10-22 at 16:31.
    The Following 2 Users Say Thank You to ste-phan For This Useful Post:
    malfunctioning, misiak

     
    peterleinchen | # 280 | 2014-10-22, 15:20 | Report

    You should extend your swap partitions to at least (my use case) double size, so 1,5GB each. If I would have a 64 card I would use 2x 3GB!
    This lessens the number of swap refresh actions (or extends time between those) where each refresh is doing read/write task on SD nd is CPU consuming,...

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by peterleinchen; 2014-10-22 at 15:23.
    The Following 2 Users Say Thank You to peterleinchen For This Useful Post:
    marmistrz, misiak

     
    Page 28 of 36 | Prev | 18   26     27   28   29     30   | Next | Last
vBulletin® Version 3.8.8
Normal Logout