主頁 > 資料庫 > [20221018]本地運行與遠程運行.txt

[20221018]本地運行與遠程運行.txt

2022-10-21 09:57:31 資料庫

[20221018]本地運行與遠程運行.txt

--//鏈接http://blog.tanelpoder.com/2008/02/05/oracle-hidden-costs-revealed-part-1/.
--//里面提到一個問題本地運行與遠程運行,oracle性能存在怎么區別,理論講如果不考慮網路傳輸,兩組差別不大.
--//因為Oracle是一個客戶端服務器資料庫系統,所有的執行都是在本地執行的,而不管客戶機的位置如何,因此性能是相同的,
--//作者給出一個例子,說明一些區別:

1.環境:
SCOTT@book> @ ver1
PORT_STRING                    VERSION        BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx            11.2.0.4.0     Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

2.分別從widnows客戶端以及linux服務端測驗看看.
--//注:lotslios.sql 來自 tpt 里面的測驗腳本.
--//測驗在本地服務器.
SCOTT@book> @spid
       SID    SERIAL# PROCESS                  SERVER    SPID       PID  P_SERIAL# C50
---------- ---------- ------------------------ --------- ------ ------- ---------- --------------------------------------------------
        36      45801 14705                    DEDICATED 14706       26        206 alter system kill session '36,45801' immediate;

SCOTT@book> set timing on
SCOTT@book> @lotslios 1e8
generate lots of LIOs by repeatedly full scanning through a small table...
  COUNT(*)
----------
 100000000
Elapsed: 00:00:08.11
--//注:@lotslios 1e5根本測驗不出來.

--//測驗在客戶端windows:
SCOTT@78> @spid
       SID    SERIAL# PROCESS                  SERVER    SPID                     PID  P_SERIAL# C50
---------- ---------- ------------------------ --------- -------------------- ------- ---------- --------------------------------------------------
        53      44367 4476:8736                DEDICATED 14714                     27        144 alter system kill session '53,44367' immediate;

SCOTT@78>  set timing on
SCOTT@78> @tpt/lotslios 1e8
generate lots of LIOs by repeatedly full scanning through a small table...
  COUNT(*)
----------
 100000000
Elapsed: 00:00:10.40

--//你可以運行多次,都是windows下測驗時間大于在本地服務器的測驗時間.
--//作者通過使用他自己寫Snapper包以及V$SESSTAT,看不出任何差異.
--//使用strace跟蹤(注:作者的服務器solaris,使用truss).
--//測驗在本地服務器,使用strace跟蹤服務端行程.
$ strace -cp 14706
Process 14706 attached - interrupt to quit
^CProcess 14706 detached
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
   nan    0.000000           0         2           read
   nan    0.000000           0         2           write
   nan    0.000000           0        27           getrusage
   nan    0.000000           0        10           times
------ ----------- ----------- --------- --------- ----------------
100.00    0.000000                    41           total

--//測驗在客戶端windows,使用strace跟蹤服務端行程.
$ strace -cp 14714
Process 14714 attached - interrupt to quit
^CProcess 14714 detached
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 96.13    0.024820           0    949593           poll
  3.87    0.001000         500         2           read
  0.00    0.000000           0         2           write
  0.00    0.000000           0        83           getrusage
  0.00    0.000000           0        10           times
------ ----------- ----------- --------- --------- ----------------
100.00    0.025820                949690           total
--//很慢!!我不得按ctrl+c停止strace,你可以發現大量呼叫poll.
--//可以發現測驗在客戶端windows,多了一個poll 系統呼叫,作者測驗平臺solaris,呼叫的是pollsys.

# man -a pool
POLL(2)                    Linux Programmer's Manual                   POLL(2)

NAME
       poll, ppoll - wait for some event on a file descriptor

SYNOPSIS
       #include <poll.h>

       int poll(struct pollfd *fds, nfds_t nfds, int timeout);

       #define _GNU_SOURCE
       #include <poll.h>

       int ppoll(struct pollfd *fds, nfds_t nfds,
               const struct timespec *timeout, const sigset_t *sigmask);


