From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RG2dO-0001nF-Hj for garchives@archives.gentoo.org; Tue, 18 Oct 2011 05:54:42 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DD04121C044; Tue, 18 Oct 2011 05:54:33 +0000 (UTC) Received: from out5.smtp.messagingengine.com (out5.smtp.messagingengine.com [66.111.4.29]) by pigeon.gentoo.org (Postfix) with ESMTP id A57C421C036 for ; Tue, 18 Oct 2011 05:53:37 +0000 (UTC) Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 6102A20A9D for ; Tue, 18 Oct 2011 01:53:37 -0400 (EDT) Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 18 Oct 2011 01:53:37 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=binarywings.net; h=message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; s=mesmtp; bh=VLid++WJM7qpk7qjXzbo4Mg7 zcU=; b=a2dcYW7IF/Usr3L4PSJW1QzIC0V/QEm3wLzOZXeHelGH0OwZLj6Ne1PP pvmZvGFUFQn8gvy0RUND9LHZRttMBHV/an7syYLjUAE+WThZ2gubsNwpNGLRJxqX Vqu3Rn3wxUqdPnSso0i1yyJnvHNKNIJmsXBxHe/mjF9MYhnuQFM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to :subject:references:in-reply-to:content-type; s=smtpout; bh=VLid ++WJM7qpk7qjXzbo4Mg7zcU=; b=qAk2k8+XUwNUfVQQUc2XrF1AqPKugVrMq+hx WGddsDGRLuyrLyqoAklV9w9Hoq+v1c3mhrju1UZ/2QZS6a4cmAi8Zka2NtcDKfCv tqdVXirVv3v4tWfIykXx7rDzEdOZuF5DJABaPUwC6KkdsV4l88r/1QlqDYKs7qWp rqL9EXc= X-Sasl-enc: w9YNEBJLrgMVefqq5g3Cl5h+qfwTnrytXXl7wIbf2eEy 1318917216 Received: from [192.168.5.18] (serv.binarywings.net [83.169.5.6]) by mail.messagingengine.com (Postfix) with ESMTPSA id 48FB24833AD for ; Tue, 18 Oct 2011 01:53:36 -0400 (EDT) Message-ID: <4E9D1457.8070504@binarywings.net> Date: Tue, 18 Oct 2011 07:53:27 +0200 From: Florian Philipp User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.20) Gecko/20110925 Lightning/1.0b3pre Thunderbird/3.1.12 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] zram / compcache, anyone? References: In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigFE7E78118D4DD96C4495569E" X-Archives-Salt: X-Archives-Hash: 52064e792cd2531affa8a9ca54051632 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigFE7E78118D4DD96C4495569E Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Am 18.10.2011 07:16, schrieb Paul Hartman: > On Wed, Oct 12, 2011 at 8:52 PM, Pandu Poluan wrote= : >> Just stumbled upon this blog: >> >> http://www.webupd8.org/2011/10/increased-performance-in-linux-with.htm= l >> >> anyone got any experience with zram/compcache on Gentoo? >=20 > I'm using zram in a gentoo server with only 256mb of RAM, only used > for a few weeks so far. It seems to work and the server hasn't crashed > yet. :) I have allocated 128MB of compressed swap (64x2, actually, to > theoretically utilize both CPU cores for compression at the same time) > followed by normal on-disk swap at lower priority. Usually my total > swap used is less than 128MB so the real disk swap is rarely touched. > It's difficult to say if there is any improved performance, but I > haven't experienced any slowdown, which occasionally I did when swap > became heavily used in the past. Keep in mind the 128MB zram is the > uncompressed size, so the actual amount of RAM used by this should be > much less, depending on contents of the swap. Some even recommend > using zram equal to the amount of RAM but that idea scares me. >=20 > After enabling the CONFIG_ZRAM module in kernel 3.0.6, I did this: >=20 > modprobe zram num_devices=3D2 > echo $((64*1024*1024)) > /sys/block/zram0/disksize > echo 1 > /sys/block/zram0/reset # sleep 1 > mkswap /dev/zram0 > swapon -p 11 /dev/zram0 >=20 In my experience, it can be necessary to put a `sleep 1` between reset and mkswap because the /dev/zram0 disappears and reappears after the reset command. Another remark: The kernel docs recommend using /bin/echo instead of echo because problems are reported as write errors and the echo builtin of bash doesn't check for that. Regards, Florian Philipp --------------enigFE7E78118D4DD96C4495569E Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6dFF0ACgkQqs4uOUlOuU+gAACfdi8sHOMRVbq65dlTZRsJZhjP bwAAnicQ2eZJkqHGacfIKkIMiqdoWcbL =mqjP -----END PGP SIGNATURE----- --------------enigFE7E78118D4DD96C4495569E--