Subject: | |
From: | |
Reply To: | Patrick J. LoPresti |
Date: | Tue, 15 Jul 2014 11:18:17 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
On Tue, Jul 15, 2014 at 11:11 AM, ToddAndMargo <[log in to unmask]> wrote:
>
>> Who would this differ from the "sync" command?
>
>
> "who" should have been "how"
As someone else said, "sync" just synchronizes the copy on disk with
the copy in memory; i.e. it forces a flush of dirty pages to disk. The
kernel will still keep a copy of those pages cached in RAM, forever,
or until it needs that RAM for something else.
That copy in RAM can mess up your performance tests. Specifically, if
all file meta-data (specifically file sizes and timestamps) is cached,
rsync will not actually touch either the source or destination disk at
all.
"sysctl -w vm.drop_caches=3" forces the kernel to forget what it
cached, setting a clean slate for an honest benchmark.
- Pat
|
|
|