PostgreSQL 10 内置分区 vs pg_pathman

标签

PostgreSQL , 内置分区 , pg_pathman , perf , 性能 , 锁


背景

PostgreSQL 10内置分区的性能不如pg_pathman分区插件的性能。有非常大的优化空间,那么是什么导致了分区的性能问题呢?

编译PostgreSQL 10.0

1、编译、打开debug

CFLAGS="-g -ggdb -fno-omit-frame-pointer" ./configure --prefix=/home/digoal/pgsql10.0
CFLAGS="-g -ggdb -fno-omit-frame-pointer" make world -j 128
CFLAGS="-g -ggdb -fno-omit-frame-pointer" make install-world

2、初始化集群

initdb -D $PGDATA -U postgres -E SQL_ASCII --locale=C

3、配置postgresql.conf

listen_addresses = '0.0.0.0'
port = 1921
max_connections = 400
superuser_reserved_connections = 3
unix_socket_directories = '.'
shared_buffers = 128GB
work_mem = 1024MB
maintenance_work_mem = 4GB
dynamic_shared_memory_type = posix
vacuum_cost_delay = 0
bgwriter_delay = 10ms
bgwriter_flush_after = 0
max_worker_processes = 128
max_parallel_workers_per_gather = 0
max_parallel_workers = 128
wal_level = minimal
synchronous_commit = off
full_page_writes = off
wal_buffers = 1GB
wal_writer_delay = 10ms
wal_writer_flush_after = 0
checkpoint_timeout = 55min
max_wal_size = 128GB
min_wal_size = 80MB
checkpoint_completion_target = 0.01
checkpoint_flush_after = 0
max_wal_senders = 0
parallel_tuple_cost = 0
parallel_setup_cost = 0
min_parallel_table_scan_size = 0
min_parallel_index_scan_size = 0
effective_cache_size = 400GB
log_destination = 'csvlog'
logging_collector = on
log_truncate_on_rotation = on
log_timezone = 'PRC'
log_autovacuum_min_duration = 0
datestyle = 'iso, mdy'
timezone = 'PRC'
lc_messages = 'C'
lc_monetary = 'C'
lc_numeric = 'C'
lc_time = 'C'
default_text_search_config = 'pg_catalog.english'

创建range和list分区,用于测试

1. range 分区表

1.1 主表

create table t_range(id int, info text, crt_time timestamp) partition by range (id);

1.2 分区

do language plpgsql $$
declare
  i int;
begin
  for i in 0..127 loop
    execute 'create table t_range_'||i||' partition of t_range for values from ('||i*100||') to ('||(i+1)*100||')';
  end loop;
end;
$$;

2. list 分区表

2.1 主表

create table t_list(id int, info text, crt_time timestamp) partition by list ( mod(hashtext(info), 128) );

2.2 分区

do language plpgsql $$
declare
  i int;
begin
  for i in 0..127 loop
    execute 'create table t_list_'||i||' partition of t_list for values in ('||i||')';
  end loop;
end;
$$;

创建测试脚本

1、测试范围分区

vi test1.sql      

\set id random(0,12799)
insert into t_range values (:id, 'test', now());

2、测试LIST分区

vi test2.sql      

\set id random(0,127)
insert into t_list values (:id, 'test', now());

压测

pgbench -M prepared -n -r -P 1 -f ./test1.sql -c 64 -j 64 -T 12800      

pgbench -M prepared -n -r -P 1 -f ./test2.sql -c 64 -j 64 -T 12800
progress: 14.0 s, 21361.0 tps, lat 2.996 ms stddev 0.848
progress: 15.0 s, 21302.0 tps, lat 3.004 ms stddev 0.868
progress: 16.0 s, 21349.0 tps, lat 2.998 ms stddev 0.852
progress: 17.0 s, 21366.9 tps, lat 2.996 ms stddev 0.858
progress: 18.0 s, 21346.0 tps, lat 2.998 ms stddev 0.856

收集profiling

perf record -ag

生成perf报告

1、

perf report -g

结果

Samples: 1M of event 'cycles', Event count (approx.): 662397686992
  Children      Self  Command          Shared Object              Symbol
