博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Elixir交互式Shell: 1. 运行时系统标记
阅读量:6093 次
发布时间:2019-06-20

本文共 4784 字,大约阅读时间需要 15 分钟。

这是IEx系列五部分中的第一部分, 在这一部分中, 我们将说明如何设置Erlang系统的运行时开关标记

设置Erlang使用的调度器个数

➜  iex --erl "+S 2:2"Erlang/OTP 18 [erts-7.1] [source] [64-bit] [smp:2:2] [async-threads:10] [kernel-poll:false]Interactive Elixir (1.2.1) - press Ctrl+C to exit (type h() ENTER for help)iex(1)>

两个调度器可用, 仅设置一个在线(Online)

➜  iex --erl "+S 2:1"Erlang/OTP 18 [erts-7.1] [source] [64-bit] [smp:2:1] [async-threads:10] [kernel-poll:false]Interactive Elixir (1.2.1) - press Ctrl+C to exit (type h() ENTER for help)iex(1)>

远程Shell

➜  iex --name node1@example.com --remsh node2@example.com

打开内核Poll

➜  iex --erl "+S 2:1 +K true"Erlang/OTP 18 [erts-7.1] [source] [64-bit] [smp:2:1] [async-threads:10] [kernel-poll:true]Interactive Elixir (1.2.1) - press Ctrl+C to exit (type h() ENTER for help)iex(1)>

显示参数列表:

➜ erl +/usr/local/lib/erlang/erts-7.1/bin/beam.smp unknown flag -Usage: beam.smp [flags] [ -- [init_args] ]The flags are:-a size        suggested stack size in kilo words for threads               in the async-thread pool, valid range is [16-8192]-A number      set number of threads in async thread pool,               valid range is [0-1024]-B[c|d|i]      c to have Ctrl-c interrupt the Erlang shell,               d (or no extra option) to disable the break               handler, i to ignore break signals-c bool        enable or disable time correction-C mode        set time warp mode; valid modes are:               no_time_warp|single_time_warp|multi_time_warp-d             don't write a crash dump for internally detected errors               (halt(String) will still produce a crash dump)-fn[u|a|l]     Control how filenames are interpreted-hms size      set minimum heap size in words (default 233)-hmbs size     set minimum binary virtual heap size in words (default 32768)-hpds size     initial process dictionary size (default 10)-K boolean     enable or disable kernel poll-n[s|a|d]      Control behavior of signals to ports               Note that this flag is deprecated!-M
memory allocator switches, see the erts_alloc(3) documentation for more info.-pc
Control what characters are considered printable (default latin1)-P number set maximum number of processes on this node, valid range is [1024-134217727]-Q number set maximum number of ports on this node, valid range is [1024-134217727]-R number set compatibility release number, valid range [16-18]-r force ets memory block to be moved on realloc-rg amount set reader groups limit-sbt type set scheduler bind type, valid types are:-stbt type u|ns|ts|ps|s|nnts|nnps|tnnps|db-sbwt val set scheduler busy wait threshold, valid values are: none|very_short|short|medium|long|very_long.-scl bool enable/disable compaction of scheduler load, see the erl(1) documentation for more info.-sct cput set cpu topology, see the erl(1) documentation for more info.-secio bool enable/disable eager check I/O scheduling, see the erl(1) documentation for more info.-sub bool enable/disable scheduler utilization balancing, see the erl(1) documentation for more info.-sws val set scheduler wakeup strategy, valid values are: default|legacy.-swct val set scheduler wake cleanup threshold, valid values are: very_lazy|lazy|medium|eager|very_eager.-swt val set scheduler wakeup threshold, valid values are: very_low|low|medium|high|very_high.-sss size suggested stack size in kilo words for scheduler threads, valid range is [4-8192]-spp Bool set port parallelism scheduling hint-S n1:n2 set number of schedulers (n1), and number of schedulers online (n2), maximum for both numbers is 1024-SP p1:p2 specify schedulers (p1) and schedulers online (p2) as percentages of logical processors configured and logical processors available, respectively-t size set the maximum number of atoms the emulator can handle valid range is [8192-0]-T number set modified timing level, valid range is [0-9]-V print Erlang version-v turn on chatty mode (GCs will be reported etc)-W
set error logger warnings mapping, see error_logger documentation for details-zdbbl size set the distribution buffer busy limit in kilobytes valid range is [1-2097151]-zdntgc time set delayed node table gc in seconds valid values are infinity or intergers in the range [0-100000000]Note that if the emulator is started with erlexec (typicallyfrom the erl script), these flags should be specified with +.

转载地址:http://bswza.baihongyu.com/

你可能感兴趣的文章
垂死挣扎还是涅槃重生 -- Delphi XE5 公布会归来感想
查看>>
淘宝的几个架构图
查看>>
Android扩展 - 拍照篇(Camera)
查看>>
JAVA数组的定义及用法
查看>>
充分利用HTML标签元素 – 简单的xtyle前端框架
查看>>
设计模式(十一):FACADE外观模式 -- 结构型模式
查看>>
iOS xcodebuile 自动编译打包ipa
查看>>
程序员眼中的 SQL Server-执行计划教会我如何创建索引?
查看>>
【BZOJ】1624: [Usaco2008 Open] Clear And Present Danger 寻宝之路(floyd)
查看>>
cmake总结
查看>>
数据加密插件
查看>>
linux后台运行程序
查看>>
win7 vs2012/2013 编译boost 1.55
查看>>
IIS7如何显示详细错误信息
查看>>
ViewPager切换动画PageTransformer使用
查看>>
coco2d-x 基于视口的地图设计
查看>>
C++文件读写详解(ofstream,ifstream,fstream)
查看>>
Android打包常见错误之Export aborted because fatal lint errors were found
查看>>
Tar打包、压缩与解压缩到指定目录的方法
查看>>
新手如何学习 jQuery?
查看>>