0

0

MySQL 调优基础(二) Linux内存管理_MySQL

php中文网

php中文网

发布时间:2016-05-30 17:10:52

|

2002人浏览过

|

来源于php中文网

原创

进程的运行,必须使用内存。下图是linux中进程中的内存的分布图:

MySQL 调优基础(二) Linux内存管理_MySQL

其中最重要的 heap segment 和 stack segment。其它内存段基本是大小固定的。注意stack是向低地址增长的,和heap相反。另外进程的内存地址从0开始,是因为使用的是虚拟内存。所以存在虚拟内存到物理内存的映射。目前服务器一般都是64位的,32位的已经极少了,32为对内存有极大限制。

 

1. Linux 虚拟内存

 

Linux是通过虚拟内存的方式来管理内存的。虚拟内存和物理内存之间存在映射关系。当进程在CPU上运行时,虚拟内存就会映射到物理内存,供CPU来访问。

 

applications do not allocate physical memory, but request a memory map of a certain size at the Linux kernel and in exchange receive a map in virtual memory. As you can see, virtual memory does not necessarily have to be mapped into physical memory. If your application allocates a large amount of memory, some of it might be mapped to the swap file on the disk subsystem.

 

图示 进程虚拟内存 = 进程物理内存 + 进程swap(page out):

MySQL 调优基础(二) Linux内存管理_MySQL

上图是top命令的截图,可以看到:mysqld 使用的虚拟内存为 735M,而常驻物理内存为 430M,所以其余的305M被swap out了(实际上是延迟分配)。

 

VIRT:The total amount of virtual memory used by the task. It includes all code, data and shared libraries plus pages that have been swapped out.

 

RES: Resident size (kb)。The non-swapped physical memory a task is using(常驻内存).

 

Linux handles the memory resource far more efficiently. The default configuration of the virtual memory manager allocates all available free 

memory space as disk cache. Hence it is not unusual to see productive Linux systems that boast gigabytes of memory but only have 20 MB of that memory free. In the same context, Linux also handles swap space very efficiently. Swap space being used does not indicate a memory bottleneck but proves how efficiently Linux handles system resources. 

 

There is no need to be alarmed if you find the swap partition filled to 50%. The fact that swap space is being used does not indicate a memory bottleneck; instead it proves how efficiently Linux handles system resources.

 

可见,系统显示空闲的内存很少,并不表示真的存在内存瓶颈;swap分区被使用了,也不代表存在内存瓶颈。

 

内存的分配:

 

Linux 管理内存是通过内存page为单位的,一般一个page为4K。Linux通过一个维持一个free内存的列表来管理和分配内存,并且维持内存的连续,防止内存碎片的产生。该系统被称为buddy system。内存的分配和管理全依靠buddy system.

 

内存的回收(page frame reclaiming):

 

当空闲内存不足时,就涉及到内存的回收。内存的回收有两种方式:回收用于缓存磁盘文件的 page cache(disk cache);swap out/page out 其它非活跃进程的内存;而且优先回收用于文件缓存的内存(disk cache):

 

When kswapd reclaims pages, it would rather shrink the page cache than page out (or swap out) the pages owned by processes.

 

然后会扫描内存的 active list 和 inactive list,根据LRU原则将active的page移到inactive,然后将inactive list中的page swap out.

 

active list 和 inactive list,可以用vmstat -a 查看到:

 

[root@localhost ~]# vmstat -a

procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----

 r  b   swpd   free  inact active   si   so    bi    bo   in   cs us sy id wa st

 0  0 0 462024  72680 471416    0    0    756  182  107  1 13 85  0  0

kswapd: kernel swap daemon

 

内存的两大主要用处:

 

The pages are used mainly for two purposes: page and process address space. The page cache is pages mapped to a file on disk. The 

cache pages that belong to a process address space (called anonymous memory because it is not mapped to any files, and it has no name) are used for heap and stack.

 

一、disk cache(page cache, file cache);

 

二、进程使用(anonymous memory、heap 和 stack)

 

kswapd 处理swap in 和swap out; 而 pdflush 处理disk cache到磁盘的刷新。

 

2. 如何尽量避免swap对mysql的影响

 

控制系统kswapd在内核中有一个专门的参数:

 

[root@localhost ~]# cat /proc/sys/vm/swappiness

