Preskoči na sadržaj
Korištenjem servisa na Twitteru pristajete na korištenje kolačića. Twitter i partneri rade globalno te koriste kolačiće za analize, personalizaciju i oglase.

Za najbolje sučelje na Twitteru koristite Microsoft Edge ili instalirajte aplikaciju Twitter iz trgovine Microsoft Store.

  • Naslovnica Naslovnica Naslovnica, trenutna stranica.
  • O Twitteru

Spremljena pretraživanja

  • obriši
  • U ovom razgovoru
    Ovjeren akauntZaštićeni tweetovi @
Predloženi korisnici
  • Ovjeren akauntZaštićeni tweetovi @
  • Ovjeren akauntZaštićeni tweetovi @
  • Jezik: Hrvatski
    • Bahasa Indonesia
    • Bahasa Melayu
    • Català
    • Čeština
    • Dansk
    • Deutsch
    • English
    • English UK
    • Español
    • Filipino
    • Français
    • Italiano
    • Magyar
    • Nederlands
    • Norsk
    • Polski
    • Português
    • Română
    • Slovenčina
    • Suomi
    • Svenska
    • Tiếng Việt
    • Türkçe
    • Български език
    • Русский
    • Српски
    • Українська мова
    • Ελληνικά
    • עִבְרִית
    • العربية
    • فارسی
    • मराठी
    • हिन्दी
    • বাংলা
    • ગુજરાતી
    • தமிழ்
    • ಕನ್ನಡ
    • ภาษาไทย
    • 한국어
    • 日本語
    • 简体中文
    • 繁體中文
  • Imate račun? Prijava
    Imate račun?
    · Zaboravili ste lozinku?

    Novi ste na Twitteru?
    Registrirajte se
Profil korisnika/ce felixge
Felix Geisendörfer
Felix Geisendörfer
Felix Geisendörfer
@felixge

Tweets

Felix Geisendörfer

@felixge

PostgreSQL Hegemonist. Go Developer. Eating from the forbidden fruit. In a former life: Started @nodecopter and @transloadit. Contributed a lot to @nodejs.

Berlin
felixge.de
Vrijeme pridruživanja: listopad 2007.

Tweets

  • © 2020 Twitter
  • O Twitteru
  • Centar za pomoć
  • Uvjeti
  • Pravila o privatnosti
  • Imprint
  • Kolačići
  • Informacije o oglasima
Odbaci
Prethodni
Sljedeće

Idite na profil osobe

Spremljena pretraživanja

  • obriši
  • U ovom razgovoru
    Ovjeren akauntZaštićeni tweetovi @
Predloženi korisnici
  • Ovjeren akauntZaštićeni tweetovi @
  • Ovjeren akauntZaštićeni tweetovi @

Odjava