+   88.63%     0.00%  postgres         libc-2.17.so               [.] __libc_start_main
+   88.63%     0.00%  postgres         postgres                   [.] startup_hacks
+   88.63%     0.00%  postgres         postgres                   [.] PostmasterMain
+   88.49%     0.00%  postgres         postgres                   [.] ServerLoop
+   88.49%     0.00%  postgres         postgres                   [.] BackendStartup
+   88.47%     0.00%  postgres         postgres                   [.] ExitPostmaster
+   88.42%     0.04%  postgres         postgres                   [.] PostgresMain
+   74.92%     0.02%  postgres         postgres                   [.] exec_execute_message
+   74.77%     0.01%  postgres         postgres                   [.] PortalRun
+   74.75%     0.02%  postgres         postgres                   [.] PortalRunMulti
+   74.57%     0.01%  postgres         postgres                   [.] ProcessQuery
+   71.56%     0.01%  postgres         postgres                   [.] ExecutorStart
+   71.54%     0.01%  postgres         postgres                   [.] standard_ExecutorStart
+   71.46%     0.02%  postgres         postgres                   [.] InitPlan
+   71.26%     0.02%  postgres         postgres                   [.] ExecInitNode
+   71.23%     0.05%  postgres         postgres                   [.] ExecInitModifyTable
+   70.34%     0.23%  postgres         postgres                   [.] ExecSetupPartitionTupleRouting
+   45.89%     0.23%  postgres         postgres                   [.] find_all_inheritors
+   42.42%     0.28%  postgres         postgres                   [.] find_inheritance_children
+   23.59%     0.08%  postgres         postgres                   [.] LockRelationOid
+   23.33%     0.04%  postgres         postgres                   [.] LockAcquire
+   22.88%     0.79%  postgres         postgres                   [.] LockAcquireExtended
+   12.59%     1.07%  postgres         postgres                   [.] InitResultRelInfo
+   12.10%     0.26%  postgres         postgres                   [.] LWLockAcquire
+   11.50%     0.08%  postgres         postgres                   [.] RelationGetPartitionQual
+   10.99%     0.01%  postgres         postgres                   [.] CommitTransaction
+   10.89%     1.14%  postgres         postgres                   [.] _copyList
+   10.58%     0.05%  postgres         postgres                   [.] systable_getnext
+   10.51%     0.05%  postgres         postgres                   [.] index_getnext
+   10.50%     6.88%  postgres         postgres                   [.] hash_search_with_hash_value
+   10.35%     0.01%  postgres         postgres                   [.] ResourceOwnerRelease
+   10.34%     0.03%  postgres         postgres                   [.] ResourceOwnerReleaseInternal
+   10.29%     0.01%  postgres         postgres                   [.] ProcReleaseLocks
+   10.22%     1.84%  postgres         postgres                   [.] LockReleaseAll
+    9.46%     0.52%  postgres         postgres                   [.] LWLockRelease
+    9.00%     0.21%  postgres         postgres                   [.] index_fetch_heap
+    8.60%     0.01%  postgres         [kernel.kallsyms]          [k] system_call_fastpath
+    8.34%     0.23%  postgres         postgres                   [.] SearchSysCache
+    7.98%     0.27%  swapper          [kernel.kallsyms]          [k] cpu_startup_entry
+    7.86%     0.00%  swapper          [kernel.kallsyms]          [k] start_secondary
+    7.73%     0.04%  postgres         [kernel.kallsyms]          [k] sys_futex
+    7.68%     0.05%  postgres         [kernel.kallsyms]          [k] do_futex
+    7.43%     5.59%  postgres         postgres                   [.] AllocSetAlloc
+    7.27%     3.52%  postgres         postgres                   [.] SearchCatCache
+    7.03%     0.22%  postgres         postgres                   [.] _copyOpExpr
+    6.15%     0.36%  postgres         postgres                   [.] LWLockWakeup
+    5.93%     0.38%  postgres         postgres                   [.] RelationGetPartitionDispatchInfo
+    5.62%     0.14%  postgres         postgres                   [.] LockBuffer
+    5.50%     0.28%  postgres         postgres                   [.] hash_search

2、

perf report --stdio -g

