Re: [netcdf-java] [EXTERNAL] Re: Slow CDMS3 access via netcdf java

  • To: "Gangl, Michael E (US 398B)" <michael.e.gangl@xxxxxxxxxxxx>, John Caron <jcaron1129@xxxxxxxxx>
  • Subject: Re: [netcdf-java] [EXTERNAL] Re: Slow CDMS3 access via netcdf java
  • From: Joe Lee <hyoklee@xxxxxxxxxxxx>
  • Date: Thu, 23 Sep 2021 20:27:42 +0000
  • Arc-authentication-results: i=1; 1; spf=pass; dmarc=pass action=none; dkim=pass; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed;; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=l98h17WAZwBKz8RGnn89gpizwgF2hyZtubp5NJ7Uw4c=; b=eyvYa8x28vQqn6/QmkEt8XjzobfKOkVhUz2fd2ngqqzAJ9wc53poRfp+kB3tDE33f1BzGDj4bFPrUYzRFNRCEknd5ecYWMEpYx7LbG7aW5eAazd0scQFVAkfsX8uPkBnUTrJv+uW/DytSs8meu2/NI7GHEPd098AITrkKH8vcEkUP+RyBiefQEpfkeEF8vKIiaOA4NhYXVy5nhM3C2FYCHKDm/G0grwxZZCy008agWeDHsulO/lAuq48YiZC5XQdlh9bxiPiJ0TGyGC5evuvsO9by7vZH9Fg9hCz9qt1ojKD6S1vL8JDsSsG9WX4zEo0l8VtE7Wh02NftDOwzPc8pw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901;; cv=none; b=WLNl+NFY/xonYjTqPno9tpei5aog3bqCjI7hWiHje7QpvZMrsHhsD3sbSAZSbOgfTCszzXC2w0ppGJI1UT/doXtXUFAcpiwdJTAZyLIzQ4Vs4VrBcp39ejKDWxMmZtOlnl6BX1lOhLLRt8hf7Rk/vP6eclIDGd/joP8oW1xFUhl3cItpeTOitKUIO+5AnMfdRYiXVi622MaZdFg46KjTdZo3s+aRGz3sXCflTB/3/oLLsijDQ50S0/ev40H+0kn6DvEO6kXdrt2fcKl7gjZu3AkG7HB+xLU+Vu8P8vRo8NpTxc6MciCZbjQiZpYRWrSaquq+5x9qROEYOmWoVazi3g==
  • Authentication-results:; dkim=none (message not signed) header.d=none;; dmarc=none action=none;
Hi, Michael!

Could it be an NGAP problem (throttle in network, security, etc.)?
Have you tried THREDDS outside NGAP?

Please see my THREDDS performance test on TerraFusion (24G netCDF-4 file per 
granule on AWS us-west-2):

How’s your netCDF-4/HDF5 organized (i.e., compression/chunking)?

From: netcdf-java <netcdf-java-bounces@xxxxxxxxxxxxxxxx> On Behalf Of Gangl, 
Michael E (US 398B) via netcdf-java
Sent: Thursday, September 23, 2021 2:34 PM
To: John Caron <jcaron1129@xxxxxxxxx>
Cc: netcdf-java@xxxxxxxxxxxxxxxx
Subject: Re: [netcdf-java] [EXTERNAL] Re: Slow CDMS3 access via netcdf java

These are netcdf4 files. This is simply a test to show that reading a single 
variable was unbearably slow, I have no real use for the output of it. I wrote 
the test because we ran into timeouts when trying to setup S3 access from 
THREDDS that also uses the netcdf-java librarby. Our entire archive (500TB) is 
in S3. We supply THREDDS access to the users to make accessing 
regional/timeseries data easier. We can’t download all of this locally and then 
delete it. Troubleshooting what was happening- that led me to these commands to 
simply open and get variable data being ‘the culprit’ as far as I’m concerned.

By setting buffer and maxS3Cache size to -1 (turning them off) it seems we are 
now simply download the file.

I don’t think that’s ideal in the long run, but was the only way to get the 
dataset to be read from netcdf-java, and thereby Thredds, in any sort of 
reasonable fashion.

I guess my ask is to have THREDDS run faster on object store / s3 data, and I’m 
coming to what I think the source of the issues is (netcdf-java) and bypassing 
the thredds community.


From: John Caron <jcaron1129@xxxxxxxxx<mailto:jcaron1129@xxxxxxxxx>>
Date: Wednesday, September 22, 2021 at 8:49 PM
To: Mike Gangl 
Cc: "netcdf-java@xxxxxxxxxxxxxxxx<mailto:netcdf-java@xxxxxxxxxxxxxxxx>" 
Subject: [EXTERNAL] Re: [netcdf-java] Slow CDMS3 access via netcdf java

