Skip to content

zram - Was das??

ROCKPro64
  • Wenn man auf einer minimal Bionic Installation ein

    fdisk -l
    

    macht, bekommt man folgende Ausgabe.

    Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    
    
    Disk /dev/mmcblk0: 14.7 GiB, 15811477504 bytes, 30881792 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: gpt
    Disk identifier: E55EA076-C740-42B9-A619-20BF1A4DE0E1
    
    Device          Start      End  Sectors  Size Type
    /dev/mmcblk0p1     64     8063     8000  3.9M Linux filesystem
    /dev/mmcblk0p2   8064     8191      128   64K Linux filesystem
    /dev/mmcblk0p3   8192    16383     8192    4M Linux filesystem
    /dev/mmcblk0p4  16384    24575     8192    4M Linux filesystem
    /dev/mmcblk0p5  24576    32767     8192    4M Linux filesystem
    /dev/mmcblk0p6  32768   262143   229376  112M Microsoft basic data
    /dev/mmcblk0p7 262144 30881758 30619615 14.6G Linux filesystem
    
    
    Disk /dev/zram0: 323 MiB, 338702336 bytes, 82691 sectors
    Units: sectors of 1 * 4096 = 4096 bytes
    Sector size (logical/physical): 4096 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    
    
    Disk /dev/zram1: 323 MiB, 338702336 bytes, 82691 sectors
    Units: sectors of 1 * 4096 = 4096 bytes
    Sector size (logical/physical): 4096 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    
    
    Disk /dev/zram2: 323 MiB, 338702336 bytes, 82691 sectors
    Units: sectors of 1 * 4096 = 4096 bytes
    Sector size (logical/physical): 4096 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    
    
    Disk /dev/zram3: 323 MiB, 338702336 bytes, 82691 sectors
    Units: sectors of 1 * 4096 = 4096 bytes
    Sector size (logical/physical): 4096 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    
    
    Disk /dev/zram4: 323 MiB, 338702336 bytes, 82691 sectors
    Units: sectors of 1 * 4096 = 4096 bytes
    Sector size (logical/physical): 4096 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    
    
    Disk /dev/zram5: 323 MiB, 338702336 bytes, 82691 sectors
    Units: sectors of 1 * 4096 = 4096 bytes
    Sector size (logical/physical): 4096 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    

    Da stoße ich mal wieder auf was, was ich nicht kenne. zram Ok, schauen wir mal was das ist und was das macht.

    Gerade auf Systemen mit wenig Arbeitsspeicher kommt es hin und wieder vor, dass dieser knapp wird und das System beginnt, den Swap-Speicher zu nutzen. Da sich dieser auf der Festplatte befindet, ist er im Vergleich zum RAM relativ langsam.

    Gut, damit hätten wir das hier geklärt.

    swapon -s 
    

    gibt folgendes aus

    Filename				Type		Size	Used	Priority
    /dev/zram0                             	partition	330760	0	5
    /dev/zram1                             	partition	330760	0	5
    /dev/zram2                             	partition	330760	0	5
    /dev/zram3                             	partition	330760	0	5
    /dev/zram4                             	partition	330760	0	5
    /dev/zram5                             	partition	330760	0	5
    

    Ein

    free
    

    gibt folgendes aus

                  total        used        free      shared  buff/cache   available
    Mem:        3969156       75080     3779900        8512      114176     3855688
    Swap:       1984560           0     1984560
    

    Wenn man die 330760 mit 6 multipliziert, kommt man auf 1984560.

    So wie ich das verstehe, legt diese Installation 1,98 GB RAM als SWAP-Partition im schnelleren RAM ab. Macht ja auch Sinn, bei den lahmen SD-Karten. Anmerkung: Ich habe den ROCKPro64 mit 4 GB RAM.

  • Wenn man auf einer minimal Bionic Installation ein

    fdisk -l
    

    macht, bekommt man folgende Ausgabe.

    Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    
    
    Disk /dev/mmcblk0: 14.7 GiB, 15811477504 bytes, 30881792 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: gpt
    Disk identifier: E55EA076-C740-42B9-A619-20BF1A4DE0E1
    
    Device          Start      End  Sectors  Size Type
    /dev/mmcblk0p1     64     8063     8000  3.9M Linux filesystem
    /dev/mmcblk0p2   8064     8191      128   64K Linux filesystem
    /dev/mmcblk0p3   8192    16383     8192    4M Linux filesystem
    /dev/mmcblk0p4  16384    24575     8192    4M Linux filesystem
    /dev/mmcblk0p5  24576    32767     8192    4M Linux filesystem
    /dev/mmcblk0p6  32768   262143   229376  112M Microsoft basic data
    /dev/mmcblk0p7 262144 30881758 30619615 14.6G Linux filesystem
    
    
    Disk /dev/zram0: 323 MiB, 338702336 bytes, 82691 sectors
    Units: sectors of 1 * 4096 = 4096 bytes
    Sector size (logical/physical): 4096 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    
    
    Disk /dev/zram1: 323 MiB, 338702336 bytes, 82691 sectors
    Units: sectors of 1 * 4096 = 4096 bytes
    Sector size (logical/physical): 4096 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    
    
    Disk /dev/zram2: 323 MiB, 338702336 bytes, 82691 sectors
    Units: sectors of 1 * 4096 = 4096 bytes
    Sector size (logical/physical): 4096 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    
    
    Disk /dev/zram3: 323 MiB, 338702336 bytes, 82691 sectors
    Units: sectors of 1 * 4096 = 4096 bytes
    Sector size (logical/physical): 4096 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    
    
    Disk /dev/zram4: 323 MiB, 338702336 bytes, 82691 sectors
    Units: sectors of 1 * 4096 = 4096 bytes
    Sector size (logical/physical): 4096 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    
    
    Disk /dev/zram5: 323 MiB, 338702336 bytes, 82691 sectors
    Units: sectors of 1 * 4096 = 4096 bytes
    Sector size (logical/physical): 4096 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    

    Da stoße ich mal wieder auf was, was ich nicht kenne. zram Ok, schauen wir mal was das ist und was das macht.

    Gerade auf Systemen mit wenig Arbeitsspeicher kommt es hin und wieder vor, dass dieser knapp wird und das System beginnt, den Swap-Speicher zu nutzen. Da sich dieser auf der Festplatte befindet, ist er im Vergleich zum RAM relativ langsam.

    Gut, damit hätten wir das hier geklärt.

    swapon -s 
    

    gibt folgendes aus

    Filename				Type		Size	Used	Priority
    /dev/zram0                             	partition	330760	0	5
    /dev/zram1                             	partition	330760	0	5
    /dev/zram2                             	partition	330760	0	5
    /dev/zram3                             	partition	330760	0	5
    /dev/zram4                             	partition	330760	0	5
    /dev/zram5                             	partition	330760	0	5
    

    Ein

    free
    

    gibt folgendes aus

                  total        used        free      shared  buff/cache   available
    Mem:        3969156       75080     3779900        8512      114176     3855688
    Swap:       1984560           0     1984560
    

    Wenn man die 330760 mit 6 multipliziert, kommt man auf 1984560.

    So wie ich das verstehe, legt diese Installation 1,98 GB RAM als SWAP-Partition im schnelleren RAM ab. Macht ja auch Sinn, bei den lahmen SD-Karten. Anmerkung: Ich habe den ROCKPro64 mit 4 GB RAM.

    @frankm Ubuntu legt seit Version 13.04 (oder so) per default zram als Swap an (bzw. muß man nur das zram-control Package installieren). Größe ist die Hälfte des verfügbaren RAMs und außerdem werden pro CPU-Core ein zram Block-Device angelegt (braucht's mit halbwegs modernen Kerneln nicht).

    Ich versuch, das schon seit geraumer Zeit in Armbian zu verbessern (zram momentan nur in den Ubuntu-Varianten aktiv) aber das geht alles recht zäh. Ein paar Hintergrundinfos (und Info, wie man das noch optimieren kann) wie so oft bei CNX-Soft: https://www.cnx-software.com/2018/05/14/running-out-of-ram-in-ubuntu-enable-zram/ (in den Kommentaren auch gucken).

  • @tkaiser ; Ich hab dich vermisst 😂

    Danke für die Info, ich bin vor dem ROCKPro64 da noch nie so richtig drüber gestolpert. Aber wenn ich dann was finde, schau auch immer wofür es denn bitte ist.

    Danke für Deine Hinweise.

  • ROCKPro64 - USB-C -> LAN

    ROCKPro64
    1
    0 Stimmen
    1 Beiträge
    305 Aufrufe
    Niemand hat geantwortet
  • ROCKPro64 (2GB) - Probleme mit der PCIe SATA-Karte??

    ROCKPro64
    1
    3
    0 Stimmen
    1 Beiträge
    494 Aufrufe
    Niemand hat geantwortet
  • Neue Artikel im Pine64 Shop (August 2018)

    Hardware
    2
    0 Stimmen
    2 Beiträge
    763 Aufrufe
    FrankMF
    Neue Artikel im Pine64 Shop ABS Gehäuse https://www.pine64.org/?product=rockpro64-abs-enclosure Gehäuse für einen ROCKPro64 und einen LCD-Bildschirm https://www.pine64.org/?product=rockpro64-playbox-enclosure
  • Unterstützung Lüfter

    ROCKPro64
    5
    0 Stimmen
    5 Beiträge
    2k Aufrufe
    FrankMF
    Mit dem neuen Release hatte jemand das mal ausprobiert -> https://forum.frank-mankel.org/topic/795/fan-control-omv-auyfan-0-10-12-gitlab-ci-linux-build-184-kernel-5-6/6 Dieser Kernel kam zur Anwendung Linux rockpro64 5.6.0-1137-ayufan-ge57f05e7bf8f #ayufan SMP Wed Apr 15 10:16:02 UTC 2020 aarch64 GNU/Linux Dort stellt man dann fest, das sich eine Kleinigkeit geändert hat. Der Pfad und der Dateiname hat sich geändert. Kontrollieren kann man das mit nano /sys/devices/platform/pwm-fan/hwmon/hwmon3/pwm1 Der Wert geht von 0 - 255, wie gehabt.
  • OMV Images

    ROCKPro64
    3
    0 Stimmen
    3 Beiträge
    916 Aufrufe
    FrankMF
    Kurzes Update https://github.com/ayufan-rock64/linux-build/releases/download/0.8.0rc10/stretch-openmediavault-rockpro64-0.8.0rc10-1125-armhf.img.xz Startet Incl. WiFi & PCIe NVMe SSD War aber nur ein ganz kurzer Test!!
  • ROCKPro64 - Wo stehen wir?

    ROCKPro64
    1
    0 Stimmen
    1 Beiträge
    630 Aufrufe
    Niemand hat geantwortet
  • ROCKPro64 - Der Bootvorgang

    Verschoben Hardware
    3
    0 Stimmen
    3 Beiträge
    2k Aufrufe
    FrankMF
    Um einen neuen Kernel booten zu können, brauche ich diese 4 Dateien unter /boot config-4.19.0-rc4-1065-ayufan-g72e04c7b3e06 initrd.img-4.19.0-rc4-1065-ayufan-g72e04c7b3e06 System.map-4.19.0-rc4-1065-ayufan-g72e04c7b3e06 vmlinuz-4.19.0-rc4-1065-ayufan-g72e04c7b3e06 Und den Ordner /boot/dtbs/4.19.0-rc4-1065-ayufan-g72e04c7b3e06 mit folgendem Inhalt rock64@rockpro64v2_0:/boot/dtbs/4.19.0-rc4-1065-ayufan-g72e04c7b3e06$ ls -la total 104 drwxr-xr-x 26 root root 4096 Sep 30 09:54 . drwxr-xr-x 6 root root 4096 Sep 30 09:55 .. drwxr-xr-x 2 root root 4096 Sep 30 09:54 al drwxr-xr-x 2 root root 4096 Sep 30 09:54 allwinner drwxr-xr-x 2 root root 4096 Sep 30 09:54 altera drwxr-xr-x 2 root root 4096 Sep 30 09:54 amd drwxr-xr-x 2 root root 4096 Sep 30 09:54 amlogic drwxr-xr-x 2 root root 4096 Sep 30 09:54 apm drwxr-xr-x 2 root root 4096 Sep 30 09:54 arm drwxr-xr-x 4 root root 4096 Sep 30 09:54 broadcom drwxr-xr-x 2 root root 4096 Sep 30 09:54 cavium drwxr-xr-x 2 root root 4096 Sep 30 09:54 exynos drwxr-xr-x 2 root root 4096 Sep 30 09:54 freescale drwxr-xr-x 2 root root 4096 Sep 30 09:54 hisilicon drwxr-xr-x 2 root root 4096 Sep 30 09:54 lg drwxr-xr-x 2 root root 4096 Sep 30 09:54 marvell drwxr-xr-x 2 root root 4096 Sep 30 09:54 mediatek drwxr-xr-x 2 root root 4096 Sep 30 09:54 nvidia drwxr-xr-x 2 root root 4096 Sep 30 09:54 qcom drwxr-xr-x 2 root root 4096 Sep 30 09:54 renesas drwxr-xr-x 2 root root 4096 Sep 30 09:54 rockchip drwxr-xr-x 2 root root 4096 Sep 30 09:54 socionext drwxr-xr-x 2 root root 4096 Sep 30 09:54 sprd drwxr-xr-x 2 root root 4096 Sep 30 09:54 synaptics drwxr-xr-x 2 root root 4096 Sep 30 09:54 xilinx drwxr-xr-x 2 root root 4096 Sep 30 09:54 zte Unter /boot/extlinux liegt dann die Datei extlinux.conf Die sieht bei mir dann so aus timeout 10 menu title select kernel label kernel-4.19.0-rc4-1065-ayufan-g72e04c7b3e06 kernel /boot/vmlinuz-4.19.0-rc4-1065-ayufan-g72e04c7b3e06 initrd /boot/initrd.img-4.19.0-rc4-1065-ayufan-g72e04c7b3e06 devicetreedir /boot/dtbs/4.19.0-rc4-1065-ayufan-g72e04c7b3e06 append rw panic=10 init=/sbin/init coherent_pool=1M ethaddr=${ethaddr} eth1addr=${eth1addr} serial=${serial#} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1 root=LABEL=TEST rootwait rootfstype=ext4 label kernel-4.19.0-rc4-1065-ayufan-g72e04c7b3e06-memtest kernel /boot/vmlinuz-4.19.0-rc4-1065-ayufan-g72e04c7b3e06 initrd /boot/initrd.img-4.19.0-rc4-1065-ayufan-g72e04c7b3e06 devicetreedir /boot/dtbs/4.19.0-rc4-1065-ayufan-g72e04c7b3e06 append rw panic=10 init=/sbin/init coherent_pool=1M ethaddr=${ethaddr} eth1addr=${eth1addr} serial=${serial#} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1 root=LABEL=TEST rootwait rootfstype=ext4 memtest Darunter kommen dann evt. die alten Kernel die installiert waren, das habe ich hier im Beispiel weg gelassen.
  • ROCKPro64 wieder vorbestellbar

    ROCKPro64
    5
    0 Stimmen
    5 Beiträge
    1k Aufrufe
    FrankMF
    Meine Lieferung ist unterwegs Hello Mr. Frank Mankel, Order 62068 just shipped on July 18, 2018 from Shenzhen transit to Hong Kong DHL.