Le jeudi 11 décembre 2014 00:40:56, Stadin, Benjamin a écrit :
> Hi,
> 
> I didn¹t try GeoPackage plugin in GeoServer, I¹ve played with Geopackage
> in GDAL and creating a geopackage db via ogr2ogr was slow as well.
> 
> In my opinion it would be save for both GDAL as well as the GeoPackage
> plugin to change the SQLite journaling mode to WAL and turn file
> synchronization off (at least when creating databases). C Example:
> 
> sqlite3_exec(db, "PRAGMA synchronous = OFF", NULL, NULL, NULL);

This can actually be done by adding "--config OGR_SQLITE_SYNCHRONOUS OFF" to 
the gdal_translate/ogr2ogr command line (see "Performance hints" section of 
http://gdal.org/drv_sqlite.html), and is what I practice regularly, and yes it 
gives a huge performance boost.

>     sqlite3_exec(db, "PRAGMA journal_mode = WAL", NULL, NULL, NULL);

AFAIR using WAL uses a slightly different storage that makes it incompatible 
with ancient sqlite3 versions.  
In my tests synchronous = off gives enough performance boost.

> 
> This must be done right after opening the database. The the insert /
> delete performance difference is enorm (several orders of magnitude
> compared to non-transactional inserts and also twice or three times faster
> for transactions).
> 
> A speedup between 100x - 1000x is not unlikely. This comes of course at
> the slightly increased cost of db corruption (see also [1,2]). But even
> then, it¹s debatable whether for the db utilization of both GeoServer and
> GDAL this can be configuration enabled globally for all operations: rare
> updates, still journaling enabled though with backup point from last disk
> write time compared to constant disk sync journaling for each op.

Yes perhaps I should consider turning synchronous = off by default.

> 
> Cheers
> Ben
> 
> [1] https://www.sqlite.org/wal.html
> [2] http://www.sqlite.org/pragma.html#pragma_journal_mode
> 
> 
> 
> 
> Am 10.12.14 23:41 schrieb "Even Rouault" unter
> 
> <even.roua...@spatialys.com>:
> >   * not really an issue, but generated that output file is extremely
> >
> >slow,
> >like 30 seconds, and lot of noise done by harddisk ;-)

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to