60

我们把 vm.swappiness = 0 设置好,就可以在内存不足时,尽量避免系统发生swap,而尽量去 flush disk cache. 但是最新的Linux内核修改了对vm.swappingness=0 的解释,如果设置成0,可能会发生00M,而将mysqld给kill掉。新内核(2.6.32-303.el6及以后)推荐的做法是:

 

1)尽量保证Linux操作系统还有足够的内存;

 

2)最新的内核,建议把vm.swappiness设置1;

 

3)考虑设置 /proc/$(pidof -s mysqld)/oom_adj为较小的值来尽量避免MySQL由于内存不足而被关闭。

 

具体参见:http://www.woqutech.com/?p=1397

 

3. 如何修改 oom_adj 值

 

查看mysqld的oom_ajd值:

 

[root@localhost ~]# cat /proc/`pidof -s mysqld`/oom_adj

0

[root@localhost ~]# cat /proc/$(pidof -s mysqld)/oom_adj

0

默认值为0. 当我们设置为-17时,对于该进程来说,就不会触发OOM机制,被杀掉。修改:

 

[root@localhost ~]# echo -17 > /proc/$(pidof mysqld)/oom_adj

[root@localhost ~]# cat /proc/$(pidof mysqld)/oom_adj

-17

这里为什么是-17呢?这和Linux的实现有关系。在Linux内核中的oom.h文件中,可以看到下面的定义:

 

 

 /* /proc//oom_adj set to -17 protects from the oom-killer */

 

#define OOM_DISABLE (-17)

旭东单语言企业网站管理系统XDcms2.0.8
旭东单语言企业网站管理系统XDcms2.0.8

XDcms是南宁旭东网络科技有限公司推出的一套完全开源的通用的内容管理系统。主要使用php+mysql+smarty技术基础进行开发,XDcms采用OOP(面向对象)方式进行基础运行框架搭建。模块化开发方式做为功能开发形式。框架易于功能扩展,代码维护,二次开发能力优秀。

下载

 

/* inclusive */

 

#define OOM_ADJUST_MIN (-16)

 

#define OOM_ADJUST_MAX 15 

 

这个oom_adj中的变量的范围为15到-16之间。越大越容易被kill。oom_score就是它计算出来的一个值,就是根据这个值来选择哪些进程被kill掉的。

 

总之,通过上面的分析可知,满足下面的条件后,就是启动OOM机制。

 

1) VM里面分配不出更多的page(注意linux kernel是延迟分配page策略,及用到的时候才alloc;所以malloc + memset才有效)。

 

2) 用户地址空间不足,这种情况在32bit机器上及user space超过了3GB,在64bit机器上不太可能发生。

 

具体参见:http://blog.chinaunix.net/uid-20788636-id-4308527.html

 

其实设置mysqld的oom_adj不是最好的选择,mysqld不会被kill,必然就会导致其它进程被kill掉;最好还是保障内存充足或者设置vm.swappiness=1比较好

 

4. 内存瓶颈的检测

 

Linux内存的瓶颈,主要在于查看是否有比较严重的 swap 的发生(swap out/page out)。其它空虚内存的大小,swap分区被使用都不能说明说明问题。

 

区分 swap out 和 page out:

 

Page out moves individual pages to swap space on the disk; swapping is a bigger operation that moves the entire address space of a process to swap space in one operation.(page out 是指将单独的page交换到磁盘,而swap out是指将整个进程的内存交换到磁盘)

 

使用 vmstat 从整个系统层面查看swap out:

 

 

[root@localhost ~]# vmstat 2
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  0 0 400776  55292  82416    0    0    335  103   87  0  6 94  0  0
 0  0 0 400768  55292  82416    0    000   54   65  0  2 98  0  0
 0  0 0 400768  55292  82416    0    000   69   72  0  3 97  0  0
 0  0 0 400644  55300  82416    0    00    18   67   79  0  3 97  0  0
 0  0 0 400644  55300  82416    0    000   51   61  0  2 98  0  0
 0  0 0 400644  55300  82416    0    000   64   69  0  2 98  0  0
 0  0 0 400644  55308  82416    0    00    20   58   73  0  2 98  0  0

 

 