结果

    45.89%     0.23%  postgres         postgres                   [.] find_all_inheritors
                   |
                   ---find_all_inheritors
                      |
                      |--99.99%-- ExecSetupPartitionTupleRouting
                      |          ExecInitModifyTable      

    42.42%     0.28%  postgres         postgres                   [.] find_inheritance_children
                   |
                   ---find_inheritance_children
                      |
                      |--99.97%-- find_all_inheritors
                      |          ExecSetupPartitionTupleRouting
                      |          ExecInitModifyTable
                      |          ExecInitNode      

    23.59%     0.08%  postgres         postgres                   [.] LockRelationOid
                   |
                   ---LockRelationOid
                      |
                      |--98.67%-- find_inheritance_children
                      |          find_all_inheritors
                      |          ExecSetupPartitionTupleRouting
                      |          ExecInitModifyTable      

    23.33%     0.04%  postgres         postgres                   [.] LockAcquire
                   |
                   ---LockAcquire
                      |
                      |--98.59%-- LockRelationOid
                      |          |
                      |          |--98.82%-- find_inheritance_children
                      |          |          find_all_inheritors
                      |          |          ExecSetupPartitionTupleRouting
                      |          |          ExecInitModifyTable
                      |          |          ExecInitNode      

    11.50%     0.08%  postgres         postgres                   [.] RelationGetPartitionQual
                   |
                   ---RelationGetPartitionQual
                      |
                      |--99.75%-- InitResultRelInfo
                      |          |
                      |          |--99.99%-- ExecSetupPartitionTupleRouting
                      |          |          ExecInitModifyTable
                      |          |          ExecInitNode
                      |          |          InitPlan
                      |          |          standard_ExecutorStart
                      |          |          ExecutorStart      

    11.42%     0.07%  postgres         postgres                   [.] generate_partition_qual
                   |
                   ---generate_partition_qual
                      |
                      |--99.90%-- RelationGetPartitionQual
                      |          InitResultRelInfo
                      |          ExecSetupPartitionTupleRouting
                      |          ExecInitModifyTable
                      |          ExecInitNode
                      |          InitPlan
                      |          standard_ExecutorStart
                      |          ExecutorStart

pg_pathman perf profiling

postgres=# CREATE EXTENSION pg_pathman;
CREATE EXTENSION    

postgres=# create table tbl_range(id int not null, info text, crt_time timestamp);
CREATE TABLE    

postgres=# select create_range_partitions('tbl_range', 'id', 0, 100, 128);
 create_range_partitions
-------------------------
                     128
(1 row)

压测,pg_pathman 是native partition 的10几倍性能。

progress: 11.0 s, 262159.5 tps, lat 0.244 ms stddev 0.135
progress: 12.0 s, 260462.8 tps, lat 0.246 ms stddev 0.124
progress: 13.0 s, 259761.5 tps, lat 0.246 ms stddev 0.130
progress: 14.0 s, 271007.1 tps, lat 0.236 ms stddev 0.118

profiling

perf report -g    

Samples: 1M of event 'cycles', Event count (approx.): 529675912799
  Children      Self  Command          Shared Object              Symbol
