1

I have a pretty simple Vuejs application that is hosted under NGINX. My hardware is Raspberry Pi 3B+ (OS: Raspbian).

Every time I go to my application from any device in my network (Windows computer, Android, IOS), the initial load time is extremely long. If I would have started a stopwatch when I made the initial browser request (from Chrome in all cases), and stopped it when the application had finished loading, I would reach approximately 7 s.

My Vuejs application has a chunk-vendors.js.map-file (~5.4 MB) which seems to be the "heaviest" thing here (according to performance tab in Chrome), I'm not sure.

But! If I for example request the application from my Windows computer, wait a few seconds, and then request the application from my Android device (or the opposite: start with a request from Android device, wait a few seconds, and then request the application from my computer), the loading time for last device is very short!

Question:

All of this makes me believe that something is in idle state? Does NGINX ever go into sleep mode (or something like it)?

5
  • What kind of persistent storage is your raspbian running from?
    – Seth
    Commented May 22, 2019 at 8:05
  • It is a 32 GB SanDisk SD card. Free space, approx 70 %.
    – Hauns TM
    Commented May 22, 2019 at 8:47
  • What's the class of the card? Maybe the loading speed is just slow and your example would indicate the file is being kept in RAM so successive requests are fast until it's unloaded.
    – Seth
    Commented May 22, 2019 at 9:22
  • It's a Sandisk Ultra Micro-SD-card 32 GB. From what I understand the class is Application Performance Class A1. Is it really possible that this could affect my application that much? It's by no means a complicated application with heavy disc I/O?
    – Hauns TM
    Commented May 22, 2019 at 11:10
  • 1
    Depending on file organization, health of the card and reader and so on it might have an impact. The A1 defines IOPS but not the actual class of a card. If you deem 7s a long time, taking half a second/a second to load a file from disk would be a long time. It's unkown what other files your site is loading or what it might be doing in terms of computation. If you do have faster access on successive hits caching and what kind of caching is happening would be something to look into. The initial delay might be because resources need to be loaded.
    – Seth
    Commented May 22, 2019 at 12:19

0

You must log in to answer this question.

Browse other questions tagged .