Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: performance degrades with filesize

Hi,

I have also experienced the problem you describe. I am using the C
interface. I have been converting meteorological observations to NetCDF.
When a new observation comes in, I simply grow the unlimited dimension by
1. At first, when the files only contain a few observations, things go
fast, but as the files get larger, writing to them slows down.

I rewrote my code to grow the unlimited dimension only occasionally, as
you describe (I grow it in increments of 100 observations). I got a small
performance increase by doing things this way, but not nearly as large as
I was hoping for. The reason for the relatively slow large files still
remains a mystery to me (and in my case it may not be a NetCDF problem
....)

Tim Hume
Meteorological Service of New Zealand
Wellington
New Zealand

> Well, I could save growing the dimension by allocating a huge file at
> first, and then chop off the unused portion when my simulation completed.
> I could also grow the time dimension only occasionally, but not every
> timestep.  Unfortunately, I don't think that this is the whole issue.  I
> suppose that not using an unlimited dimension might be a work around, but
> it is basically a stab in the dark.  It is probably just a bug somewhere
> (it could be in my own code), because I would think that you could append
> the file fast as far as how the underlying C library works.
> 
> Thanks,        
>        John
> 
> 


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690