+   78.90%     0.00%  postgres         libc-2.17.so               [.] __libc_start_main
+   78.90%     0.00%  postgres         postgres                   [.] startup_hacks
+   78.90%     0.00%  postgres         postgres                   [.] PostmasterMain
+   78.00%     0.00%  postgres         postgres                   [.] ServerLoop
+   78.00%     0.00%  postgres         postgres                   [.] BackendStartup
+   78.00%     0.00%  postgres         postgres                   [.] ExitPostmaster
+   77.72%     0.24%  postgres         postgres                   [.] PostgresMain
+   48.13%     0.13%  postgres         postgres                   [.] exec_execute_message
+   47.16%     0.07%  postgres         postgres                   [.] PortalRun
+   47.03%     0.11%  postgres         postgres                   [.] PortalRunMulti
+   44.80%     0.07%  postgres         postgres                   [.] ProcessQuery
+   29.89%     0.01%  postgres         postgres                   [.] ExecutorRun
+   29.87%     0.06%  postgres         postgres                   [.] standard_ExecutorRun
+   29.78%     0.04%  postgres         postgres                   [.] ExecutePlan
+   29.51%     0.03%  postgres         postgres                   [.] ExecProcNode
+   29.47%     0.04%  postgres         postgres                   [.] ExecProcNodeFirst
+   29.41%     0.14%  postgres         postgres                   [.] ExecModifyTable
+   20.70%     0.13%  postgres         postgres                   [.] ExecInsert
+   12.84%     0.02%  postgres         postgres                   [.] finish_xact_command
+   12.80%     0.05%  postgres         postgres                   [.] CommitTransactionCommand
+   12.21%     0.08%  postgres         postgres                   [.] CommitTransaction
+   12.19%     0.05%  postgres         postgres                   [.] ExecutorStart
+   12.09%     0.04%  postgres         postgres                   [.] standard_ExecutorStart
+   11.57%     0.11%  postgres         postgres                   [.] InitPlan
+   10.91%     0.10%  postgres         postgres                   [.] ExecConstraints
+   10.75%     0.07%  postgres         postgres                   [.] ExecRelCheck
+   10.19%     0.16%  postgres         postgres                   [.] ExecInitNode
+   10.04%     0.25%  postgres         postgres                   [.] ExecInitModifyTable
+   10.03%     0.01%  postgres         [kernel.kallsyms]          [k] system_call_fastpath
+    9.07%     0.11%  postgres         postgres                   [.] heap_insert
+    8.82%     0.11%  postgres         postgres                   [.] ExecInitCustomScan
+    8.46%     0.22%  postgres         postgres                   [.] exec_bind_message
+    8.32%     0.03%  postgres         postgres                   [.] ExecProcNode
+    8.27%     0.06%  postgres         postgres                   [.] ExecCustomScan
+    8.14%     0.09%  postgres         pg_pathman.so              [.] partition_filter_exec
+    7.07%     0.25%  swapper          [kernel.kallsyms]          [k] cpu_startup_entry
+    6.99%     0.00%  swapper          [kernel.kallsyms]          [k] start_secondary
+    6.45%     0.04%  postgres         postgres                   [.] stringToNode
+    6.45%     0.04%  postgres         pg_pathman.so              [.] select_partition_for_insert
+    6.40%     0.16%  postgres         postgres                   [.] nodeRead
+    6.15%     0.21%  postgres         postgres                   [.] parseNodeString
+    6.02%     0.00%  pgbench          libpthread-2.17.so         [.] start_thread
+    5.98%     0.04%  postgres         postgres                   [.] _readBoolExpr
+    5.92%     0.05%  postgres         pg_pathman.so              [.] partition_filter_begin
+    5.21%     0.08%  postgres         postgres                   [.] _readOpExpr
+    4.77%     0.05%  postgres         postgres                   [.] XLogInsert
+    4.74%     0.05%  postgres         [kernel.kallsyms]          [k] sys_futex
+    4.68%     0.06%  postgres         [kernel.kallsyms]          [k] do_futex
+    4.64%     0.24%  postgres         postgres                   [.] LWLockAcquire
+    4.42%     4.38%  postgres         postgres                   [.] pg_strtok
+    4.34%     0.10%  postgres         postgres                   [.] XLogInsertRecord
+    4.22%     0.01%  pgbench          [kernel.kallsyms]          [k] system_call_fastpath
+    4.10%     0.08%  postgres         postgres                   [.] RecordTransactionCommit
perf report --stdio -g

分析

从现象看,PG 10 native partition应该是find_all_inheritors效率问题,relation锁时间过长。性能只有pg_pathman的十几分之一。

native partition 的罪魁祸首:

/*
 * find_all_inheritors -
 *              Returns a list of relation OIDs including the given rel plus
 *              all relations that inherit from it, directly or indirectly.
 *              Optionally, it also returns the number of parents found for
 *              each such relation within the inheritance tree rooted at the
 *              given rel.
 *
 * The specified lock type is acquired on all child relations (but not on the
 * given rel; caller should already have locked it).  If lockmode is NoLock
 * then no locks are acquired, but caller must beware of race conditions
 * against possible DROPs of child relations.
 */