Hi Michael: what kind of files are these? netcdf3 or netcdf4? What is the 
output of your example program?

Perhaps you should download it locally and access it from there, and then 
delete when done?


On Tue, Sep 21, 2021 at 1:40 PM Gangl, Michael E (US 398B) via netcdf-java 
<netcdf-java@xxxxxxxxxxxxxxxx<mailto:netcdf-java@xxxxxxxxxxxxxxxx>> wrote:
I’m writing on behalf of podaac [0] which really wants to move it’s thredds 
server to the AWS cloud.

Our setup is essentially an EC2 instance with a lot of network bandwitdth to 
our S3 datastores. We hope to use Thredds to read from S3 directly. We’ve got 
this up and running and can get some results for very small requests, but we 
noticed any type of large or multifile query essentially takes too long to be 

Digging down, I’ve constructed a test to essentially do a ‘read’ on a single 
variable from a large file (~720MB).

              long startTime = System.currentTimeMillis();
              NetcdfFile ncfile ="cdms3://ngap-cumulus-uat@aws/podaac-uat-cumulus-protected?MUR-JPL-L4-GLOB-v4.1/<;!!PvBDto6Hs4WbVuu7!exHN1sBuZYci6A5i73bvUeQNFdDHJFNPhKOBoC4Cv0zXWohq-TGDSLWZxOVUtGmW_TKlu0R_Dg$>");
              long stopTime = System.currentTimeMillis();
              System.out.println("Read header took " +(stopTime - startTime)+ " 

              startTime = System.currentTimeMillis();
              Variable v = ncfile.findVariable("analysed_sst");
              stopTime = System.currentTimeMillis();
              System.out.println("Read variable took " +(stopTime - startTime)+ 
" ms");

                }catch (Exception e){

This… takes absolutely forever- still waiting on some tests to return but 
they’ve all taken > 20 minutes and I end up closing them trying to determine 
what’s going on. As a comparison, I’m able to read the entire 720MB file using 
the AWS cli in under a minute (around 25MiB/s over my wifi):

time aws s3 cp 
 . --profile ngap-service-uat


real  0m45.867s

user  0m2.932s

sys   0m1.891s

Is there any control (or insight) that I have over why this is taking so long? 
My only guess to why it takes so long would be: It’s reading small pieces of 
the file serially or even in parallel, but the cost of connect and download is 
so expensive. Is there anyway I can instruct it to simply download/cache the 
entire file? Read much more data in a single request? That would seem faster at 
this rate. Alternatively, speeding up the read in anyway would be a benefit.



From: netcdf-java 
 on behalf of Sean Arms <sarms@xxxxxxxx<mailto:sarms@xxxxxxxx>>
Date: Thursday, September 16, 2021 at 12:30 PM
To: "netcdf-java@xxxxxxxxxxxxxxxx<mailto:netcdf-java@xxxxxxxxxxxxxxxx>" 
Subject: [EXTERNAL] [netcdf-java] A farewell message

Dear THREDDS and Netcdf-Java community,

My last day at Unidata will be tomorrow, September 17th, 2021. It was not an 
easy decision, to say the least, but I believe this is the right choice for my 
family and me. It has been my pleasure to serve you over these past ten years.

Unidata will continue to host and support the development of the THREDDS stack. 
Hailey Johnson will be taking over as project lead, and will be reaching out to 
you with some details for future plans for the netCDF-Java library and the TDS. 
The roadmap that Hailey is working on contains many exciting developments for 
the future, and I look forward to watching and helping, in a very limited way, 
these developments move forward as a community contributor.

As always, projects like netCDF-java and the TDS rely upon community 
interactions and contributions to be sustainable. Contributions to the code 
base, documentation, tackling issues, and answering questions on the mailing 
lists are all ways that you can help keep these efforts moving into the future. 
Such efforts will be incredibly helpful during the next several months as 
Hailey continues spinning-up on the THREDDS efforts, and your continued support 
and patience will be greatly appreciated throughout this transition period.

With gratitude and hope for the future,

NOTE: All exchanges posted to Unidata maintained email lists are
recorded in the Unidata inquiry tracking system and made publicly
available through the web.  Users who post to any of the lists we
maintain are reminded to remove any personal information that they
do not want to be made public.

netcdf-java mailing list
For list information or to unsubscribe, visit:<;!!PvBDto6Hs4WbVuu7!exHN1sBuZYci6A5i73bvUeQNFdDHJFNPhKOBoC4Cv0zXWohq-TGDSLWZxOVUtGmW_TLfClX2tA$>
  • 2021 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: