Greenplum version or build
Greenplum Database 7.0.0-alpha.0 commit:26fbf68751ab3bfbab63714bacee24693c1ce610
I use tpcds test greenplum. The test data volume is 10T,then get error result
Canceling query because of high VMEM usage. Used: 7373MB, available 819MB, red zone: 7372MB (runaway_cleaner.c:202)",,,,,,"select * from (select i_category ,i_class ,i_brand ,i_product_name ,d_year ,d_qoy ,d_moy ,s_store_id ,sumsales ,rank() over (partition by i_category order by sumsales desc) rk from (select i_category ,i_class ,i_brand ,i_product_name ,d_year ,d_qoy ,d_moy ,s_store_id ,sum(coalesce(ss_sales_price*ss_quantity,0)) sumsales from store_sales ,date_dim ,store ,item where ss_sold_date_sk=d_date_sk and ss_item_sk=i_item_sk and ss_store_sk = s_store_sk and d_month_seq between 1201 and 1201+11 group by rollup(i_category, i_class, i_brand, i_product_name, d_year, d_qoy, d_moy,s_store_id))dw1) dw2 where rk <= 100 order by i_category ,i_class ,i_b",0,,"runaway_cleaner.c",202
pg_log has some error info:
`
2020-10-30 11:20:48.170404 HKT,,,p14919,th1619134592,,,,0,,,seg10,,,,,»LOG»,»00000″,»3rd party error log:
TopMemoryContext: 285312 total in 9 blocks; 33256 free (32 chunks); 252056 used
«,,,,,,,,»SysLoggerMain»,»syslogger.c»,691,
2020-10-30 11:20:48.170602 HKT,,,p14919,th1619134592,,,,0,,,seg10,,,,,»LOG»,»00000″,»3rd party error log:
TupSerMemCtxt: 8192 total in 1 blocks; 8152 free (0 chunks); 40 used
Interconnect Context: 8192 total in 1 blocks; 8152 free (0 chunks); 40 used
MessageContext: 8192 total in 1 blocks; 7112 free (0 chunks); 1080 used
Oid dispatch context: 0 total in 0 blocks; 0 free (0 chunks); 0 used
UdpInterconnectMemContext: 8192 total in 1 blocks; 6056 free (41 chunks); 2136 used
Local Stat Portal Hash: 8192 total in 1 blocks; 2696 free (0 chunks); 5496 used
Operator class cache: 8192 total in 1 blocks; 776 free (0 chunks); 7416 used
smgr relation table: 24576 total in 2 blocks; 13008 free (4 chunks); 11568 used
TransactionAbortContext: 32768 total in 1 blocks; 32728 free (0 chunks); 40 used
Portal hash: 8192 total in 1 blocks; 776 free (0 chunks); 7416 used
PortalMemory: 8192 total in 1 blocks; 8152 free (1 chunks); 40 used
Relcache by OID: 24576 total in 2 blocks; 12960 free (4 chunks); 11616 used
CacheMemoryContext: 548976 total in 8 blocks; 169712 free (0 chunks); 379264 used
pg_db_role_setting_databaseid_rol_index: 1024 total in 1 blocks; 312 free (0 chunks); 712 used
pg_opclass_am_name_nsp_index: 1024 total in 1 blocks; 16 free (0 chunks); 1008 used
pg_foreign_data_wrapper_name_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_enum_oid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_class_relname_nsp_index: 1024 total in 1 blocks; 312 free (0 chunks); 712 used
pg_foreign_server_oid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_statistic_relid_att_inh_index: 1024 total in 1 blocks; 16 free (0 chunks); 1008 used
pg_cast_source_target_index: 1024 total in 1 blocks; 312 free (0 chunks); 712 used
pg_language_lanname_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_transform_oid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_partition_rule_oid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_partition_oid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_collation_oid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_amop_fam_strat_index: 1024 total in 1 blocks; 16 free (0 chunks); 1008 used
pg_index_indexrelid_index: 1024 total in 1 blocks; 400 free (0 chunks); 624 used
pg_ts_template_tmplname_index: 1024 total in 1 blocks; 312 free (0 chunks); 712 used
pg_ts_config_map_index: 1024 total in 1 blocks; 16 free (0 chunks); 1008 used
gp_policy_localoid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_opclass_oid_index: 1024 total in 1 blocks; 400 free (0 chunks); 624 used
pg_foreign_data_wrapper_oid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_event_trigger_evtname_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_ts_dict_oid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_event_trigger_oid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_conversion_default_index: 1024 total in 1 blocks; 16 free (0 chunks); 1008 used
pg_operator_oprname_l_r_n_index: 1024 total in 1 blocks; 16 free (0 chunks); 1008 used
pg_trigger_tgrelid_tgname_index: 1024 total in 1 blocks; 312 free (0 chunks); 712 used
pg_extprotocol_ptcname_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_enum_typid_label_index: 1024 total in 1 blocks; 312 free (0 chunks); 712 used
«,,,,,,,,»SysLoggerMain»,»syslogger.c»,691,
2020-10-30 11:20:48.171125 HKT,,,p14919,th1619134592,,,,0,,,seg10,,,,,»LOG»,»00000″,»3rd party error log:
pg_ts_config_oid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_user_mapping_oid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_opfamily_am_name_nsp_index: 1024 total in 1 blocks; 16 free (0 chunks); 1008 used
pg_foreign_table_relid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_type_oid_index: 1024 total in 1 blocks; 400 free (0 chunks); 624 used
pg_aggregate_fnoid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_constraint_oid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_rewrite_rel_rulename_index: 1024 total in 1 blocks; 312 free (0 chunks); 712 used
pg_ts_parser_prsname_index: 1024 total in 1 blocks; 312 free (0 chunks); 712 used
pg_ts_config_cfgname_index: 1024 total in 1 blocks; 312 free (0 chunks); 712 used
pg_ts_parser_oid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_operator_oid_index: 1024 total in 1 blocks; 400 free (0 chunks); 624 used
pg_namespace_nspname_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_ts_template_oid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_amop_opr_fam_index: 3072 total in 2 blocks; 1976 free (0 chunks); 1096 used
pg_default_acl_role_nsp_obj_index: 1024 total in 1 blocks; 16 free (0 chunks); 1008 used
pg_collation_name_enc_nsp_index: 1024 total in 1 blocks; 16 free (0 chunks); 1008 used
pg_range_rngtypid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_ts_dict_dictname_index: 1024 total in 1 blocks; 312 free (0 chunks); 712 used
pg_type_typname_nsp_index: 1024 total in 1 blocks; 312 free (0 chunks); 712 used
pg_opfamily_oid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_class_oid_index: 1024 total in 1 blocks; 400 free (0 chunks); 624 used
pg_proc_proname_args_nsp_index: 1024 total in 1 blocks; 16 free (0 chunks); 1008 used
pg_transform_type_lang_index: 1024 total in 1 blocks; 312 free (0 chunks); 712 used
pg_attribute_relid_attnum_index: 1024 total in 1 blocks; 264 free (0 chunks); 760 used
pg_proc_oid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_language_oid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_namespace_oid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_amproc_fam_proc_index: 3072 total in 2 blocks; 1976 free (0 chunks); 1096 used
pg_foreign_server_name_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_attribute_relid_attnam_index: 1024 total in 1 blocks; 312 free (0 chunks); 712 used
pg_conversion_oid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_user_mapping_user_server_index: 1024 total in 1 blocks; 312 free (0 chunks); 712 used
pg_extprotocol_oid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_conversion_name_nsp_index: 1024 total in 1 blocks; 312 free (0 chunks); 712 used
pg_authid_oid_index: 1024 total in 1 blocks; 400 free (0 chunks); 624 used
pg_auth_members_member_role_index: 1024 total in 1 blocks; 312 free (0 chunks); 712 used
pg_tablespace_oid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_shseclabel_object_index: 1024 total in 1 blocks; 16 free (0 chunks); 1008 used
pg_resgroup_rsgname_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_replication_origin_roname_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_database_datname_index: 1024 total in 1 blocks; 400 free (0 chunks); 624 used
pg_replication_origin_roiident_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_auth_members_role_member_index: 1024 total in 1 blocks; 312 free (0 chunks); 712 used
«,,,,,,,,»SysLoggerMain»,»syslogger.c»,691,
2020-10-30 11:20:48.171610 HKT,,,p14919,th1619134592,,,,0,,,seg10,,,,,»LOG»,»00000″,»3rd party error log:
pg_database_oid_index: 1024 total in 1 blocks; 400 free (0 chunks); 624 used
pg_authid_rolname_index: 1024 total in 1 blocks; 400 free (0 chunks); 624 used
pg_resgroup_oid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
pg_auth_time_constraint_authid_index: 1024 total in 1 blocks; 448 free (0 chunks); 576 used
WAL record construction: 172608 total in 2 blocks; 6584 free (0 chunks); 166024 used
GPORCA Top-level Memory Context: 0 total in 0 blocks; 0 free (0 chunks); 0 used
GPORCA memory pool: 1040384 total in 7 blocks; 452736 free (8 chunks); 587648 used
GPORCA memory pool: 8192 total in 1 blocks; 6712 free (0 chunks); 1480 used
GPORCA memory pool: 8192 total in 1 blocks; 3400 free (0 chunks); 4792 used
GPORCA memory pool: 0 total in 0 blocks; 0 free (0 chunks); 0 used
GPORCA memory pool: 8192 total in 1 blocks; 8128 free (0 chunks); 64 used
GPORCA memory pool: 106560 total in 2 blocks; 3816 free (0 chunks); 102744 used
GPORCA memory pool: 32832 total in 2 blocks; 8008 free (0 chunks); 24824 used
GPORCA memory pool: 0 total in 0 blocks; 0 free (0 chunks); 0 used
GPORCA memory pool: 32832 total in 2 blocks; 7432 free (0 chunks); 25400 used
PrivateRefCount: 8192 total in 1 blocks; 2840 free (0 chunks); 5352 used
MdSmgr: 8192 total in 1 blocks; 8120 free (0 chunks); 72 used
«,,,,,,,,»SysLoggerMain»,»syslogger.c»,691,
2020-10-30 11:20:48.171813 HKT,,,p14919,th1619134592,,,,0,,,seg10,,,,,»LOG»,»00000″,»3rd party error log:
LOCALLOCK hash: 8192 total in 1 blocks; 776 free (0 chunks); 7416 used
Timezones: 104120 total in 2 blocks; 2840 free (0 chunks); 101280 used
ErrorContext: 8192 total in 1 blocks; 8152 free (0 chunks); 40 used
Grand total: 2610344 bytes in 132 blocks; 852504 free (90 chunks); 1757840 used
«,,,,,,,,»SysLoggerMain»,»syslogger.c»,691,
`
DBA’s occasionally experience “out of memory” errors that can cause failed queries and degrade system performance. Fortunately, the Greenplum Database provides facilities to avoid this.
We will discuss two of those facilities: the gp_vmem_protect_limit parameter, and Greenplum resource queues. The parameters and techniques mentioned here are explained in detail in the Greenplum Database Administrator Guide.
The gp_vmem_protect_limit parameter: The “gp_vmem_protect_limit” parameter sets the amount of memory that all processes of an active segment instance can consume. Queries that cause the limit to be exceeded will be cancelled.
Note that this is a local parameter and must be set for each segment in the system. The system must be restarted for parameter changes to take effect.
How to set the gp_vmem_protect_limit
As a general rule-of-thumb, gp_vmem_protect_limit should be set to:
( X * physical_memory_in_MB ) /#_of_primary_segments
X should be a value between 1.0 and 1.5. A value of X=1.0 offers the best overall system performance; a value of X=1.5 may impact system performance because of swap activity but will result in fewer canceled queries.
For example, to set gp_vmem_protect_limit conservatively (X=1.0) on a segment host with 16GB (16384 MB) of physical memory with 4 primary segment instances, the calculation would be: (1 * 16384) / 4 = 4096.
The MEMORY_LIMIT parameter for Greenplum Resource Queues:Greenplum resource queues provide a way to manage and prioritize workloads. Resource queues can be created with a MEMORY_LIMIT setting to restrict the total amount of memory that queries can consume in any segment instance. Queries that cause a queue to exceed the MEMORY_LIMIT must wait until queue resources are free before they can execute.
By assigning each user to a queue and limiting the amount of memory queues can consume, administrators can ensure proper resource allocation across the system.
Note that roles with the SUPERUSER attribute are exempt from queue limits.
How to set MEMORY_LIMIT to avoid Out of Memory errors:As a general rule-of-thumb, the sum of all the MEMORY_LIMITs across all the queues should be no more than 90% of the gp_vmem_protect_limit.
Common Out of Memory Errors
The two most common errors are described below. They look similar but have different reasons and solutions.
Error code 53200
Example:
«ERROR»,»53200″,»Out of memory. Failed on request of size 156 bytes. (context ‘CacheMemoryContext’) (aset.c:840)»
Description:
The system canceled a query because a segment server’s OS did not have enough memory to satisfy a postmaster process allocation request.
How to Avoid
1. Set gp_vmem_protect_limit according to the formula above.
2. Adding memory can help greatly if lowering gp_vmem_protect_limit results in too many canceled queries.(Gp_vmem_protect_limit can be raised after adding memory.)
3. Adding swap space may help, although increased swap activity will impact system performance.
Error code 53400
Example
«ERROR»,»53400″,»Out of memory (seg13 slice13 sdw1-1:40001 pid=10183)»,»VM Protect failed to allocate 8388608 bytes, 6 MB available»
Description
The system canceled a query because a postmaster process tried to request more memory than the gp_vmem_protect_limit parameter allows.
How to Avoid
1. Make sure the sum of all MEMORY_LIMITs across all active queues is <= 90% of gp_vmem_protect_limit.
2. Increase gp_vmem_protect_limit, if possible, using the formula described above.
3. Ensure the system is not unbalanced (i.e., some segments down). Use gpstate -e to verify.
lamb gong
unread,
Aug 7, 2018, 4:29:42 PM8/7/18
to Greenplum Users
hi,
I have a empty partition table, and i want alter one column type from varchar(16) —> varchar(64)
And i get error as follow:
ERROR: Canceling query because of high VMEM usage. Used: 7375MB, available 817MB, red zone: 7372MB (runaway_cleaner.c:189) (seg1 10.0.13.145:40000 pid=1992) (cdbdisp_query.c:542)
I know that is beause gp_vmem_protect_limit is 8192, my confusion is the table is empty, why alter a column type would cost so much memory?
By the way, my table have 247 partitions.
And is there any other way to alter the column type without modify gp_vmem_protect_limit ?
Thanks!
Simon Gao
unread,
Aug 7, 2018, 5:36:23 PM8/7/18
to gongga…@gmail.com, Greenplum Users
are you using legacy planner or orca?
Luis Macedo
unread,
Aug 7, 2018, 5:36:54 PM8/7/18
to lamb gong, Greenplum Users
Hi!
Let me see if I understood correctly:
1- You have a partitioned table with 247 partitions
2 — The table is empty
3 — You issued an alter table to augment the size of the varchar column
4 — It crashes due to out of memory (reached the vmem limit)
For now (this will be improved as we merge new PG versions) I recommend that you insert select in a new table, rename and drop old one.
Above been said, that should not happen. Can you share you GPDB version, table DDL and the alter table DDL? Maybe some of the guys can try to reproduce it and fix it. You may also open a PR.
Thanks,
Take care of the customers and the rest takes care of itself
—
—
lamb gong
unread,
Aug 8, 2018, 4:15:39 AM8/8/18
to Greenplum Users, gongga…@gmail.com
ORCA
postgres=# show optimizer;
optimizer
————
on
(1 row)
在 2018年8月7日星期二 UTC+8下午10:36:23,SIMON GAO写道:
lamb gong
unread,
Aug 8, 2018, 4:22:48 AM8/8/18
to Greenplum Users, gongga…@gmail.com
Thanks for the reply
You understanding is correct
1. the version is oss 5x_stable
2. table ddl is as attached : t_summer
3. alter ddl : alter table t_summer alter column channel type char(64)
在 2018年8月7日星期二 UTC+8下午10:36:54,Luis Macedo写道:
lamb gong
unread,
Aug 8, 2018, 4:33:45 AM8/8/18
to Greenplum Users, gongga…@gmail.com
By the way, the pg version is 8.3.23
在 2018年8月7日星期二 UTC+8下午10:36:54,Luis Macedo写道:
Venkatesh Raghavan
unread,
Aug 8, 2018, 11:00:50 AM8/8/18
to lamb gong, Greenplum Users
Hi All,
Alter table command should not care if it is Orca or Planner.
dump=# set optimizer = off;
SET
dump=# alter table t_summer alter column channel type char(64) ;
ERROR: Canceling query because of high VMEM usage. Used: 7375MB, available 817MB, red zone: 7372MB (runaway_cleaner.c:189) (seg0 192.168.1.24:25432 pid=20693) (cdbdisp_query.c:542)
dump=# set optimizer = on;
SET
dump=# alter table t_summer alter column channel type char(64); ERROR: Canceling query because of high VMEM usage. Used: 7375MB, available 817MB, red zone: 7372MB (runaway_cleaner.c:189) (seg2 192.168.1.24:25434 pid=20695) (cdbdisp_query.c:542)
dump=#
Rob/Jesse/Asim, can you please chime in on this thread.
Regards,
V
ᐧ
lamb gong
unread,
Aug 9, 2018, 11:38:43 AM8/9/18
to Greenplum Users
hi,
Can anybody give some suggestion here?
The high VMEM usage problem is as expectation or it is a bug?
在 2018年8月7日星期二 UTC+8下午9:29:42,lamb gong写道:
Luis Macedo
unread,
Aug 9, 2018, 2:21:58 PM8/9/18
to lamb gong, Greenplum Users
It’s a bug or it’s a very bad plan due to lack of stats.
My guess is that this is failing on the master . Try analysing the data dictionary tables. Look for a script on the link below, it will make things easier.
Let us know if it works.
— Sent from my Google Pixel
lamb gong
unread,
Aug 9, 2018, 4:25:39 PM8/9/18
to Greenplum Users, gongga…@gmail.com
I run VACUUM ANALYZE, but it’s the same error
postgres=# VACUUM ANALYZE t_summer;
VACUUM
postgres=# alter table t_summer alter column channel type char(64);
ERROR: Canceling query because of high VMEM usage. Used: 7375MB, available 817MB, red zone: 7372MB (runaway_cleaner.c:189) (seg1 10.0.13.145:40000 pid=968) (cdbdisp_query.c:542)
在 2018年8月9日星期四 UTC+8下午7:21:58,Luis Macedo写道:
Luis Macedo
unread,
Aug 9, 2018, 5:13:28 PM8/9/18
to lamb gong, Greenplum Users
Hi!
That is not what I meant. I mean running analyse against the catalog tables. There is a script on the link that iterates over the catalog tables running vacuum analyse.
— Sent from my Google Pixel
yuwei…@gmail.com
unread,
Aug 9, 2018, 5:22:50 PM8/9/18
to Luis Macedo, gongga…@gmail.com, Greenplum Users
Looks like vmem issue here. so you have 800mb virtual memory in system and you setup 8gb vmem protect in greenplum.
runaway_cleaner detects this and kill your query to avoid oom kill.
Yu-wei Sung
Kushal Choubay
unread,
Aug 10, 2018, 1:24:40 AM8/10/18
to yuwei…@gmail.com, Luis Macedo, gongga…@gmail.com, Greenplum Users
Hi Lamb gong,
Out of 247 child partitions you are using 1 MB blocksize for 246. I have changed it to 32KB (default) and ALTER COLUMN worked fine for «t_summer» .
lamb gong
unread,
Aug 10, 2018, 5:33:14 AM8/10/18
to Greenplum Users, gongga…@gmail.com
I run
analyzedb -s pg_catalog -d postgres
Is that what you mean?
But it dons’t work
在 2018年8月9日星期四 UTC+8下午10:13:28,Luis Macedo写道:
Kushal Choubay
unread,
Aug 10, 2018, 6:12:03 AM8/10/18
to yuwei…@gmail.com, Greenplum Users, Luis Macedo, gongga…@gmail.com
Have you tried changing block size to default 32k ?
—
lamb gong
unread,
Aug 10, 2018, 9:08:47 AM8/10/18
to Greenplum Users, yuwei…@gmail.com, lma…@pivotal.io, gongga…@gmail.com
It work for me, thanks!
So the problem is setting blocksize too large?Is there any suggestion about how to set the blocksize parameter?
Thanks!
在 2018年8月10日星期五 UTC+8上午6:24:40,Kushal Choubay写道:
—
You received this message because you are subscribed to the Google Groups «Greenplum Users» group.
Kushal Choubay
unread,
Aug 10, 2018, 9:19:18 AM8/10/18
to lamb gong, Greenplum Users, yuwei…@gmail.com, Luis Macedo
You can refer below link for more information on choosing storage types :
lamb gong
unread,
Aug 10, 2018, 9:23:07 AM8/10/18
to Greenplum Users, gongga…@gmail.com, yuwei…@gmail.com, lma…@pivotal.io
Thanks!
在 2018年8月10日星期五 UTC+8下午2:19:18,Kushal Choubay写道:
hasielhassan Asks: FFMPEG: is it possible to offset output frames from a selection of specific frames?
I’m doing some ffmpeg (4.1.3) transcodings by extracting specific frames from the source, in this case, the source can be either a movie or an image sequence, all working fine with the following command:
Code:
ffmpeg -i source.mov -vf select='eq(n,2)+eq(n,80)+eq(n,150)' -vsync 0 -frame_pts 1 frames_%04d.jpeg
In the case of a source image sequence, I only need to specify the start number (since my frames usually start in 100 or further):
Code:
ffmpeg -start_number 94 -i source.%04d.png -vf select='eq(n,2)+eq(n,80)+eq(n,150)' -vsync 0 -frame_pts 1 frames_%04d.jpeg
But the issue is that the frame numbers that I get match the exact numbers that I asked for, which are those required from the select filter and start at 0, in the example of the image sequence, you can see that it actually starts at frame 94, and technically the movies replicate the same, their first frame is the same as 94 in image sequence, and i will love to have a way to get the output numbers be offset by a certain number so they match the corresponding «source» frame.
I already tried adding a -start_number at the end before the output, which works with regular transcodes, but it seems not to work in combination of -frame_pts
I will love to be able to do something like this:
Code:
ffmpeg -start_number 94 -i source.%04d.png -vf select='eq(n,2)+eq(n,80)+eq(n,150)' -vsync 0 -start_number 94 -frame_pts 1 frames_%04d.jpeg
And get frame 96, 174 and 244 instead of 2, 80 and 150.
Is there a way to do that ?
Thanks in advanced!
SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.
Hi.
I met Error during the test of TPC-DS and can’t continue now:
ERROR: Canceling query because of high VMEM usage. Used: 4613MB, available 507MB, red zone: 4608MB (runaway_cleaner.c:189) (seg19 slice5 192.168.65.11:6007 pid=55634) (cdbdisp.c:254)
I tried to modify a lot of parameters but still have no effect, e.g:
- gp_vmem_protect_limit:5120
- shared_buffers:128MB
- work_mem:32MB
- maintenance_work_mem:64MB
- effective_cache_size:512MB
I set gp_vmem_protect_limit to 8192, 12288, 15360 by gpconfig but still not work.
Env
- greenplum version: 5.1.8
- operating system: CentOS Linux release 7.3.1611 (Core)
There are 3 nodes in my Greenplum cluster.
- node6: 256G mem, 12 * 3.7T disk
- node7: 256G mem, 12 * 3.7T disk
- node11: 128G mem, 12 * 3.7T disk
[gpadmin@node6 TPC-DS]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/cl-root 50G 7.3G 43G 15% /
devtmpfs 126G 0 126G 0% /dev
tmpfs 126G 0 126G 0% /dev/shm
tmpfs 126G 9.4M 126G 1% /run
tmpfs 126G 0 126G 0% /sys/fs/cgroup
/dev/sdc1 1014M 140M 875M 14% /boot
/dev/sdd 3.7T 307G 3.4T 9% /data/data9
/dev/sdl1 3.7T 307G 3.4T 9% /data/data6
/dev/sdj 3.7T 307G 3.4T 9% /data/data11
/dev/sdg1 3.7T 308G 3.4T 9% /data/data2
/dev/sdk1 3.7T 307G 3.4T 9% /data/data5
/dev/sdf 3.7T 307G 3.4T 9% /data/data10
/dev/sdi1 3.7T 307G 3.4T 9% /data/data4
/dev/sdm 3.7T 306G 3.4T 9% /data/data12
/dev/sdb 3.7T 307G 3.4T 9% /data/data8
/dev/sde1 3.7T 2.1T 1.6T 58% /data/data1
/dev/sda 3.7T 307G 3.4T 9% /data/data7
/dev/sdh1 3.7T 307G 3.4T 9% /data/data3
/dev/mapper/cl-home 392G 29G 364G 8% /home
tmpfs 26G 0 26G 0% /run/user/0
tmpfs 26G 0 26G 0% /run/user/1000
node6:
total used free shared buff/cache available
Mem: 251G 2.0G 243G 5.3G 5.5G 243G
Swap: 4.0G 0B 4.0G
node7:
total used free shared buff/cache available
Mem: 251G 2.0G 243G 5.3G 5.5G 243G
Swap: 2.2G 0B 2.2G
node11:
total used free shared buff/cache available
Mem: 125G 1.3G 118G 5.1G 5.3G 118G
Swap: 2.2G 0B 2.2G
tpcds_variables.sh
REPO="TPC-DS"
REPO_URL="https://github.com/pivotalguru/TPC-DS"
ADMIN_USER="gpadmin"
INSTALL_DIR="/pivotalguru"
EXPLAIN_ANALYZE="false"
RANDOM_DISTRIBUTION="false"
MULTI_USER_COUNT="5"
GEN_DATA_SCALE="1024"
SINGLE_USER_ITERATIONS="1"
RUN_COMPILE_TPCDS="false"
RUN_GEN_DATA="true"
RUN_INIT="true"
RUN_DDL="true"
RUN_LOAD="true"
RUN_SQL="true"
RUN_SINGLE_USER_REPORT="true"
RUN_MULTI_USER="true"
RUN_MULTI_USER_REPORT="true"
RUN_SCORE="true"
Error log
tail tpcds.log
20190802:18:49:05:011726 analyzedb:node6:gpadmin-[INFO]:-Done.
/pivotalguru/TPC-DS/05_sql/rollout.sh
source ~/.bashrc
psql -v ON_ERROR_STOP=1 -A -q -t -P pager=off -v EXPLAIN_ANALYZE="" -f /pivotalguru/TPC-DS/05_sql/101.tpcds.01.sql | wc -l
psql -v ON_ERROR_STOP=1 -A -q -t -P pager=off -v EXPLAIN_ANALYZE="" -f /pivotalguru/TPC-DS/05_sql/102.tpcds.02.sql | wc -l
psql:/pivotalguru/TPC-DS/05_sql/102.tpcds.02.sql:59: ERROR: Canceling query because of high VMEM usage. Used: 4610MB, available 510MB, red zone: 4608MB (runaway_cleaner.c:189) (seg32 slice2 192.168.65.7:6008 pid=24111) (cdbdisp.c:254)
note:
the 59th line of 102.tpcds.02.sql is :
Observation
I observed memory changes during execute 05_sql/102.tpcds.02.sql separately in psql, here are three stage:
- In the beginning, the free memory of all nodes drops at approximately 1G.
- node6: 239G -> 120G
- node7: 239G -> 120G
- node11: 111G -> 320M
- When node11 drops to 320M, it starts to stay the same, and the other two nodes continue to decline
- node6: 120G -> 90G
- node7: 120G -> 90G
- node11: keep at 320M
- node11 occurs Error
- if set gp_vmem_protect_limit to 8192, 12288, its error message like this:
ERROR: Canceling query because of high VMEM usage. Used: 4613MB, available 507MB, red zone: 4608MB (runaway_cleaner.c:189) (seg19 slice5 192.168.65.11:6007 pid=55634) (cdbdisp.c:254)
- if set gp_vmem_protect_limit to 15360, its error message is «out of memory, cannot allocat ….8192…»:
please help
I also tried to modify the resource queue parameters, GEN_DATA_SCALE, but still can not be completed.
What is the difference between data overflowing into the spill file and data in vmem? When will it overflow and when will it be cancelled?
I don’t know how to finish the TPC-DS test. please help. :simple_smile:
We have small array of gpdb cluster. in that, few queries are failing
System Related information
TOTAL RAM =30G
SWAP =15G
gp_vmem_protect_limit= 2700MB
TOTAL segment = 8 Primary + 8 mirror = 16
SEGMENT HOST=2
VM_OVERCOMMIT RATIO =72
Used this calc : http://greenplum.org/calc/#
SYMPTOM
The query failed with the error message shown below:
ERROR: XX000: Canceling query because of high VMEM usage. Used: 2433MB, available 266MB, red zone: 2430MB (runaway_cleaner.c:135) (seg2 slice74 DATANODE01:40002 pid=11294) (cdbdisp.c:1320)
We tried :
changed following parameters
statement_mem from 125 MB to 8GB
MAX_STATEMENT MEMORY from 200 MB TO 16 GB
Not sure what exactly needs to change here.still, trying to understand root cause of error.
Any help in it would be much appreciated ?
gp_vmem_protect_limit is for per segment. You have 16segments. based on your segments and vm_protect, you need 2700MB X 16 total memory.
Related
Elastic Search 2.3.3 heap used too high,jvm old gen percent 100%,not crash
Elasticsearch version:2.3.3
Plugins installed: []
JVM version:1.8_091
OS version:linux-3.10.101kernel
Description of the problem including expected versus actual behavior:
We deploy 12 es nodes in 3 machine. After we insert 1 billion record into es cluster and Meanwhile,we also send query request to es for search. After 3 day passed, es's jvm heap FGC frequently.the node's jvm gcutil looks like that: total 3.8GB for ES_HEAP, 2.6GB for jvm's old gen, and the old gen used is 100%.
We stop all write and read request,but the old gen used could not decrease. The old gen used is 100%.
We clear cache of es,but the old gen used only decrease to 96%.
Steps to reproduce:
use config see below
do insert and query
after data increase to 1 billion, heap used become 100%.
Provide logs (if relevant):
[2017-02-05 11:58:38,221][INFO ][monitor.jvm ] [xxx]
[gc][old][1332853][268813] duration [5s], collections 1/[5.1s],
total [5s]/[17.2h], memory [3.8gb]->[2.8gb]/[3.8gb], all_pools
{[young] [1gb]->[166.8mb]/[1gb]}{[survivor]
[130.7mb]->[0b]/[136.5mb]}{[old] [2.6gb]->[2.6gb]/[2.6gb]} [2017-02-05
12:04:39,450][INFO ][monitor.jvm ] [xxx] [gc][old][1333207][268917]
duration [6.2s], collections 1/[6.5s], total [6.2s]/[17.2h], memory
[3.8gb]->[2.8gb]/[3.8gb], all_pools {[young]
[1gb]->[165.2mb]/[1gb]}{[survivor] [111mb]->[0b]/[136.5mb]}{[old]
[2.6gb]->[2.6gb]/[2.6gb]}
You can look at the reference for more information.
Why Spark application runs much slower with lower MaxGCPauseMillis?
I am testing Spark-1.5.1 with different G1 configurations and observe that my application takes 2 min to complete with MaxGCPauseMillis = 200 (default) and 4 min with MaxGCPauseMillis = 1. The heap usage depicted below. We can see from the statistics below that the GC time of both configs is different by only 5 sec. I am wondering why execution time increases this much? Some statistics: MaxGCPauseMillis = 200 - No. young GCs: 67; GC time of an executor: 9.8 sec MaxGCPauseMillis = 1 - No. young GCs: 224; GC time of an executor: 14.7 sec Red area is area is young generation, black is old generation. The application runs on 10 nodes with 1 executor and 6 GB heap each. The application is a Word Count example: val lines = sc.textFile(args(0), 1) val words = lines.flatMap(l => SPACE.split(l)) val ones = words.map(w => (w,1)) val counts = ones.reduceByKey(_ + _) //val output = counts.collect() //output.foreach(t => println(t._1 + ": " + t._2)) counts.saveAsTextFile(args(1))
MaxGCPauseMillis is an hint to the JVM that the overall pause times caused by GC should not be more than specified value (in milliseconds). Recommended value is 200 milliseconds for most of the production grade system. Anything lower may force GC to run more number of times than it is required and would impact the overall throughput of the application, which is exactly happening in your case. The number of young GCs is 67 while we configure MaxGCPauseMillis=200 and number of Young GC's is almost 4 times (224) when we configure MaxGCPauseMillis=1. Refer here for more detailed explanations.
Your intuition is wrong. Rather, theoretically, with a heap size chosen, throughput and latency (hinted by MaxGCPauseMillis in this case) have a counter effect. So when you lower MaxGCPauseMillis and hence latency, your throughput goes down too.
My Mongo query is too large and I’m reaching a memory issue
I'm reaching some sort of RAM limit when doing this query, here's the error:
The operation: #<Moped::Protocol::Query
#length=100
#request_id=962
#response_to=0
#op_code=2004
#flags=[]
#full_collection_name="test_db.cases"
#skip=1650
#limit=150
#selector={"$query"=>{}, "$orderby"=>{"created_at"=>1}}
#fields=nil>
failed with error 17144: "Runner error: Overflow sort stage buffered data usage of 33555783 bytes exceeds internal limit of 33554432 bytes"
See https://github.com/mongodb/mongo/blob/master/docs/errors.md
for details about this error.
There are two solutions I can think of:
1) up the buffer limit. this requires mongo 2.8 which is some unstable release that i'd have to install manually.
2) break apart the query? chunk it? this is what the query looks like:
upload_set = Case.all.order_by(:created_at.asc).skip(#set_skipper).limit(150).each_slice(5).to_a
#set_skipper grows by 150 every time the method is called.
Any help?
From http://docs.mongodb.org/manual/reference/limits/ Sorted Documents MongoDB will only return sorted results on fields without an index if the combined size of all documents in the sort operation, plus a small overhead, is less than 32 megabytes. Did you try using an index on created_at ? That should remove that limitation.
Why does windbg> !EEHeap -gc show a much smaller managed heap than VMMAP.exe?
I have a C# application whose memory usage increases overtime. I've taken periodic user mode dumps and after loading sos, run !EEHeap -gc to monitor the managed heap size. In windbg/sos I've seen it start ~14MB and grow up to 160MB, then shrink back to 15MB, but the applications "Private Bytes" never decreases significantly. I have identified the activity that cauases the increase in "Private Bytes", so I can control when the memory growth occurs. I tried running Vmmap.exe and noticed it reports a managed heap of ~360MB, took a quick dump and using windbg/sos/eeheap -gc I only see 15MB. Why am I seeing such different values? Is the managed heap really what vmmap.exe reports? How can I examine this area of the managed heap in windbg?
You can't break into a .NET application with WinDbg and then run VMMap at the same time. This will result in a hanging VMMap. You can also not do it in the opposite direction: start VMMap first, then break into WinDbg and then refresh the values in VMMap. Therefore the values shown by VMMap are probably never equal, because the numbers are from a different point in time. Different points in time could also mean that the garbage collector has run. If the application is not changing so much, the values should be close. In my tests, the committed part of the managed heap in VMMap is the sum of !eeheap -gc and !eeheap -loader, which sounds reasonable. Given the output of !eeheap -gc, we get the start of the GC heap at generation 2 (11aa0000) and a size of only 3.6 MB. Number of GC Heaps: 1 generation 0 starts at 0x0000000011d110f8 generation 1 starts at 0x0000000011cd1130 generation 2 starts at 0x0000000011aa1000 ... GC Heap Size 0x374a00(3623424) !address gives the details: ... + 0`11aa0000 0`11ef2000 0`00452000 MEM_PRIVATE MEM_COMMIT PAGE_READWRITE <unknown> 0`11ef2000 0`21aa0000 0`0fbae000 MEM_PRIVATE MEM_RESERVE <unknown> 0`21aa0000 0`21ac2000 0`00022000 MEM_PRIVATE MEM_COMMIT PAGE_READWRITE <unknown> 0`21ac2000 0`29aa0000 0`07fde000 MEM_PRIVATE MEM_RESERVE <unknown> + 0`29aa0000 0`6ca20000 0`42f80000 MEM_FREE PAGE_NOACCESS Free ... Although not documented, I believe that a new segment starts at 11aa0000, indicated by the + sign. The GC segment ends at 29aa0000, which is also the starting point of the next segment. Cross check: .NET memory should be reported as <unknown> in the last column - ok. The total GC size (reserved + committed) is ?29aa0000-11aa0000 Evaluate expression: 402653184 = 00000000`18000000 which is 402 MB or 393.216 kB, which in my case is very close to 395.648 kB reported by VMMap. If you have more GC heaps, the whole process needs more effort. Therefore I typically take the shortcut, which is ok if you know that you don't have anything else than .NET that calls VirtualAlloc(). Type !address -summary and then look at the first <unknown> entry: --- Usage Summary ---------------- RgnCount ----------- Total Size -------- %ofBusy %ofTotal Free 144 7ff`d8a09000 ( 7.999 Tb) 99.99% <unknown> 180 0`1a718000 ( 423.094 Mb) 67.17% 0.01% ...
Thank you very much for the detailed answer. Much appreciated. I'm clear on windbg vs VMmap access/control of the program. Since I can cause the leak by an external action, I'm pretty sure that since I quiesce the activity, memory won't grow much between samples. I had been relying on the last line of output from !eeheap -gc: GC Heap Size: Size: 0xed7458 (15561816) bytes. I think this number must be the amount of managed heap in use (with un-free'ed objects in it). I summed all the "size" bytes reported by "!eeheap -gc" for each SOH and LOH and it matches the above value. I ran VMmap, took a snap shot and quit VMmap. Then I attached to the process with windbg. Your technique of using !address was most enlightening. I'm using a 12 processor server system, so there are SOH's and LOH's for each processor, i.e 12 to sum. Taking your lead, the output from "!eeheap -gc" has the segments for all of the heaps. I feed them all into "!address " and summed their sizes (plus the size reported by !eeheap -loader ). The result was 335,108K which is within the variation I'd expect to see within the time elapsed (within 600K). The VMmap Managed Heap seems to be the total amount of all of the memory segments committed for use by the managed heap (I didn't check the Reserved numbers). So now I see why the total reported by "!eeheap -gc" is so much less than what VMmap shows. Thanks!
Which is faster to process a 1TB file: a single machine or 5 networked machines?
Which is faster to process a 1TB file: a single machine or 5 networked
machines? ("To process" refers to finding the single UTF-16 character
with the most occurrences in that 1TB file). The rate of data
transfer is 1Gbit/sec, the entire 1TB file resides in 1 computer, and
each computer has a quad core CPU.
Below is my attempt at the question using an array of longs (with array size of 2^16) to keep track of the character count. This should fit into memory of a single machine, since 2^16 x 2^3 (size of long) = 2^19 = 0.5MB. Any help (links, comments, suggestions) would be much appreciated. I used the latency times cited by Jeff Dean, and I tried my best to use the best approximations that I knew of. The final answer is:
Single Machine: 5.8 hrs (due to slowness of reading from disk)
5 Networked Machines: 7.64 hrs (due to reading from disk and network)
1) Single Machine
a) Time to Read File from Disk --> 5.8 hrs
-If it takes 20ms to read 1MB seq from disk,
then to read 1TB from disk takes:
20ms/1MB x 1024MB/GB x 1024GB/TB = 20,972 secs
= 350 mins = 5.8 hrs
b) Time needed to fill array w/complete count data
--> 0 sec since it is computed while doing step 1a
-At 0.5 MB, the count array fits into L2 cache.
Since L2 cache takes only 7 ns to access,
the CPU can read & write to the count array
while waiting for the disk read.
Time: 0 sec since it is computed while doing step 1a
c) Iterate thru entire array to find max count --> 0.00625ms
-Since it takes 0.0125ms to read & write 1MB from
L2 cache and array size is 0.5MB, then the time
to iterate through the array is:
0.0125ms/MB x 0.5MB = 0.00625ms
d) Total Time
Total=a+b+c=~5.8 hrs (due to slowness of reading from disk)
2) 5 Networked Machines
a) Time to transfr 1TB over 1Gbit/s --> 6.48 hrs
1TB x 1024GB/TB x 8bits/B x 1s/Gbit
= 8,192s = 137m = 2.3hr
But since the original machine keeps a fifth of the data, it
only needs to send (4/5)ths of data, so the time required is:
2.3 hr x 4/5 = 1.84 hrs
*But to send the data, the data needs to be read, which
is (4/5)(answer 1a) = (4/5)(5.8 hrs) = 4.64 hrs
So total time = 1.84hrs + 4.64 hrs = 6.48 hrs
b) Time to fill array w/count data from original machine --> 1.16 hrs
-The original machine (that had the 1TB file) still needs to
read the remainder of the data in order to fill the array with
count data. So this requires (1/5)(answer 1a)=1.16 hrs.
The CPU time to read & write to the array is negligible, as
shown in 1b.
c) Time to fill other machine's array w/counts --> not counted
-As the file is being transferred, the count array can be
computed. This time is not counted.
d) Time required to receive 4 arrays --> (2^-6)s
-Each count array is 0.5MB
0.5MB x 4 arrays x 8bits/B x 1s/Gbit
= 2^20B/2 x 2^2 x 2^3 bits/B x 1s/2^30bits
= 2^25/2^31s = (2^-6)s
d) Time to merge arrays
--> 0 sec(since it can be merge while receiving)
e) Total time
Total=a+b+c+d+e =~ a+b =~ 6.48 hrs + 1.16 hrs = 7.64 hrs
This is not an answer but just a longer comment. You have miscalculated the size of the frequency array. 1 TiB file contains 550 Gsyms and because nothing is said about their expected freqency, you would need a count array of at least 64-bit integers (that is 8 bytes/element). The total size of this frequency array would be 2^16 * 8 = 2^19 bytes or just 512 KiB and not 4 GiB as you have miscalculated. It would only take ≈4.3 ms to send this data over 1 Gbps link (protocol headers take roughly 3% if you use TCP/IP over Ethernet with an MTU of 1500 bytes /less with jumbo frames but they are not widely supported/). Also this array size perfectly fits in the CPU cache. You have grossly overestimated the time it would take to process the data and extract the frequency and you have also overlooked the fact that it can overlap disk reads. In fact it is so fast to update the frequency array, which resides in the CPU cache, that the computation time is negligible as most of it will overlap the slow disk reads. But you have underestimated the time it takes to read the data. Even with a multicore CPU you still have only one path to the hard drive and hence you would still need the full 5.8 hrs to read the data in the single machine case. In fact, this is an exemple kind of data processing that neither benefits from parallel networked processing nor from having more than one CPU core. This is why supercomputers and other fast networked processing systems use distributed parallel file storages that can deliver many GB/s of aggregate read/write speeds.
You only need to send 0.8tb if your source machine is part of the 5. It may not even make sense sending the data to other machines. Consider this: In order to for the source machine to send the data it must first hit the disk in order to read the data into main memory before it send the data over the network. If the data is already in main memory and not being processed, you are wasting that opportunity. So under the assumption that loading to CPU cache is much less expensive than disk to memory or data over network (which is true, unless you are dealing with alien hardware), then you are better off just doing it on the source machine, and the only place splitting up the task makes sense is if the "file" is somehow created/populated in a distributed way to start with. So you should only count the disk read time of a 1Tb file, with a tiny bit of overhead for L1/L2 cache and CPU ops. The cache access pattern is optimal since it is sequential so you only cache miss once per piece of data. The primary point here is that disk is the primary bottleneck which overshadows everything else.