Blokiraj

  • Objavi Tweet s lokacijom

    U tweetove putem weba ili aplikacija drugih proizvođača možete dodati podatke o lokaciji, kao što su grad ili točna lokacija. Povijest lokacija tweetova uvijek možete izbrisati. Saznajte više

    Vaši popisi

    Izradi novi popis


    Manje od 100 znakova, neobavezno

    Privatnost

    Kopiraj vezu u tweet

    Ugradi ovaj Tweet

    Embed this Video

    Dodajte ovaj Tweet na svoje web-mjesto kopiranjem koda u nastavku. Saznajte više

    Dodajte ovaj videozapis na svoje web-mjesto kopiranjem koda u nastavku. Saznajte više

    Hm, došlo je do problema prilikom povezivanja s poslužiteljem.

    Integracijom Twitterova sadržaja u svoje web-mjesto ili aplikaciju prihvaćate Twitterov Ugovor za programere i Pravila za programere.

    Pregled

    Razlog prikaza oglasa

    Prijavi se na Twitter

    · Zaboravili ste lozinku?
    Nemate račun? Registrirajte se »

    Prijavite se na Twitter

    Niste na Twitteru? Registrirajte se, uključite se u stvari koje vas zanimaju, i dobivajte promjene čim se dogode.

    Registrirajte se
    Imate račun? Prijava »

    Dvosmjerni (slanje i primanje) kratki kodovi:

    Država Kod Samo za korisnike
    Sjedinjene Američke Države 40404 (bilo koje)
    Kanada 21212 (bilo koje)
    Ujedinjeno Kraljevstvo 86444 Vodafone, Orange, 3, O2
    Brazil 40404 Nextel, TIM
    Haiti 40404 Digicel, Voila
    Irska 51210 Vodafone, O2
    Indija 53000 Bharti Airtel, Videocon, Reliance
    Indonezija 89887 AXIS, 3, Telkomsel, Indosat, XL Axiata
    Italija 4880804 Wind
    3424486444 Vodafone
    » Pogledajte SMS kratke šifre za druge zemlje

    Potvrda

     

    Dobro došli kući!

    Vremenska crta mjesto je na kojem ćete provesti najviše vremena i bez odgode dobivati novosti o svemu što vam je važno.

    Tweetovi vam ne valjaju?

    Prijeđite pokazivačem preko slike profila pa kliknite gumb Pratim da biste prestali pratiti neki račun.

    Kažite mnogo uz malo riječi

    Kada vidite Tweet koji volite, dodirnite srce – to osobi koja ga je napisala daje do znanja da vam se sviđa.

    Proširite glas

    Najbolji je način da podijelite nečiji Tweet s osobama koje vas prate prosljeđivanje. Dodirnite ikonu da biste smjesta poslali.

    Pridruži se razgovoru

    Pomoću odgovora dodajte sve što mislite o nekom tweetu. Pronađite temu koja vam je važna i uključite se.

    Saznajte najnovije vijesti

    Bez odgode pogledajte o čemu ljudi razgovaraju.

    Pratite više onoga što vam se sviđa

    Pratite više računa da biste dobivali novosti o temama do kojih vam je stalo.

    Saznajte što se događa

    Bez odgode pogledajte najnovije razgovore o bilo kojoj temi.

    Ne propustite nijedan aktualni događaj

    Bez odgode pratite kako se razvijaju događaji koje pratite.

    Felix Geisendörfer‏ @felixge 26. sij
    • Prijavi Tweet

    1) Are you using #postgres via #docker for mac? Have you ever noticed `EXPLAIN ANALYZE` slowing down your queries by like 60x? Let's dig into some #postgres and #linux internals to figure out what's going on!pic.twitter.com/X4GFgJrcof

    An accessible version of this thread is available at https://github.com/felixge/tweets/tree/master/postgres-docker-explain-analyze
    11:17 - 26. sij 2020.
    • 197 proslijeđenih tweetova
    • 469 oznaka „sviđa mi se”
    • Martin Fris Adrien Brault-Lesage Kostya Esmukov Matti Kerttula Gábor Egyed Astrid Junkmann Phillip Haydon Slava Markevich Peter Zaitsev
    5 replies 197 proslijeđenih tweetova 469 korisnika označava da im se sviđa
      1. Novi razgovor
      2. Felix Geisendörfer‏ @felixge 26. sij
        • Prijavi Tweet

        1b) This thread is also available on GitHub:https://github.com/felixge/tweets/tree/master/postgres-docker-explain-analyze …

        1 reply 2 proslijeđena tweeta 13 korisnika označava da im se sviđa
        Prikaži ovu nit
      3. Felix Geisendörfer‏ @felixge 26. sij
        • Prijavi Tweet

        2) First we need some understanding of how `EXPLAIN ANALYZE` works. Looking through the PostgreSQL code, it basically boils down to: start = clock_gettime() row = node.nextRow() node.time += clock_gettime() - start return rowpic.twitter.com/KHDkbRlaKE

        1 reply 1 proslijeđeni tweet 8 korisnika označava da im se sviđa
        Prikaži ovu nit
      4. Felix Geisendörfer‏ @felixge 26. sij
        • Prijavi Tweet

        3) So at this point we could conclude that PostgreSQL is making 20K system calls to `clock_gettime` here, and that is slow on docker for mac for some reason. But that's kinda lame, so let's dig deeper.

        1 reply 1 proslijeđeni tweet 6 korisnika označava da im se sviđa
        Prikaži ovu nit
      5. Felix Geisendörfer‏ @felixge 26. sij
        • Prijavi Tweet

        4) First, let's establish if `clock_gettime` is really the culprit by running `pg_test_timing` that comes with PostgreSQL inside of a docker container. Holy latency docker, at 6853 ns per call, our 20K calls will take 136 ms, explaining most of the overhead we're seeing.pic.twitter.com/R7h1zuiPXz

        1 reply 0 proslijeđenih tweetova 3 korisnika označavaju da im se sviđa
        Prikaži ovu nit
      6. Felix Geisendörfer‏ @felixge 26. sij
        • Prijavi Tweet

        5) But what kind of latency is reasonable to expect? `pg_test_timing` on my macOS host machine shows 65 ns which is about 100x faster. Docker for mac works by launching a linux vm in the background. Maybe the issue is caused by "vm overhead"?https://github.com/moby/hyperkit 

        1 reply 0 proslijeđenih tweetova 5 korisnika označava da im se sviđa
        Prikaži ovu nit
      7. Felix Geisendörfer‏ @felixge 26. sij
        • Prijavi Tweet

        6) Let's compare VM overhead with a VirtualBox running Ubuntu 18.04. Most `EXPLAIN ANALYZE` overhead is gone, and `clock_gettime` latency of 33ns is 2x better than on our host machine . That doesn't make sense, or does it? 😮pic.twitter.com/WonVn3RrMf

        1 reply 0 proslijeđenih tweetova 2 korisnika označavaju da im se sviđa
        Prikaži ovu nit
      8. Felix Geisendörfer‏ @felixge 26. sij
        • Prijavi Tweet

        7) Time for a sanity check. Are we really calling the `clock_gettime` call 20K for our query above? Let's do some syscall counting using perf: sudo perf stat -e 'syscalls:sys_enter_clock_*' -p <backend_pid> This tells us that 0 `clock_gettime` calls were made. Whaaat?pic.twitter.com/gVT3NtdycR

        1 reply 0 proslijeđenih tweetova 4 korisnika označavaju da im se sviđa
        Prikaži ovu nit
      9. Felix Geisendörfer‏ @felixge 26. sij
        • Prijavi Tweet

        8) How about `pg_test_timing`, surely that will make some syscalls? sudo perf stat -e 'syscalls:sys_enter_clock_*' $(which pg_test_timing) Nope, still no syscalls. Computer stuff is hard 😩pic.twitter.com/WlQLBCoUaL

        1 reply 0 proslijeđenih tweetova 4 korisnika označavaju da im se sviđa
        Prikaži ovu nit
      10. Felix Geisendörfer‏ @felixge 26. sij
        • Prijavi Tweet

        9) It's time to get out some bigger guns. Let's disassemble InstrStartNode using gdb to check if we're actually making a syscall. callq 0xafc10 <clock_gettime@plt> The `@plt` stands for Procedure Linkage Table, which means we're calling into libc!pic.twitter.com/d2RU8RVlKE

        1 reply 0 proslijeđenih tweetova 5 korisnika označava da im se sviđa
        Prikaži ovu nit
      11. Felix Geisendörfer‏ @felixge 26. sij
        • Prijavi Tweet

        10) Let's verify this real quick with some dynamic tracing. sudo perf probe -x /lib/x86_64-linux-gnu/libc.so.6 'clock_gettime' sudo perf stat -e 'probe_libc:clock_gettime' -p <backend_pid> 20016 calls to libc's clock_gettime. We're also seeing some tracing overhead now.pic.twitter.com/WgbKXzyrhs

        1 reply 0 proslijeđenih tweetova 3 korisnika označavaju da im se sviđa
        Prikaži ovu nit
      12. Felix Geisendörfer‏ @felixge 26. sij
        • Prijavi Tweet

        11) After this I continued stumbling forward with gdb and reading the libc source until I found references to VDSO which is an optimization that avoids syscalls. ... or you could be smart and just RTFM instead: man 2 clock_gettime man 7 vdsopic.twitter.com/czDDZ25IcR

        1 reply 0 proslijeđenih tweetova 5 korisnika označava da im se sviđa
        Prikaži ovu nit
      13. Felix Geisendörfer‏ @felixge 26. sij
        • Prijavi Tweet

        12) So let's go back to our original problem. Why is `clock_gettime` slow on docker for mac? It seems that it's time drift issues that can change the clocksource. docker run --privileged -it postgres dmesg | egrep '(tsc|hpet)' https://benchling.engineering/analyzing-performance-analysis-performance-56cb2e212629 …pic.twitter.com/5Y5KxM6lfn

        1 reply 0 proslijeđenih tweetova 4 korisnika označavaju da im se sviđa
        Prikaži ovu nit
      14. Felix Geisendörfer‏ @felixge 26. sij
        • Prijavi Tweet

        13) And according to the maintainer for Linux vDSO, the hpet clocksource is so aweful that he disabled vDSO HPET support entirely. https://news.ycombinator.com/item?id=16925602 …

        1 reply 0 proslijeđenih tweetova 4 korisnika označavaju da im se sviđa
        Prikaži ovu nit
      15. Felix Geisendörfer‏ @felixge 26. sij
        • Prijavi Tweet

        14) So the root cause seems to be the time sync mechanism used by docker for mac which has been redone in 18.05.https://www.docker.com/blog/addressing-time-drift-in-docker-desktop-for-mac/ …

        1 reply 0 proslijeđenih tweetova 1 korisnik označava da mu se sviđa
        Prikaži ovu nit
      16. Felix Geisendörfer‏ @felixge 26. sij
        • Prijavi Tweet

        15) However, it still seems to be buggy, especially when sleep is involved. Unfortunately GH issues for it don't seem to be getting much attention, despite this bug impacting lot of applications. Here is a report of PHP requests being slowed down by 3x:https://github.com/docker/for-mac/issues/2747 …

        1 reply 0 proslijeđenih tweetova 5 korisnika označava da im se sviđa
        Prikaži ovu nit
      17. Felix Geisendörfer‏ @felixge 26. sij
        • Prijavi Tweet

        16) And once you start to google around a little more, you realize that clocksource related issues disabling VDSO has also heavily impacted cloud vendors such as AWS in the past.https://blog.packagecloud.io/eng/2017/03/08/system-calls-are-much-slower-on-ec2/ …

        0 proslijeđenih tweetova 5 korisnika označava da im se sviđa
        Prikaži ovu nit
      18. Felix Geisendörfer‏ @felixge 26. sij
        • Prijavi Tweet

        17) So what can you do? One workaround seems to be to restart docker for mac, but usually it's just a matter of time before the clocksource issue will hit you again. In my team at work we've agreed to always use PostgreSQL on macOS directly when doing performance related work.

        1 proslijeđeni tweet 8 korisnika označava da im se sviđa
        Prikaži ovu nit
      19. Felix Geisendörfer‏ @felixge 26. sij
        • Prijavi Tweet

        18) Either way, the important takeaway is that our modern stacks are incredibly complex and fragile. As an application developer, you will probably not be able to master this complexity. But you will be asked to explain why your stuff is slow.

        1 reply 4 proslijeđena tweeta 28 korisnika označava da im se sviđa
        Prikaži ovu nit
      20. Felix Geisendörfer‏ @felixge 26. sij
        • Prijavi Tweet

        19) So invest in your debugging skills. Learn enough C to be able to read it, enough gdb to set some breakpoints, and enough perf tools to trace syscalls and function calls. And soon enough, even the most daunting PostgreSQL performance mysteries will reveal themselves.

        1 reply 7 proslijeđenih tweetova 26 korisnika označava da im se sviđa
        Prikaži ovu nit
      21. Felix Geisendörfer‏ @felixge 26. sij
        • Prijavi Tweet

        20) If you made it so far and love working with #postgresql and/or #golang, my team at Apple  is hiring Backend and DevOps engineers in #shanghai. We support relocation, and my DMs are open for any questions! https://jobs.apple.com/en-us/details/200122427/backend-software-developer-manufacturing-design-systems …

        6 proslijeđenih tweetova 33 korisnika označavaju da im se sviđa
        Prikaži ovu nit
      22. Felix Geisendörfer‏ @felixge 27. sij
        • Prijavi Tweet

        Felix Geisendörfer je proslijedio/a tweet korisnika/ceFelix Geisendörfer

        I've also added some more information about our roles in this thread over here:https://twitter.com/felixge/status/1221718705094250498 …

        Felix Geisendörfer je dodan/na,

        Felix Geisendörfer @felixge
        While I still have you attention, I'd like to tell you more about the job opportunities with my team at  in #shanghai. We're a very small team having a large impact on everything  is manufacturing. We use #golang, #postgresql, #linux, #ansible and try to build good systems! https://twitter.com/felixge/status/1221512689891061765 …
        Prikaži ovu nit
        1 reply 0 proslijeđenih tweetova 5 korisnika označava da im se sviđa
        Prikaži ovu nit
      23. Kraj razgovora

    Čini se da učitavanje traje već neko vrijeme.

    Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.

      Sponzorirani tweet

      false

      • © 2020 Twitter
      • O Twitteru
      • Centar za pomoć
      • Uvjeti
      • Pravila o privatnosti
      • Imprint
      • Kolačići
      • Informacije o oglasima