Am 14.10.2011 03:10, schrieb Pandu Poluan: > > On Oct 13, 2011 8:32 PM, "Florian Philipp" <li...@binarywings.net > <mailto:li...@binarywings.net>> wrote: >> >> Am 13.10.2011 03:52, schrieb Pandu Poluan: >> > Just stumbled upon this blog: >> > >> > http://www.webupd8.org/2011/10/increased-performance-in-linux-with.html >> > >> > anyone got any experience with zram/compcache on Gentoo? >> > [...] >> I use it on my laptop (4GB RAM, typically 1-2GB swap used). It >> works pretty well but I can't give you any hard figures. >> [...] >> Only drawback so far: When zram is full, putting the laptop into standby >> takes longer, maybe 15s compared to 3s without. Sometimes this can lead >> to timeouts and the kernel aborts the suspend operation with an error on >> dmesg. Reattempting it then succeeds. >> > > Point taken. Do you think it's worth the slight annoyance? > > Rgds, >
As a follow-up, this is what it looks like when suspend fails with full zram: PM: Syncing filesystems ... done. PM: Preparing system for mem sleep Freezing user space processes ... (elapsed 0.01 seconds) done. Freezing remaining freezable tasks ... Freezing of tasks failed after 20.00 seconds (1 tasks refusing to freeze, wq_busy=0): khugepaged R running task 0 522 2 0x00800000 ffff88010255c600 ffff88010255c8b8 ffff88013602b7c0 ffffffff81026f33 0000000000000000 00000000ffffffff ffff8800257ab308 ffff88013602b968 ffff88013602b7e0 ffffffff81025d00 ffffea0000e8d378 0000000000000008 Call Trace: [<ffffffff81025d00>] ? ptep_clear_flush_young+0x20/0x30 [<ffffffff810a6d18>] ? __pagevec_free+0x38/0x50 [<ffffffff810ad4fc>] ? free_page_list+0xfc/0x110 [<ffffffff810adabd>] ? shrink_page_list+0x14d/0x5e0 [<ffffffff810ac40f>] ? isolate_lru_pages+0x19f/0x2b0 [<ffffffff810ae4a9>] ? shrink_inactive_list+0x2c9/0x350 [<ffffffff810a8f25>] ? determine_dirtyable_memory+0x15/0x30 [<ffffffff810a8fce>] ? global_dirty_limits+0x2e/0x110 [<ffffffff810a90eb>] ? throttle_vm_writeout+0x3b/0xa0 [<ffffffff810aebf0>] ? shrink_zone+0x480/0x550 [<ffffffff812a3a29>] ? i915_gem_inactive_shrink+0x169/0x1f0 [<ffffffff81061d5c>] ? ktime_get_ts+0xac/0xe0 [<ffffffff81093aa0>] ? delayacct_end+0x80/0xa0 [<ffffffff810a429a>] ? zone_watermark_ok+0x1a/0x20 [<ffffffff813e7fff>] ? schedule+0x8ef/0xae0 [<ffffffff810a5af0>] ? page_alloc_cpu_notify+0x50/0x50 [<ffffffff810a5b01>] ? drain_local_pages+0x11/0x20 [<ffffffff810a7bd9>] ? __alloc_pages_nodemask+0x4e9/0x830 [<ffffffff813e884d>] ? schedule_timeout+0x16d/0x260 [<ffffffff81049bb0>] ? del_timer+0xa0/0xa0 [<ffffffff813e8999>] ? schedule_timeout_interruptible+0x19/0x20 [<ffffffff810db8f7>] ? khugepaged_alloc_hugepage+0xc7/0xf0 [<ffffffff81059260>] ? wake_up_bit+0x40/0x40 [<ffffffff810dbd0d>] ? khugepaged+0x8d/0x11f0 [<ffffffff81059260>] ? wake_up_bit+0x40/0x40 [<ffffffff810dbc80>] ? collect_mm_slot+0xa0/0xa0 [<ffffffff81058df6>] ? kthread+0x96/0xa0 [<ffffffff813ebb54>] ? kernel_thread_helper+0x4/0x10 [<ffffffff81058d60>] ? kthread_worker_fn+0x180/0x180 [<ffffffff813ebb50>] ? gs_change+0xb/0xb Restarting tasks ... done All things considered, I think it is worth it. This is my memory usage: free -m total used free shared buffers cached Mem: 3753 3167 586 0 16 644 -/+ buffers/cache: 2505 1247 Swap: 8018 1487 6530 cat /proc/swaps Filename Type Size Used Priority /dev/zram0 partition 1921700 1520320 1 /dev/sda7 partition 6289412 2968 0 There is no observable slowdown, no swapping, no system freeze when switching active windows. It feels like the system didn't swap at all. I even increased swappiness to use more space for caching. Regards, Florian Philipp
signature.asc
Description: OpenPGP digital signature