其中的 swap si: 表示每秒 swap in; so:表示每秒swap out;

 

   Swap

  si: Amount of memory swapped in from disk (/s).

  so: Amount of memory swapped to disk (/s).

使用 sar -B 从整个系统层面查看page out:


[root@localhost ~]# sar -B
Linux 2.6.32-504.el6.i686 (localhost.localdomain)       10/01/2015      _i686_  (1 CPU)

10:57:33 AM       LINUX RESTART

11:00:01 AM  pgpgin/s pgpgout/s   fault/s  majflt/s  pgfree/s pgscank/s pgscand/s pgsteal/s    %vmeff
11:10:01 AM     39.84      4.85    340.32      0.21     39.40      0.00      0.00      0.00      0.00
11:20:01 AM      0.06      2.76     10.69      0.00      3.21      0.00      0.00      0.00      0.00
11:30:01 AM      0.14      2.68     10.16      0.00      3.08      0.00      0.00      0.00      0.00
11:40:01 AM     69.58     13.07    154.16      0.01     47.29      0.00      0.00      0.00      0.00
11:50:01 AM      1.84      3.93     28.39      0.02      9.17      0.00      0.00      0.00      0.00
12:00:01 PM      0.00      3.20     19.70      0.00     10.87      0.00      0.00      0.00      0.00
12:10:01 PM      0.01      2.90     31.96      0.00      8.77      0.00      0.00      0.00      0.00
12:20:01 PM      0.06      3.06     40.04      0.00     10.98      0.00      0.00      0.00      0.00
12:30:02 PM      2.17      3.81     81.19      0.02     21.63      0.00      0.00      0.00      0.00
Average:        12.62      4.47     79.63      0.03     17.15      0.00      0.00      0.00      0.00

03:01:38 PM       LINUX RESTART

03:10:01 PM  pgpgin/s pgpgout/s   fault/s  majflt/s  pgfree/s pgscank/s pgscand/s pgsteal/s    %vmeff
03:20:01 PM      6.22      3.99     93.05      0.04     22.89      0.00      0.00      0.00      0.00
Average:         6.22      3.99     93.05      0.04     22.89      0.00      0.00      0.00      0.00
[root@localhost ~]# sar -B 2 3
Linux 2.6.32-504.el6.i686 (localhost.localdomain)       10/01/2015      _i686_  (1 CPU)

03:24:05 PM  pgpgin/s pgpgout/s   fault/s  majflt/s  pgfree/s pgscank/s pgscand/s pgsteal/s    %vmeff
03:24:07 PM      0.00      0.00     26.63      0.00     30.15      0.00      0.00      0.00      0.00
03:24:09 PM      0.00      0.00     19.70      0.00     30.30      0.00      0.00      0.00      0.00
03:24:11 PM      0.00      0.00     15.00      0.00     30.00      0.00      0.00      0.00      0.00
Average:         0.00      0.00     20.44      0.00     30.15      0.00      0.00      0.00      0.00

 

 

sar -B 取的是从系统启动到目前的平均值;sar -B 2 3 是指每隔2秒取值,总共取值3次。输出字段的含义如下:



       -B     Report  paging  statistics. Some of the metrics below are available only with post 2.5
              kernels. The following values are displayed:

              pgpgin/s
                     Total number of kilobytes the system paged in from disk per second.  Note: With
                     old  kernels (2.2.x) this value is a number of blocks per second (and not kilo-
                     bytes).

              pgpgout/s
                     Total number of kilobytes the system paged out to disk per second.  Note:  With
                     old  kernels (2.2.x) this value is a number of blocks per second (and not kilo-
                     bytes).

              fault/s
                     Number of page faults (major + minor) made by the system per second.   This  is
                     not  a  count of page faults that generate I/O, because some page faults can be
                     resolved without I/O.

              majflt/s
                     Number of major faults the  system  has  made  per  second,  those  which  have
                     required loading a memory page from disk.

              pgfree/s
                     Number of pages placed on the free list by the system per second.

              pgscank/s
                     Number of pages scanned by the kswapd daemon per second.

              pgscand/s
                     Number of pages scanned directly per second.

              pgsteal/s
                     Number  of  pages the system has reclaimed from cache (pagecache and swapcache)
                     per second to satisfy its memory demands.

              %vmeff
                     Calculated as pgsteal / pgscan, this is a metric  of  the  efficiency  of  page
                     reclaim.  If  it is near 100% then almost every page coming off the tail of the
                     inactive list is being reaped. If it gets too low (e.g. less than 30%) then the
                     virtual  memory  is having some difficulty.  This field is displayed as zero if
                     no pages have been scanned during the interval of time.

 

