Hi Andrew! I am glad it helped somewhat.
Did you look into pm2? If so, did you set number of instances? I recommend using less than number of CPUs you have, so that some CPUs are available for backend, solr, database and perhaps other necessary processes. I used 7 instances when I had 10 CPUs and it worked quite fine. If you do not set this parameter, it will always take as many CPUs as available, which is certainly not ideal. Based on my understanding, once the page loads, it runs in your browser. Only when you refresh, open it on new window (or for some other reason download the whole page from server) is it slow. When it is downloaded and runs in browser, it only executes some calls to backend, which is fast. This would agree with your observations. Best regards, Majo On Tue, Nov 14, 2023 at 6:03 PM Andrew K <[email protected]> wrote: > Dear Majo! > > Thanks a lot for your reply! > > It clears a lot: DSpace 7 needs a lot of CPU power. > > Yes, I was really desperate because I spent a lot of time (not without > interest and pleasure, though) setting up the new server. And our current > hosting provider has pretty slow VDS: CPU about 2GHz, slow disk etc. But > it's affordable and we already use it. Switching to a different one is a > huge PITA. On the other hand, we need VDS because the power outages > expected in winter, so it is going to be hard to keep our local servers > powered 24/7. > > So, what I did first is increased the VDS's number of CPU cores from 4 to > 8. And it helped significantly. The server is more stable, the response > times shortened. The server load is usually <1 instead of ~1.5. Now the > server (more or less) works. > But still, it happens to throw error pages. Sometines Apache proxy says it > received no data. And the page loading in a new browser tab is always > delayed. On the other hand, within one tab all possible links work fast. > About the anonymousCache, I tried setting it to 100. But there were errors > too often. So I turned it off. Less errors. Now I set it to 20. Works so > far... > > Also, PageSpeed Insights show pretty awful results, Speed Index about 5s > for desktop. But at least it shows something, the server barely responded > before. > I just tested a few other DSpace 7 repos with PageSpeed Insights, and they > all show low efficiency and high First Contentful Paint time. > > So, what I can and plan to do is increase the number of cores to 12. That > should speed it up a little more. > Then I suppose we all should wait for DSpace to get more optimized ) > > Thanks again! > > Best regards, > Andrew > > > > > > вівторок, 14 листопада 2023 р. о 09:50:36 UTC+2 dataquest пише: > >> Dear Andrew. >> >> I faced similar problems when we deployed our first instance of DSpace >> and I >> was also quite confused so as to what is wrong. >> >> Perhaps most important question is, if you are using pm2 with several >> nodes. >> When I was deploying it, performance did mention it, but we weren't using >> it at first. >> You certainly need it (pm2 starts several nodes, so frontend is served >> from >> multiple threads, not just one). >> >> Also having anonymousCache set to 0 is probably the issue. I tuned it for >> some time, >> but certainly use at least 10, so that some requests are much faster and >> your server >> does not get clogged up, therefore slowing every load. >> >> If you needed to set it to 0 in order for everything to work, there must >> be some other, >> worse problem. Perhaps insufficient memory? >> >> Also, your server spec seem to be too low. It seems SSR requires much >> "bigger" server. >> We are using 15 cores, 32GB RAM and it is about fine (10 cores were ok, >> but not when >> there were long imports of many items running etc.) Yes, it requires much >> more resources >> than previous versions, but that simply seems to be the case... >> >> I am no expert, so far I only deployed one instance, but I learned a lot >> with it, at least >> compared to what I knew before. (If I wrote anything inaccurate I am >> sorry, anybody >> that knows better, please correct me.) But I know I was quite desperate >> and I hope >> this can help you a bit. >> >> To reiterate, most important things (in my opinion) are: >> 1. Make sure you are using pm2, without it it will hardly ever work well >> (and fast enough) >> 2. I suppose your server specs are insufficient. >> >> >> Best regards, >> Majo >> >> On Mon, Nov 13, 2023 at 9:43 PM Andrew K <[email protected]> wrote: >> >>> OK, I suddenly realized that DSpace log works only when I run scripts >>> like index-discovery, filter-media etc. Nothing on the web activity >>> >>> So, the latest description of the problem: >>> Any page loads for a very long time, like 30s. But when it's loaded, the >>> navigation works pretty fast within the browser tab: search, collections, >>> statistics. >>> Reloading or opening a link in a new tab causes very slow loading again. >>> Please help me figure it out >>> >>> -- >>> All messages to this mailing list should adhere to the Code of Conduct: >>> https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "DSpace Technical Support" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> >> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/dspace-tech/a72cafa0-be53-42a0-adf1-7bcc3eb204d6n%40googlegroups.com >>> <https://groups.google.com/d/msgid/dspace-tech/a72cafa0-be53-42a0-adf1-7bcc3eb204d6n%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- > All messages to this mailing list should adhere to the Code of Conduct: > https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx > --- > You received this message because you are subscribed to the Google Groups > "DSpace Technical Support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/dspace-tech/f7d45f75-bb0d-434c-a472-956a899edae5n%40googlegroups.com > <https://groups.google.com/d/msgid/dspace-tech/f7d45f75-bb0d-434c-a472-956a899edae5n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/CAJ98do4xRR8raAdpURjAMDLNK15pkXeeQfgMMpAJ-nHatb5NjA%40mail.gmail.com.
