diff --git a/content/post/2017-11.md b/content/post/2017-11.md index 6f17dfbe1..1ec7f75c8 100644 --- a/content/post/2017-11.md +++ b/content/post/2017-11.md @@ -830,3 +830,24 @@ $ grep 70.32.83.92 dspace.log.2017-11-23 | grep -o -E 'session_id=[A-Z0-9]{32}' - I came across some interesting PostgreSQL tuning advice for SSDs: https://amplitude.engineering/how-a-single-postgresql-config-change-improved-slow-query-performance-by-50x-85593b8991b0 - Apparently setting `random_page_cost` to 1 is "common" advice for systems running PostgreSQL on SSD (the default is 4) - So I deployed this on DSpace Test and will check the Munin PostgreSQL graphs in a few days to see if anything changes + +## 2017-11-24 + +- It's too early to tell for sure, but after I made the `random_page_cost` change on DSpace Test's PostgreSQL yesterday the number of connections dropped drastically: + +![PostgreSQL connections after tweak (week)](/cgspace-notes/2017/11/postgres-connections-week.png) + +- There have been other temporary drops before, but if I look at the past month and actually the whole year, the trend is that connections are four or five times higher on average: + +![PostgreSQL connections after tweak (month)](/cgspace-notes/2017/11/postgres-connections-month.png) + +- I just realized that we're not logging access requests to other vhosts on CGSpace, so it's possible I have no idea that we're getting slammed at 4AM on another domain that we're just silently redirecting to cgspace.cgiar.org +- I've enabled logging on the CGIAR Library on CGSpace so I can check to see if there are many requests there +- In just a few seconds I already see a dozen requests from Googlebot (of course they get HTTP 301 redirects to cgspace.cgiar.org) +- I also noticed that CGNET appears to be monitoring the old domain every few minutes: + +``` +192.156.137.184 - - [24/Nov/2017:20:33:58 +0000] "HEAD / HTTP/1.1" 301 0 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.27.1 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" +``` + +- I should probably tell CGIAR people to have CGNET stop that diff --git a/public/2017-11/index.html b/public/2017-11/index.html index 681673dd8..e8a86b33c 100644 --- a/public/2017-11/index.html +++ b/public/2017-11/index.html @@ -38,7 +38,7 @@ COPY 54701 - + @@ -86,9 +86,9 @@ COPY 54701 "@type": "BlogPosting", "headline": "November, 2017", "url": "https://alanorth.github.io/cgspace-notes/2017-11/", - "wordCount": "4849", + "wordCount": "5032", "datePublished": "2017-11-02T09:37:54+02:00", - "dateModified": "2017-11-23T17:18:45+02:00", + "dateModified": "2017-11-24T00:59:11+02:00", "author": { "@type": "Person", "name": "Alan Orth" @@ -1080,6 +1080,34 @@ $ grep -c com.atmire.utils.UpdateSolrStatsMetadata dspace.log.2017-11-19
  • So I deployed this on DSpace Test and will check the Munin PostgreSQL graphs in a few days to see if anything changes
  • +

    2017-11-24

    + + + +

    PostgreSQL connections after tweak (week)

    + + + +

    PostgreSQL connections after tweak (month)

    + + + +
    192.156.137.184 - - [24/Nov/2017:20:33:58 +0000] "HEAD / HTTP/1.1" 301 0 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.27.1 zlib/1.2.3 libidn/1.18 libssh2/1.4.2"
    +
    + + + diff --git a/public/2017/11/postgres-connections-month.png b/public/2017/11/postgres-connections-month.png new file mode 100644 index 000000000..a7e533174 Binary files /dev/null and b/public/2017/11/postgres-connections-month.png differ diff --git a/public/2017/11/postgres-connections-week.png b/public/2017/11/postgres-connections-week.png new file mode 100644 index 000000000..626b3f204 Binary files /dev/null and b/public/2017/11/postgres-connections-week.png differ diff --git a/public/sitemap.xml b/public/sitemap.xml index 6e9e92e54..b4e557a80 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -4,7 +4,7 @@ https://alanorth.github.io/cgspace-notes/2017-11/ - 2017-11-23T17:18:45+02:00 + 2017-11-24T00:59:11+02:00 @@ -134,7 +134,7 @@ https://alanorth.github.io/cgspace-notes/ - 2017-11-23T17:18:45+02:00 + 2017-11-24T00:59:11+02:00 0 @@ -145,7 +145,7 @@ https://alanorth.github.io/cgspace-notes/tags/notes/ - 2017-11-23T17:18:45+02:00 + 2017-11-24T00:59:11+02:00 0 @@ -157,13 +157,13 @@ https://alanorth.github.io/cgspace-notes/post/ - 2017-11-23T17:18:45+02:00 + 2017-11-24T00:59:11+02:00 0 https://alanorth.github.io/cgspace-notes/tags/ - 2017-11-23T17:18:45+02:00 + 2017-11-24T00:59:11+02:00 0 diff --git a/static/2017/11/postgres-connections-month.png b/static/2017/11/postgres-connections-month.png new file mode 100644 index 000000000..a7e533174 Binary files /dev/null and b/static/2017/11/postgres-connections-month.png differ diff --git a/static/2017/11/postgres-connections-week.png b/static/2017/11/postgres-connections-week.png new file mode 100644 index 000000000..626b3f204 Binary files /dev/null and b/static/2017/11/postgres-connections-week.png differ