pgpgout/s 表示就是每秒的page out 的KB数量。majflt/s 也是极为重要的指标,该指标涉及到虚拟内存的 page fault机制。

 

虚拟内存的 page fault机制:

 

linux 使用虚拟内存层来映射物理地址空间,这种映射在某种意义上是说当一个进程开始运行,内核仅仅映射其需要的那部分,内核首先会搜索 CPU缓存和物理内存,如果没有找到内核则开始一次 MPF, 一次 MPF 即是一次对磁盘子系统的请求,它将数据页从磁盘和缓存读入 RAM。一旦内存页被映射到高速缓冲区,内核便会试图使用这些页,被称作 MnPF,MnPF 通过重复使用内存页而缩短了内核时间。

 

文件缓冲区(disk cache)可使内核减少对 MPFs 和 MnPFs 的使用, 随着系统不断地 IO 操作, 缓冲区会随之增大, 直至内存空闲空间不足并开始回收.

 

使用 free 查看空闲内存:

[root@localhost ~]# free
             total       used       free     shared    buffers     cached
Mem:       1030548     630284     400264        220      55388      82428
-/+ buffers/cache:     492468     538080
Swap:      1048572          0    1048572
[root@localhost ~]# free -m
             total       used       free     shared    buffers     cached
Mem:          1006        616        390          0         54         80
-/+ buffers/cache:        481        524
Swap:         1023          0       1023

 

 

1g的内存,1g的swap分区,使用了616M,空闲390M; swap分区没有被使用,全部空闲。

 

其实free内存很小不能说明问题,但是free比较大,却能说明内存充足。

 

swap如果大部分被使用,或者全部使用也能说明 swap 严重,当然最好结合 vmstat 来综合考虑。

 

使用  ps -mp 1959 -o THREAD,pmem,rss,vsz,tid,pid 查看mysqld的内存和CPU使用情况:

[root@localhost ~]# pidof -s mysqld
1959
[root@localhost ~]# ps -mp 1959 -o THREAD,pmem,rss,vsz,tid,pid
USER     %CPU PRI SCNT WCHAN  USER SYSTEM %MEM   RSS    VSZ   TID   PID
mysql     0.6   -    - -         -      - 42.8 441212 752744    -  1959
mysql     0.1  19    - -         -      -    -     -      -  1959     -
mysql     0.0  19    - -         -      -    -     -      -  1962     -
mysql     0.0  19    - -         -      -    -     -      -  1963     -
mysql     0.0  19    - -         -      -    -     -      -  1964     -
mysql     0.0  19    - -         -      -    -     -      -  1965     -
mysql     0.0  19    - -         -      -    -     -      -  1966     -
mysql     0.0  19    - -         -      -    -     -      -  1967     -
mysql     0.0  19    - -         -      -    -     -      -  1968     -
mysql     0.0  19    - -         -      -    -     -      -  1969     -
mysql     0.0  19    - -         -      -    -     -      -  1970     -
mysql     0.0  19    - -         -      -    -     -      -  1971     -
mysql     0.0  19    - -         -      -    -     -      -  1973     -
mysql     0.0  19    - -         -      -    -     -      -  1974     -
mysql     0.0  19    - -         -      -    -     -      -  1975     -
mysql     0.0  19    - -         -      -    -     -      -  1976     -
mysql     0.0  19    - -         -      -    -     -      -  1977     -
mysql     0.0  19    - -         -      -    -     -      -  1978     -
mysql     0.0  19    - -         -      -    -     -      -  1979     -
mysql     0.0  19    - -         -      -    -     -      -  1980     -
mysql     0.0  19    - -         -      -    -     -      -  1981     -
mysql     0.0  19    - -         -      -    -     -      -  1982     -

 

 

使用 pmap 查看进程的内存分布情况:

