Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

npm install slow on proxy feed



  • Hi,

    we're currently running ProGet Version 2023.27 (Build 5). We have a npm feed configured as a proxy feed for https://registry.npmjs.org.

    We've noticed that npm install is significantly slower when using our proxy feed (compared to directly installing from npmjs.org) even when all requested packages are cached on the ProGet server.

    Our test scenario ist this:

    • empty npm cache

    • delete node_modues directory

    • delete package-lock.json file

    • run npm install

    Results:
    ProGet: 02m35s
    npmjs.org: 00m38s

    = ~4x slower with ProGet

    Is anyone else experiencing the same behavior? Any tips how to speed things up with ProGet?`

    Thanks in advance!
    Andreas


  • inedo-engineer

    Hi @andreas-unverdorben_1551 ,

    npmjs.org primarily serves static content and runs on massive server farms running in Microsoft's datacenters.

    Your ProGet server is much less powerful and does not serve static content. Not only is every request is dynamic (authentication, authorization, vulnerability checking, license checking, etc), but most requests (such as "what is the latest version of package X") need to be forwarded to npmjs.org and aggregated with local data.

    So, a much less powerful server doing a lot more processing is going to be a little slower ;)

    Running ProGet in a server cluster will certainly help.

    Cheers,
    Dean



  • Hi Dean,

    we noticed that when performing an "npm install" against ProGet it will successively open ~1000 sessions.

    We tried a couple of values for Web.ConcurrentRequestLimit under "Administration --> Advanced Setting" (20, 50, 100, 200) and found out, that when using 100 we get the same (or even better) performance for an "npm install" compared to registry.npmjs.org. We're not exactly sure how Web.ConcurrentRequestLimit works but we assume that it has some relation to the default pool size for the SQL Server connection used by ProGet, which also seems to be 100.

    I just wanted to let you know, that by setting Web.ConcurrentRequestLimit to 100 the performance of "npm install" is back to normal.

    Best,
    Andreas


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation