配置文件

Cpp客户端由于使用了rdsn框架,所以配置文件较为复杂,如下:

  1. [apps..default]
  2. run = true
  3. count = 1
  4. ;network.client.RPC_CHANNEL_TCP = dsn::tools::sim_network_provider, 65536
  5. ;network.client.RPC_CHANNEL_UDP = dsn::tools::sim_network_provider, 65536
  6. ;network.server.0.RPC_CHANNEL_TCP = dsn::tools::sim_network_provider, 65536
  7. [apps.mimic]
  8. type = dsn.app.mimic
  9. arguments =
  10. pools = THREAD_POOL_DEFAULT
  11. run = true
  12. count = 1
  13. [core]
  14. ;tool = simulator
  15. ;tool = fastrun
  16. tool = nativerun
  17. ;toollets = tracer
  18. ;toollets = tracer, profiler, fault_injector
  19. pause_on_start = false
  20. cli_local = false
  21. cli_remote = false
  22. start_nfs = false
  23. logging_start_level = LOG_LEVEL_DEBUG
  24. logging_factory_name = dsn::tools::simple_logger
  25. logging_flush_on_exit = true
  26. enable_default_app_mimic = true
  27. data_dir = ./data
  28. [tools.simple_logger]
  29. short_header = true
  30. fast_flush = true
  31. max_number_of_log_files_on_disk = 10
  32. stderr_start_level = LOG_LEVEL_ERROR
  33. [tools.hpc_logger]
  34. per_thread_buffer_bytes = 8192
  35. max_number_of_log_files_on_disk = 10
  36. [tools.simulator]
  37. random_seed = 0
  38. [network]
  39. ; how many network threads for network library(used by asio)
  40. io_service_worker_count = 4
  41. ; specification for each thread pool
  42. [threadpool..default]
  43. worker_count = 4
  44. [threadpool.THREAD_POOL_DEFAULT]
  45. name = default
  46. partitioned = false
  47. max_input_queue_length = 1024
  48. worker_priority = THREAD_xPRIORITY_NORMAL
  49. worker_count = 4
  50. [task..default]
  51. is_trace = false
  52. is_profile = false
  53. allow_inline = false
  54. fast_execution_in_network_thread = false
  55. rpc_call_header_format = NET_HDR_DSN
  56. rpc_call_channel = RPC_CHANNEL_TCP
  57. rpc_timeout_milliseconds = 5000
  58. [pegasus.clusters]
  59. onebox = @LOCAL_IP@:34601,@LOCAL_IP@:34602,@LOCAL_IP@:34603
  60. another_cluster = @SOME_IP@:34601,@SOME_IP@:34601,@SOME_IP@:34601

配置文件的具体解释,请移步配置说明