[root@localhost ~]# pmap -x 1959
1959:   /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/var/lib/mysql --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/mysql/mysqld.pid --socket=/var/lib/mysql/mysql.sock
Address   Kbytes     RSS   Dirty Mode   Mapping
00297000       4       4       0 r-x--    [ anon ]
002e0000      48      20       0 r-x--  libnss_files-2.12.so
002ec000       4       4       4 r----  libnss_files-2.12.so
002ed000       4       4       4 rw---  libnss_files-2.12.so
003fb000     116      60       0 r-x--  libgcc_s-4.4.7-20120601.so.1
00418000       4       4       4 rw---  libgcc_s-4.4.7-20120601.so.1
0041b000      28       8       0 r-x--  libcrypt-2.12.so
00422000       4       4       4 r----  libcrypt-2.12.so
00423000       4       4       4 rw---  libcrypt-2.12.so
00424000     156       0       0 rw---    [ anon ]
0044d000     368     148       0 r-x--  libfreebl3.so
004a9000       4       0       0 -----  libfreebl3.so
004aa000       4       4       4 r----  libfreebl3.so
004ab000       4       4       4 rw---  libfreebl3.so
004ac000      16      12      12 rw---    [ anon ]
0053e000     120     100       0 r-x--  ld-2.12.so
0055c000       4       4       4 r----  ld-2.12.so
0055d000       4       4       4 rw---  ld-2.12.so
00560000       4       4       0 r-x--  libaio.so.1.0.1
00561000       4       4       4 rw---  libaio.so.1.0.1
00564000    1600     680       0 r-x--  libc-2.12.so
006f4000       8       8       8 r----  libc-2.12.so
006f6000       4       4       4 rw---  libc-2.12.so
006f7000      12      12      12 rw---    [ anon ]
006fc000      92      84       0 r-x--  libpthread-2.12.so
00713000       4       4       4 r----  libpthread-2.12.so
00714000       4       4       4 rw---  libpthread-2.12.so
00715000       8       4       4 rw---    [ anon ]
00719000      12       8       0 r-x--  libdl-2.12.so
0071c000       4       4       4 r----  libdl-2.12.so
0071d000       4       4       4 rw---  libdl-2.12.so
00720000      28      16       0 r-x--  librt-2.12.so
00727000       4       4       4 r----  librt-2.12.so
00728000       4       4       4 rw---  librt-2.12.so
0072b000     160      28       0 r-x--  libm-2.12.so
00753000       4       4       4 r----  libm-2.12.so
00754000       4       4       4 rw---  libm-2.12.so
07b14000     900     400       0 r-x--  libstdc++.so.6.0.13
07bf5000      16      16      12 r----  libstdc++.so.6.0.13
07bf9000       8       8       8 rw---  libstdc++.so.6.0.13
07bfb000      24       8       8 rw---    [ anon ]
08048000   12096    4284       0 r-x--  mysqld
08c18000    1224     468     304 rw---  mysqld
08d4a000     256     252     252 rw---    [ anon ]
0a809000    5492    5396    5396 rw---    [ anon ]
8abfd000       4       0       0 -----    [ anon ]
8abfe000   10240       4       4 rw---    [ anon ]
8b5fe000       4       0       0 -----    [ anon ]
8b5ff000   10240       4       4 rw---    [ anon ]
8bfff000       4       0       0 -----    [ anon ]
8c000000   10240       8       8 rw---    [ anon ]
8ca00000    1024     436     436 rw---    [ anon ]
8cbf7000       4       0       0 -----    [ anon ]
8cbf8000   10240      16      16 rw---    [ anon ]
8d5f8000       4       0       0 -----    [ anon ]
8d5f9000   10240       8       8 rw---    [ anon ]
8dff9000       4       0       0 -----    [ anon ]
8dffa000   10240       4       4 rw---    [ anon ]
8e9fa000       4       0       0 -----    [ anon ]
8e9fb000   10240       4       4 rw---    [ anon ]
8f3fb000       4       0       0 -----    [ anon ]
8f3fc000   10240       4       4 rw---    [ anon ]
8fdfc000       4       0       0 -----    [ anon ]
8fdfd000   12720    2468    2468 rw---    [ anon ]
90c00000     132       4       4 rw---    [ anon ]
90c21000     892       0       0 -----    [ anon ]
90d04000       4       0       0 -----    [ anon ]
90d05000     192      12      12 rw---    [ anon ]
90d35000       4       0       0 -----    [ anon ]
90d36000   10240       4       4 rw---    [ anon ]
91736000       4       0       0 -----    [ anon ]
91737000   10240       4       4 rw---    [ anon ]
92137000       4       0       0 -----    [ anon ]
92138000   10240       4       4 rw---    [ anon ]
92b38000       4       0       0 -----    [ anon ]
92b39000   10240       4       4 rw---    [ anon ]
93539000       4       0       0 -----    [ anon ]
9353a000   10240       4       4 rw---    [ anon ]
93f3a000       4       0       0 -----    [ anon ]
93f3b000   10240       4       4 rw---    [ anon ]
9493b000       4       0       0 -----    [ anon ]
9493c000   10240       4       4 rw---    [ anon ]
9533c000       4       0       0 -----    [ anon ]
9533d000   10240       4       4 rw---    [ anon ]
95d3d000       4       0       0 -----    [ anon ]
95d3e000   10240       8       8 rw---    [ anon ]
9673e000       4       0       0 -----    [ anon ]
9673f000  133548   19940   19940 rw---    [ anon ]
9e9ab000  407108  406096  406096 rw---    [ anon ]
b774b000       4       4       4 rw---    [ anon ]
bfc28000      84      56      56 rw---    [ stack ]
-------- ------- ------- ------- -------
total kB  752740       -       -       -

 