List *
find_all_inheritors(Oid parentrelId, LOCKMODE lockmode, List **numparents)
{
        /* hash table for O(1) rel_oid -> rel_numparents cell lookup */
        HTAB       *seen_rels;
        HASHCTL         ctl;
        List       *rels_list,
                           *rel_numparents;
        ListCell   *l;      

        memset(&ctl, 0, sizeof(ctl));
        ctl.keysize = sizeof(Oid);
        ctl.entrysize = sizeof(SeenRelsEntry);
        ctl.hcxt = CurrentMemoryContext;      

        seen_rels = hash_create("find_all_inheritors temporary table",
                                                        32, /* start small and extend */
                                                        &ctl,
                                                        HASH_ELEM | HASH_BLOBS | HASH_CONTEXT);      

        /*
         * We build a list starting with the given rel and adding all direct and
         * indirect children.  We can use a single list as both the record of
         * already-found rels and the agenda of rels yet to be scanned for more
         * children.  This is a bit tricky but works because the foreach() macro
         * doesn't fetch the next list element until the bottom of the loop.
         */
        rels_list = list_make1_oid(parentrelId);
        rel_numparents = list_make1_int(0);      

        foreach(l, rels_list)
        {
                Oid                     currentrel = lfirst_oid(l);
                List       *currentchildren;
                ListCell   *lc;      

                /* Get the direct children of this rel */
                currentchildren = find_inheritance_children(currentrel, lockmode);      

                /*
                 * Add to the queue only those children not already seen. This avoids
                 * making duplicate entries in case of multiple inheritance paths from
                 * the same parent.  (It'll also keep us from getting into an infinite
                 * loop, though theoretically there can't be any cycles in the
                 * inheritance graph anyway.)
                 */
                foreach(lc, currentchildren)
                {
                        Oid                     child_oid = lfirst_oid(lc);
                        bool            found;
                        SeenRelsEntry *hash_entry;      

                        hash_entry = hash_search(seen_rels, &child_oid, HASH_ENTER, &found);
                        if (found)
                        {
                                /* if the rel is already there, bump number-of-parents counter */
                                lfirst_int(hash_entry->numparents_cell)++;
                        }
                        else
                        {
                                /* if it's not there, add it. expect 1 parent, initially. */
                                rels_list = lappend_oid(rels_list, child_oid);
                                rel_numparents = lappend_int(rel_numparents, 1);
                                hash_entry->numparents_cell = rel_numparents->tail;
                        }
                }
        }      

        if (numparents)
                *numparents = rel_numparents;
        else
                list_free(rel_numparents);      

        hash_destroy(seen_rels);      

        return rels_list;
}

native partition的执行计划:

postgres=# explain (analyze,verbose,timing,costs,buffers) insert into t_range values (1);
                                              QUERY PLAN
-------------------------------------------------------------------------------------------------------
 Insert on public.t_range  (cost=0.00..0.01 rows=1 width=44) (actual time=0.060..0.060 rows=0 loops=1)
   Buffers: shared read=2 dirtied=1
   ->  Result  (cost=0.00..0.01 rows=1 width=44) (actual time=0.001..0.001 rows=1 loops=1)
         Output: 1, NULL::text, NULL::timestamp without time zone
 Planning time: 0.036 ms
 Execution time: 6.330 ms
(6 rows)

pg_pathman的执行计划:

postgres=# explain (analyze,verbose,timing,costs,buffers) insert into tbl_range values (1);
                                                    QUERY PLAN
------------------------------------------------------------------------------------------------------------------
 Insert on public.tbl_range  (cost=0.00..0.01 rows=1 width=44) (actual time=0.214..0.214 rows=0 loops=1)
   Buffers: shared hit=19
   ->  Custom Scan (PartitionFilter)  (cost=0.00..0.01 rows=1 width=44) (actual time=0.067..0.068 rows=1 loops=1)
         Output: id, info, crt_time
         Buffers: shared hit=8
         ->  Result  (cost=0.00..0.01 rows=1 width=44) (actual time=0.001..0.001 rows=1 loops=1)
               Output: 1, NULL::text, NULL::timestamp without time zone
 Planning time: 5.177 ms
 Execution time: 0.287 ms
(9 rows)

参考

《PostgreSQL 10.0 preview 功能增强 - 内置分区表》

《Linux 性能诊断 perf使用指南》

《[未完待续] PostgreSQL sharding 套件(pg_pathman, postgres_fdw, logical replication)》

《PostgreSQL 9.5+ 高效分区表实现 - pg_pathman》

《pg_pathman extension for postgresql partitioning》

时间: 2024-09-20 06:04:41

PostgreSQL 10 内置分区 vs pg_pathman的相关文章

PostgreSQL 在路上的特性 - 远离触发器, 拥抱内置分区

之前分享过阿里云RDS PG支持分区表的文章https://yq.aliyun.com/articles/113今天要给大家带来另一个好消息,PostgreSQL 社区版本终于要有集成的分区表特性了,再也不用为写分区触发器烦恼了.(很多人认为PG现有的分区表用法是"惨无人道"的(除了管理不方便,性能也是个问题),就像是一粒老鼠屎,坏了一锅汤.社区终于要把老鼠屎请出去了.) 如果你不care性能,可以看看我以前写的一个通用的分区表触发器函数,一个函数打天下http://blog.163.

PostgreSQL - 全文检索内置及自定义ranking算法介绍 与案例

标签 PostgreSQL , 全文检索 , ranking 背景 <用PostgreSQL 做实时高效 搜索引擎 - 全文检索.模糊查询.正则查询.相似查询.ADHOC查询> <排序算法>这个章节实际上介绍了PostgreSQL的ranking算法. tsvector将文档分为4层结构:标题.作者.摘要.内容.对这四个层级,用户可以设定对应的weight,用于ranking的计算.同时用户可以设定ranking的修正掩码. 但是只有四个层级,远远不能满足业务需求,那么Postgr

