Gentoo Archives: gentoo-user

From: Florian Philipp <lists@×××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] zram / compcache, anyone?
Date: Wed, 19 Oct 2011 22:49:59
Message-Id: 4E9F53C1.3090207@binarywings.net
In Reply to: Re: [gentoo-user] zram / compcache, anyone? by Pandu Poluan
1 Am 14.10.2011 03:10, schrieb Pandu Poluan:
2 >
3 > On Oct 13, 2011 8:32 PM, "Florian Philipp" <lists@×××××××××××.net
4 > <mailto:lists@×××××××××××.net>> wrote:
5 >>
6 >> Am 13.10.2011 03:52, schrieb Pandu Poluan:
7 >> > Just stumbled upon this blog:
8 >> >
9 >> > http://www.webupd8.org/2011/10/increased-performance-in-linux-with.html
10 >> >
11 >> > anyone got any experience with zram/compcache on Gentoo?
12 >> >
13 [...]
14 >> I use it on my laptop (4GB RAM, typically 1-2GB swap used). It
15 >> works pretty well but I can't give you any hard figures.
16 >>
17 [...]
18 >> Only drawback so far: When zram is full, putting the laptop into standby
19 >> takes longer, maybe 15s compared to 3s without. Sometimes this can lead
20 >> to timeouts and the kernel aborts the suspend operation with an error on
21 >> dmesg. Reattempting it then succeeds.
22 >>
23 >
24 > Point taken. Do you think it's worth the slight annoyance?
25 >
26 > Rgds,
27 >
28
29 As a follow-up, this is what it looks like when suspend fails with full
30 zram:
31
32 PM: Syncing filesystems ... done.
33 PM: Preparing system for mem sleep
34 Freezing user space processes ... (elapsed 0.01 seconds) done.
35 Freezing remaining freezable tasks ...
36 Freezing of tasks failed after 20.00 seconds (1 tasks refusing to
37 freeze, wq_busy=0):
38 khugepaged R running task 0 522 2 0x00800000
39 ffff88010255c600 ffff88010255c8b8 ffff88013602b7c0 ffffffff81026f33
40 0000000000000000 00000000ffffffff ffff8800257ab308 ffff88013602b968
41 ffff88013602b7e0 ffffffff81025d00 ffffea0000e8d378 0000000000000008
42 Call Trace:
43 [<ffffffff81025d00>] ? ptep_clear_flush_young+0x20/0x30
44 [<ffffffff810a6d18>] ? __pagevec_free+0x38/0x50
45 [<ffffffff810ad4fc>] ? free_page_list+0xfc/0x110
46 [<ffffffff810adabd>] ? shrink_page_list+0x14d/0x5e0
47 [<ffffffff810ac40f>] ? isolate_lru_pages+0x19f/0x2b0
48 [<ffffffff810ae4a9>] ? shrink_inactive_list+0x2c9/0x350
49 [<ffffffff810a8f25>] ? determine_dirtyable_memory+0x15/0x30
50 [<ffffffff810a8fce>] ? global_dirty_limits+0x2e/0x110
51 [<ffffffff810a90eb>] ? throttle_vm_writeout+0x3b/0xa0
52 [<ffffffff810aebf0>] ? shrink_zone+0x480/0x550
53 [<ffffffff812a3a29>] ? i915_gem_inactive_shrink+0x169/0x1f0
54 [<ffffffff81061d5c>] ? ktime_get_ts+0xac/0xe0
55 [<ffffffff81093aa0>] ? delayacct_end+0x80/0xa0
56 [<ffffffff810a429a>] ? zone_watermark_ok+0x1a/0x20
57 [<ffffffff813e7fff>] ? schedule+0x8ef/0xae0
58 [<ffffffff810a5af0>] ? page_alloc_cpu_notify+0x50/0x50
59 [<ffffffff810a5b01>] ? drain_local_pages+0x11/0x20
60 [<ffffffff810a7bd9>] ? __alloc_pages_nodemask+0x4e9/0x830
61 [<ffffffff813e884d>] ? schedule_timeout+0x16d/0x260
62 [<ffffffff81049bb0>] ? del_timer+0xa0/0xa0
63 [<ffffffff813e8999>] ? schedule_timeout_interruptible+0x19/0x20
64 [<ffffffff810db8f7>] ? khugepaged_alloc_hugepage+0xc7/0xf0
65 [<ffffffff81059260>] ? wake_up_bit+0x40/0x40
66 [<ffffffff810dbd0d>] ? khugepaged+0x8d/0x11f0
67 [<ffffffff81059260>] ? wake_up_bit+0x40/0x40
68 [<ffffffff810dbc80>] ? collect_mm_slot+0xa0/0xa0
69 [<ffffffff81058df6>] ? kthread+0x96/0xa0
70 [<ffffffff813ebb54>] ? kernel_thread_helper+0x4/0x10
71 [<ffffffff81058d60>] ? kthread_worker_fn+0x180/0x180
72 [<ffffffff813ebb50>] ? gs_change+0xb/0xb
73
74 Restarting tasks ... done
75
76 All things considered, I think it is worth it. This is my memory usage:
77 free -m
78 total used free shared buffers cached
79 Mem: 3753 3167 586 0 16 644
80 -/+ buffers/cache: 2505 1247
81 Swap: 8018 1487 6530
82
83 cat /proc/swaps
84 Filename Type Size Used Priority
85 /dev/zram0 partition 1921700 1520320 1
86 /dev/sda7 partition 6289412 2968 0
87
88 There is no observable slowdown, no swapping, no system freeze when
89 switching active windows. It feels like the system didn't swap at all. I
90 even increased swappiness to use more space for caching.
91
92 Regards,
93 Florian Philipp

Attachments

File name MIME type
signature.asc application/pgp-signature