上面字段的含义:

 


EXTENDED AND DEVICE FORMAT FIELDS
       Address:   start address of map
       Kbytes:    size of map in kilobytes
       RSS:       resident set size in kilobytes
       Dirty:     dirty pages (both shared and private) in kilobytes
       Mode:      permissions on map: read, write, execute, shared, private (copy on write)
       Mapping:   file backing the map, or ’[ anon ]’ for allocated memory, or  ’[ stack ]’ for the program stack
       Offset:    offset into the file
       Device:    device name (major:minor)

 

 

Mapping 字段说明是通过文件map使用的内存,还是[ anon ] 实际分配的内存,还是[ stack ] 栈使用的内存。

 

最后一行的 total KB 752740 的结果 和上面一条命令中 VSZ: 752744(虚拟内存) 是一致的。

 

5. 内存的调优

 

上面我们说到内存的瓶颈,主要看 swap out, page out, major page fault. 它们会极大的影响性能,特别是swap out. 所以内存调优也就是减少和防止它们的出现。

 

1)使用 hugepage 可以避免swap out; 但是 huagepage也是有代价的(导致page争用加剧),一定要事先测试;

 

2)修改 vm.swapingness, 优先flush disk cache,尽量减少page out 和 swap out; 但是flush disk cache又可能会导致 major page fault的产生;

 

3)disk cache刷新到磁盘有两个内核参数调节:vm.dirty_background_ratio=10; 默认值为10,表示disk cache中的脏页数量达到10%时,pdflush内核

 

线程会被调用,异步刷新disk cache; vm.dirty_ratio=20; 默认值20,表示disk cache中的脏页数量达到20%时,会进行同步的disk cache刷新,从而

 

会阻塞系统中应用进程的IO操作!我们可以调低vm.dirty_background_ratio来降低disk cache对mysql使用内存的影响,但是可能会增加磁盘IO;

 

4)加内存;

热门AI工具

更多
DeepSeek
DeepSeek

幻方量化公司旗下的开源大模型平台

豆包大模型
豆包大模型

字节跳动自主研发的一系列大型语言模型

通义千问
通义千问

阿里巴巴推出的全能AI助手

腾讯元宝
腾讯元宝

腾讯混元平台推出的AI助手

文心一言
文心一言

文心一言是百度开发的AI聊天机器人,通过对话可以生成各种形式的内容。

讯飞写作
讯飞写作

基于讯飞星火大模型的AI写作工具,可以快速生成新闻稿件、品宣文案、工作总结、心得体会等各种文文稿

即梦AI
即梦AI

一站式AI创作平台,免费AI图片和视频生成。

ChatGPT
ChatGPT

最最强大的AI聊天机器人程序,ChatGPT不单是聊天机器人,还能进行撰写邮件、视频脚本、文案、翻译、代码等任务。

相关专题

更多
Golang 生态工具与框架:扩展开发能力
Golang 生态工具与框架:扩展开发能力

