X-Account-Key: account1
X-UIDL: 9fc0539a9c54c89c928cbc5a374429d2
X-Mozilla-Status: 0011
X-Mozilla-Status2: 00000000
X-Mozilla-Keys:                                                                                 
Received: from lists.maptools.org (lothlorien.howardsilvan.com [127.0.0.1])
	by mail.howardsilvan.com (Postfix) with ESMTPS id 2CCCF6721B7
	for <faxguy@howardsilvan.com>; Wed, 27 Jan 2016 12:17:40 -0800 (PST)
Received: from lists.maptools.org ([94.23.4.142] helo=lists.maptools.org)
	by lothlorien.howardsilvan.com
	with SMTP (2.3.3); 27 Jan 2016	12:17:39 -0800
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 4448B35C168;
	Wed, 27 Jan 2016 15:16:48 -0500 (EST)
Received: from blade.simplesystems.org (blade.simplesystems.org [65.66.246.74])
	by lists.maptools.org (Postfix) with ESMTPS id 085CC35C054
	for <tiff@lists.maptools.org>; Wed, 27 Jan 2016 14:55:52 -0500 (EST)
Received: from freddy.simplesystems.org (freddy.simplesystems.org	[65.66.246.65])
	by blade.simplesystems.org (8.14.4+Sun/8.14.4)
	with ESMTP id	u0RJtnFk009660; Wed, 27 Jan 2016 13:55:49 -0600 (CST)
Date: Wed, 27 Jan 2016 13:55:49 -0600 (CST)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@freddy.simplesystems.org
To: Aaron Boxer <boxerab@gmail.com>
In-Reply-To: 
 <CAK8GPyDM9PtZ+1_ojbLJbFHMNdBSkbKzoUCk9DWyW_RM2xyrcg@mail.gmail.com>
Message-ID: <alpine.GSO.2.01.1601271343370.20034@freddy.simplesystems.org>
References:
	<CAK8GPyAzKfkxRzoG9BSLMT6WS1+pOuD5-cn08huFevXBAM9Y3g@mail.gmail.com>
	<CAGNS0RtXiz0qPgEuXpzVwJGvbv7TACX2JD-quMi_urwo7P05HA@mail.gmail.com>
	<CAK8GPyCHEWgbMgj23+f0c_xrv=cptBLVeeChC=Z=WBDq9Rvgiw@mail.gmail.com>
	<CAAcuQeYNCG9uANw33enwZ7EQM3D5g6Upn2N=FkZxHdckHMqX-g@mail.gmail.com>
	<CAK8GPyAVKZrN+XUXZrzcM+94xv4H6ETmyiQtNNuch3d1+g7u7Q@mail.gmail.com>
	<alpine.GSO.2.01.1601261426560.24533@freddy.simplesystems.org>
	<CAK8GPyDM9PtZ+1_ojbLJbFHMNdBSkbKzoUCk9DWyW_RM2xyrcg@mail.gmail.com>
User-Agent: Alpine 2.01 (GSO 1266 2009-07-14)
MIME-Version: 1.0
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2
	(blade.simplesystems.org [65.66.246.90]);	Wed, 27 Jan 2016 13:55:49 -0600
 (CST)
Cc: TIFF mailing list <tiff@lists.maptools.org>
Subject: Re: [Tiff] OpenMP enabled libtiff
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-Assp-ID: lothlorien.howardsilvan.com m1-25860-06741
X-Assp-Session: 7FE09B2ABEF0 (mail 1)
X-Assp-Detected-RIP: 65.66.246.65, 65.66.246.74
X-Assp-Source-IP: 65.66.246.65
X-Assp-Envelope-From: tiff-bounces@lists.maptools.org
X-Assp-Intended-For: faxguy@howardsilvan.com
X-Assp-Version: 2.3.3(14029) on lothlorien.howardsilvan.com
X-Assp-Server-TLS: yes
X-Assp-Delay: not delayed (whitelisted); 27 Jan 2016 12:17:41 -0800
X-Assp-Message-Score: -40 (KnownGoodHelo)
X-Assp-IP-Score: -40 (KnownGoodHelo)
X-Assp-Whitelisted: Yes (whitelistdb)
Return-Path: tiff-bounces@lists.maptools.org
Content-Type: MULTIPART/MIXED;
	BOUNDARY="-559023410-1936695736-1453924549=:20034"

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

---559023410-1936695736-1453924549=:20034
Content-Type: TEXT/PLAIN; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

On Wed, 27 Jan 2016, Aaron Boxer wrote:
>=20
> Thanks, Bob. So, are you saying that as TIFF is currently designed, mem=
ory mapping is beneficial=C2=A0 ? Because of the random access ?
> This was my experience on windows : turning off memory mapping when usi=
ng libtiff degraded performance.

The memory mapping does eliminate system call and access time=20
overheads associated with seeking, as long as data in the same MMU=20
page (e.g. 4k block) has been touched before.  This is why libtiff=20
memory maps for reads by default under Unix.

Before making comprehensive decisions about degraded performance, try=20
the use case where a large sequence of files is accessed in order=20
(each accessed once for each traversal) and the total amount of file=20
data is much larger than the amount of memory in your system.  In that=20
case, do you see the same win or do you now see a penalty which looks=20
very much like what happens when the system runs out of memory=20
("swapping")?

> My other question is : why is unix and windows treated differently=20
> in tifflib?=C2=A0 mmap call allows sharing of mapping between different=
=20
> file handles, while on windows this is turned off. I think it would=20
> be nice to have on windows.

I don't know why this is.  Memory mapping works fine for reads under=20
Windows although the maximum contigious map size is likely to be=20
smaller than on Unix type systems.  It does not work so well for=20
writes due to stupidity and missing certain useful POSIX functions=20
like ftruncate().  Many functions which might otherwise be useful do=20
not support large files or behave in much stupider ways (e.g. actually=20
write zeros to the filesystem rather than create a hole) than on Unix=20
type systems.

Bob
--=20
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen=
/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
---559023410-1936695736-1453924549=:20034
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
---559023410-1936695736-1453924549=:20034--