--//轉載:http://blog.tanelpoder.com/2008/02/05/oracle-hidden-costs-revealed-part-1/.
So, there is a big difference in number of pollsys() system calls, depending on which client was used for connecting.
The pollsys syscall is normally used for checking whether there is any data that can be read from a file descriptor (or
whether the file descriptor is ready for receiving more writes). As TCP sockets on Unix are also accessed through file
descriptors, Oracle could be polling the client TCP connection file descriptor… but (without prior knowledge) we can
not be sure.
因此,pollsys()系統呼叫的數量有很大的差異,這取決于用于連接的客戶端,pollsys系統通常用于檢查是否有可以從檔案描述符讀取的
資料(或者檔案描述符是否準備好接收更多的寫操作),由于Unix上的TCP套接字也可以通過檔案描述符訪問,Oracle可以輪詢客戶端TCP連
接檔案描述符…但是(沒有事先知識)我們不能確定,

...

Oracle client server communication normally works in RPC fashion – for example a client sends a command to Oracle and
Oracle doesn't return anything until the command is completed.
Oracle客戶端服務器通信通常以RPC的方式作業——例如,客戶端向Oracle發送一個命令,而Oracle在該命令完成之前不會回傳任何東西


Now if a user tries to cancel their query (using CTRL+C in sqlplus or calling OCIBreak in non-blocking OCI), a cancel
packet is sent to server over TCP. The packet will be stored in the server side receive buffer of OS TCP stack and
becomes available for reading for the server process (via a TCP socket). However if the server process is in a
long-running loop executing a query, it needs to periodically check the TCP receive socket for any outstanding packets.
And this is exactly what the pollsys() system call does.
現在,如果用戶試圖取消他們的查詢(在sqlplus中使用CTRL+C或在非阻塞OCI中呼叫OCIBreak),一個取消資料包將通過TCP發送到服務器
,該資料包將存盤在OS TCP堆疊的服務器端接識訓沖區中,并可為服務器行程讀取(通過TCP套接字),但是,如果服務器行程處于執行查詢
的長時間運行的回圈中,那么它需要定期檢查TCP接收套接字中是否有任何未完成的資料包,這正是pollsys()系統所做的,

This approach for cancelling an operation is called in-band break, as the break packet is sent in-band with all other
traffic. The server process has to be programmed to periodically check for any newly arrived packets, even if it is
already busy working on something else.
這種取消操作的方法稱為in-band break,因為中斷包與所有其他業務一起在帶內發送,服務器行程必須被編程,以定期檢查任何新到達
的資料包,即使它已經在忙于處理其他事情,

There are several functions in Oracle kernel where the developers have put the check for in-band breaks. This means that
in some highly repetitive operations (like nested loop join) the same functions are hit again and again – causing
frequent polling on the TCP socket. And too frequent polling is what causes the peformance degradation.
在Oracle內核中有幾個函式,開發人員可以檢查in-band breaks,這意味著在一些高度重復的操作(如嵌套回圈連接)中,相同的函式會被
反復命中,導致TCP套接字上頻繁輪詢,而過頻繁的輪詢是導致性能下降的原因,

