- 论坛徽章:
- 0
|
1.表接口如下
Table "public.tmp_wal_compress"
Column | Type | Collation | Nullable | Default
-------------+-----------------------+-----------+----------+---------
id | bigint | | |
random_char | character varying(50) | | |
random_int | bigint | | |
2.使用下来语句插入200W数据
insert into tmp_wal_compress select generate_series(1, 2000000) as id, md5(random()::text) as info ,trunc(random()*2000000);
3.插入前系统内存
~ # free -m
total used free shared buffers
Mem: 15971 14134 1836 37 0
-/+ buffers: 14133 1837
4.插入后系统内存
~ # free -m
total used free shared buffers
Mem: 15971 14530 1441 37 2
-/+ buffers: 14528 1443
Swap: 0 0 0
~ #
插入空闲内存一直1.4G,不能回到原来的1.8G,不管多长时间都不释放。这些数据内存一直缓存在缓冲区,除非使用echo 3 >/proc/sys/vm/drop_caches释放。
侠来帮下忙,实在困惑
|
|