Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Here is the list of flags:

Most useful flags 


namedescriptiontypedefault value
1allowedram Sets amount RAM(in MB) allowed for service to useint32 500
2localhostonly 

Should we use localhost or external address for service - used only for

development

bool false
3port What port to listen onint32 4080
4servicename Sets service name to use in URLstringt5memory
5servicethreads Sets amount of worker threads for service(for proxygen)int321
6t5loglevel Sets t5memory log level threshold from DEVELOP(0) to TRANSACTION(6)[disabled]int320
7triplesthreshold Sets threshold to pre-fuzzy filtering based on hashes of neighbor tokensint3233
8timeout Sets the timeout for service request handlingint323600
9useconfigfile Set to use values from the config file that should be located under ~/.t5memory/t5memory.confboolfalse
10vShow all VLOG(m) messages for m <= this. Overridable by --vmodule. This should be used to enable DEBUG(v=1) and DEVELOP(v=2) logs.
If set to v=1, all logs, starting from DEBUG(1) level, would be added to the buffer of logs(instead of only request data), which would be printed in case of an error.
If set to v=2, all logs would ignore the buffer and would be printed, starting from level=0(develop logs)
int320
11alsologtostderr log messages go to stderr in addition to logfilesbool false
12logtostderr log messages go to stderr instead of logfilesbool false
13log_dir If specified, logfiles are written into this directory instead of  the default logging directory.string~/.t5memory/LOG/
14stderrthreshold log messages at or above this level are copied to stderr  in addition to logfiles.  This flag obsoletes --alsologtostderr.int32 2
15max_log_size approx. maximum log file size (in MB). A value of 0 will be  silently overridden to 1.int321800
16minloglevel Messages logged at a lower level than this don't actually get logged anywhereint320
17stop_logging_if_full_disk Stop attempting to log to disk if the disk is fullboolfalse
18drop_log_memory Drop in-memory buffers of log contents. Logs can grow very quickly and they are rarely read before they need to be evicted from
      memory. Instead, drop them from memory as soon as they are flushed to disk.
booltrue



Other flags

