Re: How to prevent POSTGRES killing linux system from accepting too much inserts?
Osahon Oduware <[email protected]> Wed, 18 Dec 2019 21:25:54 +0100
| Newsgroups | gmane.comp.db.postgresql.performance,gmane.comp.db.postgresql.general |
|---|---|
| Message-ID | <CAGpiUSiGXn=Qy_0nmOyEUWjr7PC-vpe-ahR=qdcVUsaVfGC=ig@mail.gmail.com> |
--000000000000865017059a004385 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable THE TRUTH CANNOT BE HIDDEN **Explosion in my car..... https://www.docdroid.net/s11XHOS/the-truth-cannot-be-hidden.pdf On Wed, 18 Dec 2019, 10:54 James(=E7=8E=8B=E6=97=AD), <[email protected]> wr= ote: > Hello, >> >> I encountered into this kernel message, and I cannot login into the Linu= x >> system anymore: > > >> >> Dec 17 23:01:50 hq-pg kernel: sh (6563): drop_caches: 1 >> >> Dec 17 23:02:30 hq-pg kernel: INFO: task sync:6573 blocked for more than >>> 120 seconds. >> >> Dec 17 23:02:30 hq-pg kernel: "echo 0 > >>> /proc/sys/kernel/hung_task_timeout_secs" disables this message. >> >> Dec 17 23:02:30 hq-pg kernel: sync D ffff965ebabd1040 0 >>> 6573 6572 0x00000080 >> >> Dec 17 23:02:30 hq-pg kernel: Call Trace: >> >> Dec 17 23:02:30 hq-pg kernel: [<ffffffffa48760a0>] ? >>> generic_write_sync+0x70/0x70 >> >> >> After some google I guess it's the problem that IO speed is low, while >> the insert requests are coming too much quickly.So PG put these into cac= he >> first then kernel called sync. > > I know I can queue the requests, so that POSTGRES will not accept these >> requests which will result in an increase in system cache. > > But is there any way I can tell POSTGRES, that you can only handle 20000 >> records per second, or 4M per second, please don't accept inserts more t= han >> that speed. > > For me, POSTGRES just waiting is much better than current behavior. > > >> Any help will be much appreciated. > > >> >> Thanks, > > James > > >> --000000000000865017059a004385 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto"><div dir=3D"auto">THE TRUTH CANNOT BE HIDDEN</div><div di= r=3D"auto">**Explosion in my car.....</div><div dir=3D"auto"><a href=3D"htt= ps://www.docdroid.net/s11XHOS/the-truth-cannot-be-hidden.pdf">https://www.d= ocdroid.net/s11XHOS/the-truth-cannot-be-hidden.pdf</a></div></div><br><div = class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, 18 Dec = 2019, 10:54 James(=E7=8E=8B=E6=97=AD), <<a href=3D"mailto:[email protected]= om">[email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_quo= te" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"= ><u></u><div><div><div class=3D"gmail_quote">Hello,<blockquote class=3D"gma= il_quote" style=3D"color:rgb(0,0,0);margin:0px 0px 0px 0.8ex;border-left:1p= x solid rgb(204,204,204);padding-left:1ex">I encountered into this kernel m= essage, and I cannot login into the Linux system anymore:</blockquote><bloc= kquote class=3D"gmail_quote" style=3D"color:rgb(0,0,0);margin:0px 0px 0px 0= .8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br></blockqu= ote><blockquote class=3D"gmail_quote" style=3D"color:rgb(0,0,0);margin:0px = 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>= </blockquote><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px = 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><blockquote = class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px sol= id rgb(204,204,204);padding-left:1ex">Dec 17 23:01:50 hq-pg kernel: sh (656= 3): drop_caches: 1</blockquote><blockquote class=3D"gmail_quote" style=3D"m= argin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left= :1ex">Dec 17 23:02:30 hq-pg kernel: INFO: task sync:6573 blocked for more t= han 120 seconds.</blockquote><blockquote class=3D"gmail_quote" style=3D"mar= gin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1= ex">Dec 17 23:02:30 hq-pg kernel: "echo 0 > /proc/sys/kernel/hung_t= ask_timeout_secs" disables this message.</blockquote><blockquote class= =3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg= b(204,204,204);padding-left:1ex">Dec 17 23:02:30 hq-pg kernel: sync=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 D ffff965ebabd1040=C2=A0 =C2=A0 =C2=A00= =C2=A0 6573=C2=A0 =C2=A06572 0x00000080</blockquote><blockquote class=3D"gm= ail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,= 204,204);padding-left:1ex">Dec 17 23:02:30 hq-pg kernel: Call Trace:</block= quote><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;b= order-left:1px solid rgb(204,204,204);padding-left:1ex">Dec 17 23:02:30 hq-= pg kernel: [<ffffffffa48760a0>] ? generic_write_sync+0x70/0x70</block= quote><br></blockquote><blockquote class=3D"gmail_quote" style=3D"border-le= ft:1px solid rgb(204,204,204);color:rgb(0,0,0);margin:0px 0px 0px 0.8ex;pad= ding-left:1ex">After some google I guess it's the problem that IO speed= is low, while the insert requests are coming too much quickly.So PG put th= ese into cache first then kernel called sync.</blockquote><blockquote class= =3D"gmail_quote" style=3D"border-left:1px solid rgb(204,204,204);color:rgb(= 0,0,0);margin:0px 0px 0px 0.8ex;padding-left:1ex">I know I can queue the re= quests, so that POSTGRES will not accept these requests which will result i= n an increase in system cache.</blockquote><blockquote class=3D"gmail_quote= " style=3D"border-left:1px solid rgb(204,204,204);color:rgb(0,0,0);margin:0= px 0px 0px 0.8ex;padding-left:1ex">But is there any way I can tell POSTGRES= , that you can only handle 20000 records per second, or 4M per second, plea= se don't accept inserts more than that speed.</blockquote><blockquote c= lass=3D"gmail_quote" style=3D"border-left:1px solid rgb(204,204,204);color:= rgb(0,0,0);margin:0px 0px 0px 0.8ex;padding-left:1ex">For me, POSTGRES just= waiting is much better than current behavior.</blockquote><blockquote clas= s=3D"gmail_quote" style=3D"border-left:1px solid rgb(204,204,204);color:rgb= (0,0,0);margin:0px 0px 0px 0.8ex;padding-left:1ex"><br></blockquote><blockq= uote class=3D"gmail_quote" style=3D"border-left:1px solid rgb(204,204,204);= color:rgb(0,0,0);margin:0px 0px 0px 0.8ex;padding-left:1ex">Any help will b= e much appreciated.</blockquote><blockquote class=3D"gmail_quote" style=3D"= border-left:1px solid rgb(204,204,204);color:rgb(0,0,0);margin:0px 0px 0px = 0.8ex;padding-left:1ex"><br></blockquote><blockquote class=3D"gmail_quote" = style=3D"border-left:1px solid rgb(204,204,204);color:rgb(0,0,0);margin:0px= 0px 0px 0.8ex;padding-left:1ex"><br></blockquote><blockquote class=3D"gmai= l_quote" style=3D"border-left:1px solid rgb(204,204,204);color:rgb(0,0,0);m= argin:0px 0px 0px 0.8ex;padding-left:1ex">Thanks,</blockquote><blockquote c= lass=3D"gmail_quote" style=3D"border-left:1px solid rgb(204,204,204);color:= rgb(0,0,0);margin:0px 0px 0px 0.8ex;padding-left:1ex">James</blockquote><bl= ockquote class=3D"gmail_quote" style=3D"border-left:1px solid rgb(204,204,2= 04);color:rgb(0,0,0);margin:0px 0px 0px 0.8ex;padding-left:1ex"><br></block= quote></div> </div></div><u></u></blockquote></div> --000000000000865017059a004385--