However Oracle network layer has a sqlnet.ora parameter called break_poll_skip, which can help in such situations. This
parameters defines, how many times to just silently skip the TCP socket polling when the nsmore2recv() function is
called. The parameter defaults to 3 in recent versions, which means that only 1 of 3 polls are actually executed ( from
above test case it's seen that for 4 million consistent gets roughly 1/3 = 1.3 million pollsys() calls were executed ).
然而,Oracle網路層有一個名為break_poll_skip的sqlnet.ora引數,這可以在這種情況下提供幫助,此引數定義了當呼叫nsmore2recv()
函式時,只需無聲地跳過TCP套接字輪詢的次數,在最近的版本中,引數默認為3,這意味著實際3個輪詢中只有1個被執行(從上面的測驗
用例可以看出,400萬一致得到大約1/3=130萬個民調系統()呼叫),

--//換成執行lotslios 1e5,再使用strace跟蹤看看.
--//測驗在本地服務器,使用strace跟蹤服務端行程.
$ strace -cp 14706
Process 14706 attached - interrupt to quit
^CProcess 14706 detached
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
   nan    0.000000           0         2           read
   nan    0.000000           0         2           write
   nan    0.000000           0        19           getrusage
   nan    0.000000           0        10           times
------ ----------- ----------- --------- --------- ----------------
100.00    0.000000                    33           total

--//測驗在客戶端windows,使用strace跟蹤服務端行程.
$ strace -cp 14714
Process 14714 attached - interrupt to quit
^CProcess 14714 detached
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
100.00    0.000018           0       897           poll
  0.00    0.000000           0         2           read
  0.00    0.000000           0         2           write
  0.00    0.000000           0        19           getrusage
  0.00    0.000000           0        10           times
------ ----------- ----------- --------- --------- ----------------
100.00    0.000018                   930           total
--//poll=897次.

SCOTT@78> set autot traceonly
SCOTT@78> @tpt/lotslios 1e5
generate lots of LIOs by repeatedly full scanning through a small table...
Elapsed: 00:00:00.06
Execution Plan
---------------------------
Plan hash value: 3691747574
-------------------------------------------------------------------------------
| Id  | Operation              | Name | Rows  | Bytes | Cost (%CPU)| Time     |
-------------------------------------------------------------------------------
|   0 | SELECT STATEMENT       |      |     1 |    12 |    23P  (1)|999:59:59 |
|   1 |  SORT AGGREGATE        |      |     1 |    12 |            |          |
|*  2 |   COUNT STOPKEY        |      |       |       |            |          |
|   3 |    NESTED LOOPS        |      |  2401P|    15E|    23P  (1)|999:59:59 |
|   4 |     NESTED LOOPS       |      |    79T|   650T|   769G  (1)|999:59:59 |
|   5 |      NESTED LOOPS      |      |  2631M|    14G|    25M  (1)| 84:57:18 |
|   6 |       TABLE ACCESS FULL| OBJ$ | 87098 |   255K|   295   (1)| 00:00:04 |
|*  7 |       TABLE ACCESS FULL| OBJ$ | 30210 | 90630 |   293   (1)| 00:00:04 |
|*  8 |      TABLE ACCESS FULL | OBJ$ | 30210 | 90630 |   293   (1)| 00:00:04 |
|*  9 |     TABLE ACCESS FULL  | OBJ$ | 30210 | 90630 |   293   (1)| 00:00:04 |
-------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
   2 - filter(ROWNUM<=1e5)
   7 - filter("A"."OWNER#"="B"."OWNER#")
   8 - filter("B"."OWNER#"="C"."OWNER#")
   9 - filter("C"."OWNER#"="D"."OWNER#")
Statistics
----------------------------------------------------------
          0  recursive calls
          0  db block gets
       2706  consistent gets
          0  physical reads
          0  redo size
        346  bytes sent via SQL*Net to client
        471  bytes received via SQL*Net from client
          2  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
          1  rows processed

--//按照作者介紹break_poll_skip預設3, consistent gets/3 = 2706/3= 902,與跟蹤看到的897接近.
--//順便提一下,不知道作者如何測驗的,@lotslios 10000,consistent gets達到了4089670.或許11.2.0.4執行計劃發生了變化.疑問??
--//因為回傳是count(*),僅僅1行.即使設定arraysize=2 ,邏輯讀我的測驗也是2706
--//可以通過改變break_poll_skip的sqlnet.ora引數,減少poll呼叫.

3.改變break_poll_skip引數在sqlnet.ora檔案中.
--//修改break_poll_skip=10,注意測驗時要重新登錄才生效!!

SCOTT@78> @ spid
       SID    SERIAL# PROCESS                  SERVER    SPID                     PID  P_SERIAL# C50
---------- ---------- ------------------------ --------- -------------------- ------- ---------- --------------------------------------------------
        53      44369 5380:8500                DEDICATED 15041                     27        145 alter system kill session '53,44369' immediate;

SCOTT@78> set timing on
SCOTT@78> @tpt/lotslios 1e5
generate lots of LIOs by repeatedly full scanning through a small table...
  COUNT(*)
----------
    100000

Elapsed: 00:00:00.04

$ strace -cp 15041
Process 15041 attached - interrupt to quit
^CProcess 15041 detached
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
   nan    0.000000           0         2           read
   nan    0.000000           0         2           write
   nan    0.000000           0       269           poll
   nan    0.000000           0        19           getrusage
   nan    0.000000           0        10           times
------ ----------- ----------- --------- --------- ----------------
100.00    0.000000                   302           total
--//2706/10 = 270.6,poll呼叫269,已經非常接近.

SCOTT@78> @tpt/lotslios 1e8
generate lots of LIOs by repeatedly full scanning through a small table...
  COUNT(*)
----------
 100000000
Elapsed: 00:00:09.99
--//比前面10.40快了一點點.

--//修改break_poll_skip=1000
$ grep break sqlnet.ora
break_poll_skip=1000

SCOTT@78> @ spid
       SID    SERIAL# PROCESS                  SERVER    SPID                     PID  P_SERIAL# C50
---------- ---------- ------------------------ --------- -------------------- ------- ---------- --------------------------------------------------
        53      44371 4544:8592                DEDICATED 15081                     27        146 alter system kill session '53,44371' immediate;

SCOTT@78> set timing on
SCOTT@78> @tpt/lotslios 1e8
generate lots of LIOs by repeatedly full scanning through a small table...
  COUNT(*)
----------
 100000000
Elapsed: 00:00:09.65

SCOTT@78> @tpt/lotslios 1e5
generate lots of LIOs by repeatedly full scanning through a small table...
  COUNT(*)
----------
    100000

Elapsed: 00:00:00.04
$ strace -cp 15081
Process 15081 attached - interrupt to quit
^CProcess 15081 detached
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
   nan    0.000000           0         2           read
   nan    0.000000           0         2           write
   nan    0.000000           0         3           poll
   nan    0.000000           0        19           getrusage
   nan    0.000000           0        10           times
------ ----------- ----------- --------- --------- ----------------
100.00    0.000000                    36           total

--//補充測驗@tpt/lotslios 1e8:
SCOTT@78> @tpt/lotslios 1e8
generate lots of LIOs by repeatedly full scanning through a small table...
  COUNT(*)
----------
 100000000
Elapsed: 00:00:09.98

$ strace -cp 15081
Process 15081 attached - interrupt to quit
^CProcess 15081 detached
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
100.00    0.000066           0      2849           poll
  0.00    0.000000           0         2           read
  0.00    0.000000           0         2           write
  0.00    0.000000           0        29           getrusage
  0.00    0.000000           0        10           times
------ ----------- ----------- --------- --------- ----------------
100.00    0.000066                  2892           total

SCOTT@78> set autot traceonly
SCOTT@78> @tpt/lotslios 1e8
SCOTT@78> set autot traceonly
SCOTT@78> @tpt/lotslios 1e8
generate lots of LIOs by repeatedly full scanning through a small table...

Elapsed: 00:00:09.68

Execution Plan
----------------------------------------------------------
Plan hash value: 3691747574

-------------------------------------------------------------------------------
| Id  | Operation              | Name | Rows  | Bytes | Cost (%CPU)| Time     |
-------------------------------------------------------------------------------
|   0 | SELECT STATEMENT       |      |     1 |    12 |    23P  (1)|999:59:59 |
|   1 |  SORT AGGREGATE        |      |     1 |    12 |            |          |
|*  2 |   COUNT STOPKEY        |      |       |       |            |          |
|   3 |    NESTED LOOPS        |      |  2401P|    15E|    23P  (1)|999:59:59 |
|   4 |     NESTED LOOPS       |      |    79T|   650T|   769G  (1)|999:59:59 |
|   5 |      NESTED LOOPS      |      |  2631M|    14G|    25M  (1)| 84:57:18 |
|   6 |       TABLE ACCESS FULL| OBJ$ | 87098 |   255K|   295   (1)| 00:00:04 |
|*  7 |       TABLE ACCESS FULL| OBJ$ | 30210 | 90630 |   293   (1)| 00:00:04 |
|*  8 |      TABLE ACCESS FULL | OBJ$ | 30210 | 90630 |   293   (1)| 00:00:04 |
|*  9 |     TABLE ACCESS FULL  | OBJ$ | 30210 | 90630 |   293   (1)| 00:00:04 |
-------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   2 - filter(ROWNUM<=1e8)
   7 - filter("A"."OWNER#"="B"."OWNER#")
   8 - filter("B"."OWNER#"="C"."OWNER#")
   9 - filter("C"."OWNER#"="D"."OWNER#")


Statistics
----------------------------------------------------------
         12  recursive calls
          0  db block gets
    2859366  consistent gets
          0  physical reads
          0  redo size
        346  bytes sent via SQL*Net to client
        471  bytes received via SQL*Net from client
          2  SQL*Net roundtrips to/from client
          2  sorts (memory)
          0  sorts (disk)
          1  rows processed

--//2859366/1000= 2859.366

3.收尾:
--//取消break_poll_skip設定.
$ grep break sqlnet.ora
#break_poll_skip=1000

--//補充說明如果break_poll_skip設定10,100,使用strace跟蹤很慢.
--//break_poll_skip=100
SCOTT@78> @tpt/lotslios 1e8
generate lots of LIOs by repeatedly full scanning through a small table...
  COUNT(*)
----------
 100000000
Elapsed: 00:00:16.32
--//2859358  consistent gets

$ strace -cp 15165
Process 15165 attached - interrupt to quit
^CProcess 15165 detached
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
100.00    0.000052           0     28487           poll
  0.00    0.000000           0         5           read
  0.00    0.000000           0         5           write
  0.00    0.000000           0         1           lseek
  0.00    0.000000           0        46           getrusage
  0.00    0.000000           0        26           times
------ ----------- ----------- --------- --------- ----------------
100.00    0.000052                 28570           total

轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/518784.html

標籤:Oracle

上一篇:MySQL資料庫-資料表(四)

下一篇:【案例】星環科技×某能源企業:資料中臺實踐

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • GPU虛擬機創建時間深度優化

    **?桔妹導讀:**GPU虛擬機實體創建速度慢是公有云面臨的普遍問題,由于通常情況下創建虛擬機屬于低頻操作而未引起業界的重視,實際生產中還是存在對GPU實體創建時間有苛刻要求的業務場景。本文將介紹滴滴云在解決該問題時的思路、方法、并展示最終的優化成果。 從公有云服務商那里購買過虛擬主機的資深用戶,一 ......

    uj5u.com 2020-09-10 06:09:13 more
  • 可編程網卡芯片在滴滴云網路的應用實踐

    **?桔妹導讀:**隨著云規模不斷擴大以及業務層面對延遲、帶寬的要求越來越高,采用DPDK 加速網路報文處理的方式在橫向縱向擴展都出現了局限性。可編程芯片成為業界熱點。本文主要講述了可編程網卡芯片在滴滴云網路中的應用實踐,遇到的問題、帶來的收益以及開源社區貢獻。 #1. 資料中心面臨的問題 隨著滴滴 ......

    uj5u.com 2020-09-10 06:10:21 more
  • 滴滴資料通道服務演進之路

    **?桔妹導讀:**滴滴資料通道引擎承載著全公司的資料同步,為下游實時和離線場景提供了必不可少的源資料。隨著任務量的不斷增加,資料通道的整體架構也隨之發生改變。本文介紹了滴滴資料通道的發展歷程,遇到的問題以及今后的規劃。 #1. 背景 資料,對于任何一家互聯網公司來說都是非常重要的資產,公司的大資料 ......

    uj5u.com 2020-09-10 06:11:05 more
  • 滴滴AI Labs斬獲國際機器翻譯大賽中譯英方向世界第三

    **桔妹導讀:**深耕人工智能領域,致力于探索AI讓出行更美好的滴滴AI Labs再次斬獲國際大獎,這次獲獎的專案是什么呢?一起來看看詳細報道吧! 近日,由國際計算語言學協會ACL(The Association for Computational Linguistics)舉辦的世界最具影響力的機器 ......

    uj5u.com 2020-09-10 06:11:29 more
  • MPP (Massively Parallel Processing)大規模并行處理

    1、什么是mpp? MPP (Massively Parallel Processing),即大規模并行處理,在資料庫非共享集群中,每個節點都有獨立的磁盤存盤系統和記憶體系統,業務資料根據資料庫模型和應用特點劃分到各個節點上,每臺資料節點通過專用網路或者商業通用網路互相連接,彼此協同計算,作為整體提供 ......

    uj5u.com 2020-09-10 06:11:41 more
  • 滴滴資料倉庫指標體系建設實踐

    **桔妹導讀:**指標體系是什么?如何使用OSM模型和AARRR模型搭建指標體系?如何統一流程、規范化、工具化管理指標體系?本文會對建設的方法論結合滴滴資料指標體系建設實踐進行解答分析。 #1. 什么是指標體系 ##1.1 指標體系定義 指標體系是將零散單點的具有相互聯系的指標,系統化的組織起來,通 ......

    uj5u.com 2020-09-10 06:12:52 more
  • 單表千萬行資料庫 LIKE 搜索優化手記

    我們經常在資料庫中使用 LIKE 運算子來完成對資料的模糊搜索,LIKE 運算子用于在 WHERE 子句中搜索列中的指定模式。 如果需要查找客戶表中所有姓氏是“張”的資料,可以使用下面的 SQL 陳述句: SELECT * FROM Customer WHERE Name LIKE '張%' 如果需要 ......

    uj5u.com 2020-09-10 06:13:25 more
  • 滴滴Ceph分布式存盤系統優化之鎖優化

    **桔妹導讀:**Ceph是國際知名的開源分布式存盤系統,在工業界和學術界都有著重要的影響。Ceph的架構和演算法設計發表在國際系統領域頂級會議OSDI、SOSP、SC等上。Ceph社區得到Red Hat、SUSE、Intel等大公司的大力支持。Ceph是國際云計算領域應用最廣泛的開源分布式存盤系統, ......

    uj5u.com 2020-09-10 06:14:51 more
  • es~通過ElasticsearchTemplate進行聚合~嵌套聚合

    之前寫過《es~通過ElasticsearchTemplate進行聚合操作》的文章,這一次主要寫一個嵌套的聚合,例如先對sex集合,再對desc聚合,最后再對age求和,共三層嵌套。 Aggregations的部分特性類似于SQL語言中的group by,avg,sum等函式,Aggregation ......

    uj5u.com 2020-09-10 06:14:59 more
  • 爬蟲日志監控 -- Elastc Stack(ELK)部署

    傻瓜式部署,只需替換IP與用戶 導讀: 現ELK四大組件分別為:Elasticsearch(核心)、logstash(處理)、filebeat(采集)、kibana(可視化) 下載均在https://www.elastic.co/cn/downloads/下tar包,各組件版本最好一致,配合fdm會 ......

    uj5u.com 2020-09-10 06:15:05 more
最新发布
  • day02-2-商鋪查詢快取

    功能02-商鋪查詢快取 3.商鋪詳情快取查詢 3.1什么是快取? 快取就是資料交換的緩沖區(稱作Cache),是存盤資料的臨時地方,一般讀寫性能較高。 快取的作用: 降低后端負載 提高讀寫效率,降低回應時間 快取的成本: 資料一致性成本 代碼維護成本 運維成本 3.2需求說明 如下,當我們點擊商店詳 ......

    uj5u.com 2023-04-20 08:33:24 more
  • MySQL中binlog備份腳本分享

    關于MySQL的二進制日志(binlog),我們都知道二進制日志(binlog)非常重要,尤其當你需要point to point災難恢復的時侯,所以我們要對其進行備份。關于二進制日志(binlog)的備份,可以基于flush logs方式先切換binlog,然后拷貝&壓縮到到遠程服務器或本地服務器 ......

    uj5u.com 2023-04-20 08:28:06 more
  • day02-短信登錄

    功能實作02 2.功能01-短信登錄 2.1基于Session實作登錄 2.1.1思路分析 2.1.2代碼實作 2.1.2.1發送短信驗證碼 發送短信驗證碼: 發送驗證碼的介面為:http://127.0.0.1:8080/api/user/code?phone=xxxxx<手機號> 請求方式:PO ......

    uj5u.com 2023-04-20 08:27:27 more
  • 快取與資料庫雙寫一致性幾種策略分析

    本文將對幾種快取與資料庫保證資料一致性的使用方式進行分析。為保證高并發性能,以下分析場景不考慮執行的原子性及加鎖等強一致性要求的場景,僅追求最終一致性。 ......

    uj5u.com 2023-04-20 08:26:48 more
  • sql陳述句優化

    問題查找及措施 問題查找 需要找到具體的代碼,對其進行一對一優化,而非一直把關注點放在服務器和sql平臺 降低簡化每個事務中處理的問題,盡量不要讓一個事務拖太長的時間 例如檔案上傳時,應將檔案上傳這一步放在事務外面 微軟建議 4.啟動sql定時執行計劃 怎么啟動sqlserver代理服務-百度經驗 ......

    uj5u.com 2023-04-20 08:26:35 more
  • 云時代,MySQL到ClickHouse資料同步產品對比推薦

    ClickHouse 在執行分析查詢時的速度優勢很好的彌補了MySQL的不足,但是對于很多開發者和DBA來說,如何將MySQL穩定、高效、簡單的同步到 ClickHouse 卻很困難。本文對比了 NineData、MaterializeMySQL(ClickHouse自帶)、Bifrost 三款產品... ......

    uj5u.com 2023-04-20 08:26:29 more
  • sql陳述句優化

    問題查找及措施 問題查找 需要找到具體的代碼,對其進行一對一優化,而非一直把關注點放在服務器和sql平臺 降低簡化每個事務中處理的問題,盡量不要讓一個事務拖太長的時間 例如檔案上傳時,應將檔案上傳這一步放在事務外面 微軟建議 4.啟動sql定時執行計劃 怎么啟動sqlserver代理服務-百度經驗 ......

    uj5u.com 2023-04-20 08:25:13 more
  • Redis 報”OutOfDirectMemoryError“(堆外記憶體溢位)

    Redis 報錯“OutOfDirectMemoryError(堆外記憶體溢位) ”問題如下: 一、報錯資訊: 使用 Redis 的業務介面 ,產生 OutOfDirectMemoryError(堆外記憶體溢位),如圖: 格式化后的報錯資訊: { "timestamp": "2023-04-17 22: ......

    uj5u.com 2023-04-20 08:24:54 more
  • day02-2-商鋪查詢快取

    功能02-商鋪查詢快取 3.商鋪詳情快取查詢 3.1什么是快取? 快取就是資料交換的緩沖區(稱作Cache),是存盤資料的臨時地方,一般讀寫性能較高。 快取的作用: 降低后端負載 提高讀寫效率,降低回應時間 快取的成本: 資料一致性成本 代碼維護成本 運維成本 3.2需求說明 如下,當我們點擊商店詳 ......

    uj5u.com 2023-04-20 08:24:03 more
  • day02-短信登錄

    功能實作02 2.功能01-短信登錄 2.1基于Session實作登錄 2.1.1思路分析 2.1.2代碼實作 2.1.2.1發送短信驗證碼 發送短信驗證碼: 發送驗證碼的介面為:http://127.0.0.1:8080/api/user/code?phone=xxxxx<手機號> 請求方式:PO ......

    uj5u.com 2023-04-20 08:23:11 more