Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: zram, anyone have an opinion on this?

  1. #11
    Senior Member registered user
    Join Date
    May 2006
    Location
    Columbia, Maryland USA
    Posts
    1,631
    @ Blacksimon

    I can confirm your experience -so far- with Knoppix 6.7.1 & CeBIT 7.
    And I'm flabbergasted.

    However, I can't seem to get any combination of my apps to create any 'used' swap values.
    I'm using your commands but asking for 3.1 Gb swap, having 3.6 Gb total and apps amounting to 1+ Gb.
    Perhaps there's yet one more magic word necessary to enable the magic.

    Also, in my case, I have 2 cpus, and probably should enable 2 swap files.
    Let me know how you make out.

    ________________
    Werner: we'd not be disturbed if you moved this thread out of this category.

  2. #12
    Senior Member registered user
    Join Date
    May 2006
    Location
    Columbia, Maryland USA
    Posts
    1,631

    Addendum to my post #11

    .
    @ Blacksimon

    Although I am surprised at how much infrastructure you have uncovered that is applicable to zram,
    this may be more due to my absence of experience with any form of swap.

    In this instance, I think we are at least missing a driver called zram, and/or perhaps a clue like zram.ko
    indicating some source material.
    Also, I can't see any evidence on /etc/fstab that speaks to swapping of any kind.

    I expect we may have to wait for 7.0.1 for the rest of the material to appear.
    I'd be pleased to have you show otherwise.

  3. #13
    Member Blacksimon's Avatar
    Join Date
    Oct 2011
    Location
    Italy
    Posts
    93

    Exclamation

    Hello Utu,
    thanks for your words but my experience comes from the fact that I like to understand how to improve system performance by using hardware and software available without having to invest any more money...
    I like to fully understand how things work...

    Anyway in your case if you have multiple cores (2 cpus), then using a single zram can be a bottleneck, so you need zram0 e zram1 (it's present in your /dev/ ??)
    Code:
    modprobe zram  num_devices=2   #On July 20th 2011, the zram driver in the linux 3.1 staging area was modified to use zram_num_devices as modprobe parameter
    echo $((512*1024*1204)) > /sys/block/zram0/disksize   #Allocate 512MB to zram0
    echo $((512*1024*1204)) > /sys/block/zram1/disksize   #Allocate 512MB to zram1
    mkswap /dev/zram0
    mkswap /dev/zram1
    swapon -p 100 /dev/zram0
    swapon -p 100 /dev/zram1
    But beware, I have not tested anything right now, I just created a swap in ram. Now we need to see if it actually works. It 's likely to miss the module zram.ko as you have highlighted. I'm waiting 7.0.1 too.

    Regards.

  4. #14
    Senior Member registered user
    Join Date
    May 2006
    Location
    Columbia, Maryland USA
    Posts
    1,631

    A do-it-yourself Knoppix zram demo

    .
    @ Blacksimon

    Surprise: zram capability is already in 6.7.1; it just
    hasn't been advertized or automated. As you were beginning to suspect.

    Here's how to simulate what's coming in Knoppix 7.0+:

    1. Boot up Knoppix 6.7.1 with the cheatcode knoppix mem=512M
    This simulates a 'small' amount of ram these days.

    2. Establish a zram set-up using 3/4 the ram as zram:
    echo $((384*1024*1024))>/sys/block/zram0/disksize
    mkswap /dev/zram0
    swapon -p 100 /dev/zram0

    3. Bring in LibreOffice and IceWeasel
    (without zram, my mem used would be about 807M with
    just these two and lxterminal)

    4. Switch from one to the other of these; when you switch,
    give each something new to do.

    5. Examine free from time to time.

    6. Bring in some more programs, check free again.
    Last edited by utu; 05-25-2012 at 11:29 PM.

  5. #15
    Member Blacksimon's Avatar
    Join Date
    Oct 2011
    Location
    Italy
    Posts
    93
    Hi Utu,
    this makes me very pleased.
    Now, all that remains is to check the effectiveness of zram to judge whether you have a real performance increase.
    I'll try to test the system, making him work hard with Gimp, maybe applying some filters to high resolution images.
    I will tell you.

  6. #16
    Senior Member registered user
    Join Date
    May 2006
    Location
    Columbia, Maryland USA
    Posts
    1,631
    Since this new capability will be applicable to any amount of ram,
    it would be handy to have some simple, generic test that would
    demonstrate significant usage of zram in any given situation.

    For example, I've got 4 Gb of ram, and my normal needs are met by
    less than 1.5 Gb having everything available all the time.

    Dumbing things down to make-believe I have 512M proves a point,
    but not convincingly, to my mind.

    Some algorithmic scheme of dd manipulation and Fibonacci series has
    an elegant flavor to it, although dd can be dangerous.

    Another scheme might be based on spawning several simultaneous virtual systems.

  7. #17
    Member Blacksimon's Avatar
    Join Date
    Oct 2011
    Location
    Italy
    Posts
    93
    I used a Netbook Acer Aspire One with 1GB RAM, 768MB of zram setting.
    I stressed the system by opening a dozen pictures and move large files from one hard disk to another, while surfing the internet watching videos on Youtube.

    Well I have not noticed any significant performance increase.

    Perhaps it is wiser to let the system use the full 1GB of Ram automatically, and perhaps this is not the appropriate test.
    I do not know ...

  8. #18
    Senior Member registered user
    Join Date
    May 2006
    Location
    Columbia, Maryland USA
    Posts
    1,631
    @ Blacksimon

    Performance 'increase' should be a measure of the difference between
    swapping to hdd and swapping to zram.

    If your Knoppix can handle everything you need with 1 Gb, then
    zram in Knoppix 7 will stay out of the way and not affect performance
    at all.

    If you need more than 1 Gb, presumably your system will hang up
    without zram, unless you have some other swap to save you.
    This is where Knoppix's zram comes to the rescue. Not crashing
    is the performance increase in this case.

    Just trying to clarify things, hope this helps.

  9. #19
    Member Blacksimon's Avatar
    Join Date
    Oct 2011
    Location
    Italy
    Posts
    93
    Everything you say is correct
    Taking the test again with 512MB of zram, I noticed the effective use of zram, and in my case not crashing is a really performance increase



    Code:
    root@Black:~# free
                 total       used       free     shared    buffers     cached
    Mem:       1018724    1006984      11740          0      65772     128280
    -/+ buffers/cache:     812932     205792
    Swap:       616444     321768     294676
    Last edited by Blacksimon; 05-27-2012 at 09:07 PM.

  10. #20
    Member registered user
    Join Date
    Jan 2006
    Posts
    64
    Quote Originally Posted by utu View Post
    .
    @ Blacksimon

    ... 2. Establish a zram set-up using 3/4 the ram as zram:
    echo $((384*1024*1024))>/sys/block/zram0/disksize
    mkswap /dev/zram0
    swapon -p 100 /dev/zram0

    3. Bring in LibreOffice and IceWeasel
    (without zram, my mem used would be about 807M with
    just these two and lxterminal)

    4. Switch from one to the other of these; when you switch,
    give each something new to do.

    5. Examine free from time to time.

    6. Bring in some more programs, check free again.
    Can I use this to shrink the existing zram0 on K703?
    Can I modprobe to add a second, smaller zram0? How?
    I am concerned about running out of memory; I already see long pauses, especially when the system suddenly decided to put 1G into the empty zram swap.
    What happens if I put 1G of .debs into the ramdisk? They are compressed; will I lose that 1G of RAM? Do I get it back if I swapoff /dev/zram0?
    I have searched the web, so far with no details found.
    Thanks

Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Dell PowerEdge M610 Blade Server E5620@2.2GHZ (6x)8GB RAM (2x)146GB 15K SAS HDD picture

Dell PowerEdge M610 Blade Server E5620@2.2GHZ (6x)8GB RAM (2x)146GB 15K SAS HDD

$75.00



DELL PowerEdge R730XD 24x 2.5

DELL PowerEdge R730XD 24x 2.5" Server Dual 750W Dual Heatsink - BareBones TESTED

$299.99



Supermicro 4U 36 Bay Storage Server 2.4Ghz 8-C 128GB 1x1280W Rails TrueNAS ZFS picture

Supermicro 4U 36 Bay Storage Server 2.4Ghz 8-C 128GB 1x1280W Rails TrueNAS ZFS

$721.06



H261-Z61 2U 24SFF AMD Server 8x EPYC 7551 256-Cores 256GB RAM 8x25G NIC 2x2200W picture

H261-Z61 2U 24SFF AMD Server 8x EPYC 7551 256-Cores 256GB RAM 8x25G NIC 2x2200W

$2512.18



DELL PowerEdge R730 Server 2x E5-2690v3 2.6GHz =24 Cores 32GB H730 4xRJ45 picture

DELL PowerEdge R730 Server 2x E5-2690v3 2.6GHz =24 Cores 32GB H730 4xRJ45

$275.00



Dell PowerEdge R720XD Xeon E5-2680 V2 2.8GHz 20 Cores 256GB RAM 12x4TB picture

Dell PowerEdge R720XD Xeon E5-2680 V2 2.8GHz 20 Cores 256GB RAM 12x4TB

$510.00



Dell PowerEdge R720 Server - 2x8c CPU,256Gb RAM, 128Gb SSD/3x600Gb SAS, Proxmox picture

Dell PowerEdge R720 Server - 2x8c CPU,256Gb RAM, 128Gb SSD/3x600Gb SAS, Proxmox

$340.00



Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 128GB RAM No HDD picture

Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 128GB RAM No HDD

$389.99



Dell PowerEdge R820 Server 4x E5-4620 2.2GHz 32-Core Total 256GB 0HD 2x 1100w  picture

Dell PowerEdge R820 Server 4x E5-4620 2.2GHz 32-Core Total 256GB 0HD 2x 1100w

$315.00



1U Supermicro Pro Server X10DRU-i+ 2x Xeon E5-2620 V3 32GB DDR4 RAM 4x 10GE RAIL picture

1U Supermicro Pro Server X10DRU-i+ 2x Xeon E5-2620 V3 32GB DDR4 RAM 4x 10GE RAIL

$190.00