FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 11-16-2009, 10:44 PM
Laszlo Papp
 
Default HACKING: add some notes /proc/sys/vm/drop_caches

Signed-off-by: Laszlo Papp <djszapi@archlinux.us>
---
HACKING | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/HACKING b/HACKING
index 537d9a3..63ccf1e 100644
--- a/HACKING
+++ b/HACKING
@@ -146,6 +146,14 @@ For example, to run valgrind:
./src/pacman/pacman
valgrind --leak-check=full -- src/pacman/.libs/lt-pacman -Syu

+How should I make benchmarks?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+pacman spends most time with reading and writing the database. because of this,
+it's important to drop caches before doing a benchmark. here is how to do so:
+
+# echo 3 > /proc/sys/vm/drop_caches
+
/////
vim: set ts=2 sw=2 syntax=asciidoc et:
/////
--
1.6.5
 
Old 11-17-2009, 05:59 AM
Sebastian Nowicki
 
Default HACKING: add some notes /proc/sys/vm/drop_caches

On Nov 17, 2009, at 7:44 AM, Laszlo Papp wrote:


+# echo 3 > /proc/sys/vm/drop_caches


Note that this is Linux specific. Perhaps instructions for other
kernels should be included as well.
 
Old 11-17-2009, 07:54 AM
Laszlo Papp
 
Default HACKING: add some notes /proc/sys/vm/drop_caches

On Tue, Nov 17, 2009 at 7:59 AM, Sebastian Nowicki <sebnow@gmail.com> wrote:
>
> On Nov 17, 2009, at 7:44 AM, Laszlo Papp wrote:
>>
>> +# echo 3 > /proc/sys/vm/drop_caches
>
> Note that this is Linux specific. Perhaps instructions for other kernels
> should be included as well.

Valgrind has got limitation too:
It runs on the following platforms: X86/Linux, AMD64/Linux,
PPC32/Linux, PPC64/Linux, and X86/Darwin (Mac OS X)

Otherwise I don't use other kernels, just Linux :P If it's needed I
hope other contributor can help.

Best Regards,
Laszlo Papp
 
Old 11-17-2009, 04:41 PM
Xavier
 
Default HACKING: add some notes /proc/sys/vm/drop_caches

On Tue, Nov 17, 2009 at 12:44 AM, Laszlo Papp <djszapi2@gmail.com> wrote:
> Signed-off-by: Laszlo Papp <djszapi@archlinux.us>
> ---
> *HACKING | * *8 ++++++++
> *1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/HACKING b/HACKING
> index 537d9a3..63ccf1e 100644
> --- a/HACKING
> +++ b/HACKING
> @@ -146,6 +146,14 @@ For example, to run valgrind:
> * * ./src/pacman/pacman
> * * valgrind --leak-check=full -- src/pacman/.libs/lt-pacman -Syu
>
> +How should I make benchmarks?
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +pacman spends most time with reading and writing the database. because of this,
> +it's important to drop caches before doing a benchmark. here is how to do so:
> +
> +# echo 3 > /proc/sys/vm/drop_caches
> +

This is a completely retarded statement.

1) pacman spends most time with reading and writing the database

WRONG

This depends whether it is cached or not. In a real world situation,
you will have only one uncached run of pacman (the first one) compared
to many cached.
It also depends on the operation. If you are going to
download/install/remove a lot of (or big) packages, it's likely
completely wrong.

2) because of this, t's important to drop caches before doing a benchmark

WRONG

This depends on WTF you are benchmarking in the first place.
If you want to see the effect of your patch on the database
reading/writing, you probably want to drop caches.
If you want to see the effect on the rest, you probably do not want to
drop caches.


This tip to drop caches can sometimes be very useful, so it might be
worth mentioning in the HACKING file. And pacman database is indeed
quite inefficient (the first run on my laptop is painfully slow).

But can you please *think* about what you are writing twice (or more)
before sending it ? And common sense helps too, did you ever think
about getting some ?

I enjoy this list a lot and communicating with everyone else here.
I don't know how you manage to piss me off with every mail you send.
 

Thread Tools




All times are GMT. The time now is 07:13 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org