Flags from /build/gflags-0sowem/gflags-2.2.2/src/gflags.cc:
    -flagfile (load flags from file) type: string default: ""
    -fromenv (set flags from the environment [use 'export FLAGS_flag1=value'])
      type: string default: ""
    -tryfromenv (set flags from the environment if present) type: string
      default: ""
    -undefok (comma-separated list of flag names that it is okay to specify on
      the command line even if the program does not define a flag with that
      name.  IMPORTANT: flags in this list that have arguments MUST use the
      flag=value format) type: string default: ""

  Flags from /build/gflags-0sowem/gflags-2.2.2/src/gflags_completions.cc:
    -tab_completion_columns (Number of columns to use in output for tab
      completion) type: int32 default: 80
    -tab_completion_word (If non-empty, HandleCommandLineCompletions() will
      hijack the process and attempt to do bash-style command line flag
      completion on this value.) type: string default: ""

  Flags from /build/gflags-0sowem/gflags-2.2.2/src/gflags_reporting.cc:
    -help (show help on all flags [tip: all flags can have two dashes])
      type: bool default: false currently: true
    -helpfull (show help on all flags -- same as -help) type: bool
      default: false
    -helpmatch (show help on modules whose name contains the specified substr)
      type: string default: ""
    -helpon (show help on the modules named by this flag value) type: string
      default: ""
    -helppackage (show help on all modules in the main package) type: bool
      default: false
    -helpshort (show help on only the main module for this program) type: bool
      default: false
    -helpxml (produce an xml version of help) type: bool default: false
    -version (show version and build info and exit) type: bool default: false


  Flags from /home/libs/proxygen/_build/deps/folly/folly/detail/MemoryIdler.cpp:
    -folly_memory_idler_purge_arenas (if enabled, folly memory-idler purges
      jemalloc arenas on thread idle) type: bool default: true


  Flags from /home/libs/proxygen/_build/deps/folly/folly/executors/IOThreadPoolExecutor.cpp:
    -dynamic_iothreadpoolexecutor (IOThreadPoolExecutor will dynamically create
      threads) type: bool default: true

  Flags from /home/libs/proxygen/_build/deps/folly/folly/executors/ThreadPoolExecutor.cpp:
    -threadtimeout_ms (Idle time before ThreadPoolExecutor threads are joined)
      type: int64 default: 60000


  Flags from /home/libs/proxygen/_build/deps/folly/folly/experimental/observer/detail/ObserverManager.cpp:
    -observer_manager_pool_size (How many internal threads ObserverManager
      should use) type: int32 default: 4


  Flags from /home/libs/proxygen/_build/deps/folly/folly/synchronization/Hazptr.cpp:
    -folly_hazptr_use_executor (Use an executor for hazptr asynchronous
      reclamation) type: bool default: true


  Flags from /home/libs/proxygen/_build/deps/wangle/wangle/ssl/SSLSessionCacheManager.cpp:
    -dcache_unit_test (All VIPs share one session cache) type: bool
      default: false


  Flags from /home/libs/proxygen/lib/utils/ZlibStreamCompressor.cpp:
    -zlib_compressor_buffer_growth (The buffer growth size to use during IOBuf
      zlib deflation) type: int64 default: 2024


  Flags from /home/or/workspace/translate5/translate5-tm-service-source/source/RestAPI/ProxygenHandler.cpp:
    -request_number (Include request sequence number in response) type: bool
      default: true

  Flags from src/logging.cc:
    -alsologtoemail (log messages go to these email addresses in addition to
      logfiles) type: string default: ""
    -colorlogtostderr (color messages logged to stderr (if supported by
      terminal)) type: bool default: false currently: true
    -log_backtrace_at (Emit a backtrace when logging at file:linenum.)
      type: string default: ""
    -log_link (Put additional links to the log files in this directory)
      type: string default: ""
    -log_prefix (Prepend the log prefix to the start of each log line)
      type: bool default: true
    -logbuflevel (Buffer log messages logged at this level or lower (-1 means
      don't buffer; 0 means buffer INFO only; ...)) type: int32 default: 0
    -logbufsecs (Buffer log messages for at most this many seconds) type: int32
      default: 30
    -logemaillevel (Email log messages logged at this level or higher (0 means
      email all; 3 means email FATAL only; ...)) type: int32 default: 999
    -logfile_mode (Log file mode/permissions.) type: int32 default: 436
    -logmailer (Mailer used to send logging email) type: string
      default: "/bin/mail"

  Flags from src/utilities.cc:
    -symbolize_stacktrace (Symbolize the stack trace in the tombstone)
      type: bool default: true

  Flags from src/vlog_is_on.cc:
 
    -vmodule (per-module verbose level. Argument is a comma-separated list of
      <module name>=<log level>. <module name> is a glob pattern, matched
      against the filename base (that is, name ignoring .cc/.h./-inl.h). <log
      level> overrides any value given by --v.) type: string default: ""

Logs

For logging t5memory uses glog library. t5memory has it's own logging levels (DEVELOP=0, DEBUG=1, INFO=2, WARNIGN=3, ERROR=4, FATAL=5, TRANSACTION=6), that maps to 4 levels of glog
t5memory log → glog log 
DEVELOP = INFO && VLOG>=2 

...

If you would set --v=2, then it would omit buffer and print logs directly, starting from DEVELOP. 
You can disable some logs with --minloglevel. Also, if that makes sense, old logging threshold could be implemented to set some bevahiour of --v=1 or --v=2, but to filter some DEBUG and DEVELOP logs.  

Build process

We are building t5memory in docker containers. To build t5memory you should build container with proxygen first. This would require a lot of resources(you should have at least 16 GB RAM and image would take 20 GB)

To build proxygen container you should go to folder where Dockerfile_proxygen is located(from 'translate5-tm-service-source/docker', but you need only dockerfile to build container) and run this command:

docker build -t translate5/proxygen -f Dockerfile_proxygen .

and then wait. 
Then you can build t5memory from folder where Dockerfile(from 'translate5-tm-service-source/docker/')  with command 

docker build -t translate5/t5memory  .
This would pull t5memory repository from github and would build t5memory from last commit
Alternatively you can call the same command from the project's root directory, this would build t5memory from local files instead of repo, which could be used for development.