《Golang 生态工具与框架》系统梳理 Go 语言在实际工程中的主流工具链与框架选型思路,涵盖 Web 框架、RPC 通信、依赖管理、测试工具、代码生成与项目结构设计等内容。通过真实项目场景解析不同工具的适用边界与组合方式,帮助开发者构建高效、可维护的 Go 工程体系,并提升团队协作与交付效率。

1

2026.02.24

Golang 性能优化专题:提升应用效率
Golang 性能优化专题:提升应用效率

《Golang 性能优化专题》聚焦 Go 应用在高并发与大规模服务中的性能问题,从 profiling、内存分配、Goroutine 调度、GC 机制到 I/O 与锁竞争逐层分析。结合真实案例讲解定位瓶颈的方法与优化策略,帮助开发者建立系统化性能调优思维,在保证代码可维护性的同时显著提升服务吞吐与稳定性。

2

2026.02.24

Golang 面试题精选:高频问题与解答
Golang 面试题精选:高频问题与解答

Golang 面试题精选》系统整理企业常见 Go 技术面试问题,覆盖语言基础、并发模型、内存与调度机制、网络编程、工程实践与性能优化等核心知识点。每道题不仅给出答案,还拆解背后的设计原理与考察思路,帮助读者建立完整知识结构,在面试与实际开发中都能更从容应对复杂问题。

1

2026.02.24

Golang 运行与部署实战:从本地到云端
Golang 运行与部署实战:从本地到云端

《Golang 运行与部署实战》围绕 Go 应用从开发完成到稳定上线的完整流程展开,系统讲解编译构建、环境配置、日志与配置管理、容器化部署以及常见运维问题处理。结合真实项目场景,拆解自动化构建与持续部署思路,帮助开发者建立可靠的发布流程,提升服务稳定性与可维护性。

3

2026.02.24

Golang 疑难杂症解决指南:常见问题排查与优化
Golang 疑难杂症解决指南:常见问题排查与优化

《Golang 疑难杂症解决指南》聚焦开发过程中常见却棘手的问题,从并发模型、内存管理、性能瓶颈到工程化实践逐步拆解。通过真实案例与调试思路,帮助开发者定位问题根因,建立系统化排查方法。不只给出答案,更强调分析路径与工具使用,让你在复杂 Go 项目中具备持续解决问题的能力。

1

2026.02.24

Golang 入门学习路线:从零基础到上手开发
Golang 入门学习路线:从零基础到上手开发

Golang 入门路线涵盖从零到上手的核心路径:首先打牢基础语法与切片等底层机制;随后攻克 Go 的灵魂——接口设计与 Goroutine 并发模型;接着通过 Gin 框架与 GORM 深入 Web 开发实战;最后在微服务与云原生工具开发中进阶,旨在培养具备高性能并发处理能力的后端工程师。

0

2026.02.24

中国研究生招生信息网官方网站入口 研招网网页版在线入口
中国研究生招生信息网官方网站入口 研招网网页版在线入口

中国研究生招生信息网入口(https://yz.chsi.com.cn) 此网站是研究生报名入口的唯一官方网站

95

2026.02.24

苹果官网入口与在线访问指南_中国站点快速直达与iPhone查看方法
苹果官网入口与在线访问指南_中国站点快速直达与iPhone查看方法

本专题汇总苹果官网最新可用入口及中国站点访问方式,涵盖官网直达链接、iPhone官方页面查看方法与常见访问说明,帮助用户快速进入苹果官方网站,便捷了解产品信息与官方服务。

14

2026.02.24

Asianfanfics官网入口与访问指南_AFF官方平台最新登录地址
Asianfanfics官网入口与访问指南_AFF官方平台最新登录地址

本专题系统整理Asianfanfics(AFF)官方网站最新可用入口,涵盖官方平台最新直达地址、官网登录方式及中文访问指引,帮助用户快速、安全地进入AFF平台浏览与使用相关内容。

15

2026.02.24

热门下载

更多
网站特效
/
网站源码
/
网站素材
/
前端模板

精品课程

更多
相关推荐
/
热门推荐
/
最新课程
CSS3 教程
CSS3 教程

共18课时 | 6.1万人学习

Git 教程
Git 教程

共21课时 | 3.8万人学习

MongoDB 教程
MongoDB 教程

共17课时 | 3万人学习

关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号