Windows 10内置邮件应用添加账户的方法图解

1.我们在电脑的桌面点击"开始"进入后找到"邮件"选项,然后点击进入,细节如下图所示: 2.在这里我们选项"添加帐户",不要选择在线创建了,在线话会创建一个帐户了 3.选择要添加的帐户类型,具体类型可以参考备注,下面我们以常见的POP的126的邮箱为例进行操作.简单设置可以使用"其他帐户",此操作是由系统自动配置,我们仅需要输入用户名和密码即可,但是会有一定配置错误的可能,建议大家选择"高级安装程序": 4

PostgreSQL 10 + PostGIS + Sharding(pg_pathman) + MySQL(fdw外部表) on ECS 部署指南(适合新用户)

标签 PostgreSQL , Linux , CentOS 背景 新用户部署PostgreSQL以及空间数据库插件PostGIS的指南. 内网环境RPM打包(可选项) 如果是内网环境,可以将包全部下载到本地再用rpm安装. 安装epel和postgresql yum rpm两个包后再执行: 1.使用yum-utils的yumdownloader下载需要的安装包,包括依赖包. yum install -y yum-utils yumdownloader --resolve --destdir=/

最受开发者欢迎的HTAP数据库PostgreSQL 10特性

标签 PostgreSQL , 10 , 特性 , 开发者 背景 作为一款HTAP数据库(同时支持 "OLTP高并发在线事务处理" 与 "OLAP在线分析" 业务场景),PostgreSQL 10的哪些特性是开发人员.DBA.架构师都喜欢的呢? 多核并行增强 9.6的版本支持如下并行: Sequential scans Aggregates Hash and loop joins 10 并行增强: 1.通过 max_parallel_workers 控制最大并行度,

PostgreSQL 10.0 内置分区表

标签 PostgreSQL , 10.0 , 分区表 , partitiion table , range , list 背景 PostgreSQL 和它的LOGO大象一样,给人非常强大的安全感. 就拿它的Feature来说,一个大的feature要打磨很多年才能正式的合并到master分支. 比如并行计算的特性,从9.4就开始准备,加入了work process和dynamic shared memory的功能,奠定了多进程并行执行的基础. 一致到9.6,经历了3年的开发,大量的测试,终于RE

PostgreSQL 10.0 preview 功能增强 - 触发器函数内置中间表

标签 PostgreSQL , 10.0 , 触发器 , 中间表 , OLD , NEW 背景 在触发器中,如果要提取触发该事件的记录,使用OLD和NEW关键字. OLD.* , NEW.* 提取 对于for statement after触发器,触发的记录数可能是很多的,PostgreSQL 10.0增加了一个功能,中间表. 在触发器函数中,可以使用这个中间表,中间表的数据就是触发器涉及的数据,中级镖的功能支持after触发器(因为after后才有全部的记录呀). 语法 [ REFERENCI

用win7内置功能调整分区的方法

  如何利用win7的内置功能调整分区呢,下面就是详细的操作技巧: Step1:进入系统管理界面.在开始菜单中找到计算机/在计算机上点击右键选择管理/进入存储中的磁盘管理. Step2:压缩已有分区.找到所需要调整的硬盘,可以看到图形化的分区示意图.在需要缩小的分区上点击右键/选择压缩卷/软件会自动计算可以压缩的大小,如果可压缩数值比较小最好先进行碎片整理/输入一个压缩数值,点击压缩.等操作完成后,将会在原有分区后部出现未分配空间. step3:创建新分区.在未分配空间上点击右键选择新建简单卷/

如果您想确保Windows 10在新用户登录时不安装内置应用程序,则必须删除所有配置的应用程序。

原文 如果您想确保Windows 10在新用户登录时不安装内置应用程序,则必须删除所有配置的应用程序. 本文的内容 已安装与配置的应用程序 删除配置的应用程序 安装与配置的应用程序^ 在介绍如何删除所有内置应用程序之前,我必须解释安装和配置的应用程序之间的区别.这种差异仅适用于Microsoft现在称为Windows应用程序的新的触摸优化应用程序. 您可能已经注意到,每当用户首次在Windows 10计算机上登录时,Windows将开始安装该特定用户的应用程序.这些应用程序是配置的应用程序.同样