This project is mirrored from https://gitee.com/cowcomic/pixie.git. Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
  1. 01 Mar, 2022 8 commits
  2. 28 Feb, 2022 10 commits
    • Omid Azizi's avatar
      HTTP parser: Earlier truncation · 953dcd42
      Omid Azizi authored
      
      Summary: Add a parser flag to support early message truncation. This is to save memory.
      
      Test Plan: Tests added to the parser.
      
      Reviewers: #stirling, jamesbartlett
      
      Reviewed By: jamesbartlett
      Signed-off-by: default avatarOmid Azizi <oazizi@pixielabs.ai>
      
      Differential Revision: https://phab.corp.pixielabs.ai/D10574
      
      GitOrigin-RevId: 33e773e2a0d6bde5c2895201f080b33e66f27eed
      953dcd42
    • Omid Azizi's avatar
      [Cleanup] jvm_stats_connector_test.cc: Use new test utilities · 16b15d6c
      Omid Azizi authored
      
      Summary:
      Use new utilities like AccessRecordbatch, FindRecordsMatchingPID and RecordBatchSizeIs to improve the readability of the test.
      
      Also took out a piece about checking UPID formation, since that is covered elsewhere.
      
      Test Plan: This is just an improved test.
      
      Reviewers: #stirling, yzhao
      
      Reviewed By: #stirling, yzhao
      Signed-off-by: default avatarOmid Azizi <oazizi@pixielabs.ai>
      
      Differential Revision: https://phab.corp.pixielabs.ai/D10865
      
      GitOrigin-RevId: 46af8421589d72f8aee5dceb18a3845b22d8960b
      16b15d6c
    • Omid Azizi's avatar
      Testing utility: RecordBatchSizeIs · db4897df
      Omid Azizi authored
      
      Summary: Add matcher RecordBatchSizeIs to improve readability of the test code.
      
      Test Plan: No functional changes, so use existing tests.
      
      Reviewers: #stirling, yzhao
      
      Reviewed By: #stirling, yzhao
      Signed-off-by: default avatarOmid Azizi <oazizi@pixielabs.ai>
      
      Differential Revision: https://phab.corp.pixielabs.ai/D10864
      
      GitOrigin-RevId: 6427d7d9158fac10625a6ca24a71248997427413
      db4897df
    • yzhao1012's avatar
      [CLEANUP] Revise the logging statement to indicate that all leaked probes are removed · e9d895ae
      yzhao1012 authored
      
      Test Plan: Logging changes, manually run and observe the logging statement
      
      Reviewers: #stirling, oazizi
      
      Reviewed By: #stirling, oazizi
      
      Subscribers: oazizi
      Signed-off-by: default avataryzhao1012 <yzhao@pixielabs.ai>
      
      Differential Revision: https://phab.corp.pixielabs.ai/D10869
      
      GitOrigin-RevId: cd6fc9738ae83b5828ff56d180681155e59b5c0a
      e9d895ae
    • yzhao1012's avatar
      In nats_trace_bpf_test, only check the tls_required string in the connection options · 0e2c72e3
      yzhao1012 authored
      
      Summary:
      This reduces possibility of breakage because of version changes in our nats client library.
      Also we are not interested in other parts of the options anyway.
      
      Test Plan: This fixes a broken test
      
      Reviewers: #stirling, oazizi
      
      Reviewed By: #stirling, oazizi
      Signed-off-by: default avataryzhao1012 <yzhao@pixielabs.ai>
      
      Differential Revision: https://phab.corp.pixielabs.ai/D10877
      
      GitOrigin-RevId: 667267e350bf5d317ea2ea31ee590931e579261a
      0e2c72e3
    • James Bartlett's avatar
      Add px._HeapRanges UDTF. · ba8dfc0a
      James Bartlett authored
      
      Summary:
      Adds a UDTF that lists all "ranges" of memory allocated by tcmalloc. Each "range" represents a chunk of memory tcmalloc has allocated and is now either inuse (used by the application), free (unused by application but still hung onto by tcmalloc), or unmapped (which means its been released back to the OS).
      
      This is particularly helpful to understand what the allocation pattern looks like, especially in the presence of a lot of "free" ranges. It would be nice if we could somehow associate these ranges to their allocation sites, but that's currently not possible.
      
      Test Plan: Skaffolded to a cluster, was able to see all the agent's allocated ranges.
      
      Reviewers: nserrino, oazizi, vihang
      
      Reviewed By: oazizi
      Signed-off-by: default avatarJames Bartlett <jamesbartlett@pixielabs.ai>
      
      Differential Revision: https://phab.corp.pixielabs.ai/D10863
      
      GitOrigin-RevId: 78a80e77fdeb4f421a75296661d9629b7c6bdb6d
      ba8dfc0a
    • James Bartlett's avatar
      Add script for getting the correct binaries for symbolizing heap profiles. · 17fed31a
      James Bartlett authored
      
      Summary: Adds a script (`scripts/download_heap_prof_mapped_files.sh`) that takes as input a heap profile in pprof format, and the node the heap profile was collected on. Then it sshes into the given node, collects all the files that correspond to mapped files in the heap profile, and ships them back to your local machine as a tar archive. The archive is then extracted into a tmp folder that can subsequently be used as the `PPROF_BINARY_PATH`. The script is designed to work even if the workload that was profiled is running in a container, as it looks for files relative to `/proc/$PID/root` where `PID` is found based on mapping entries in the heap profile and the corresponding running processes on the given node.
      
      Test Plan: Tested that running the script dumps the expected files into a temp directory. Also tested that the files output, yield valid heap profiles when used for symbolization in pprof.
      
      Reviewers: #engineering, zasgar
      
      Reviewed By: #engineering, zasgar
      Signed-off-by: default avatarJames Bartlett <jamesbartlett@pixielabs.ai>
      
      Differential Revision: https://phab.corp.pixielabs.ai/D10867
      
      GitOrigin-RevId: 37a75abf2624829c3808fc5fded8965973504883
      17fed31a
    • yzhao1012's avatar
      Add ProcExitConnector, preparing for adding BPF code · 7594a6e9
      yzhao1012 authored
      
      Summary:
      This is not hooked into Stirling, so this has no effect.
      This is a skeleton. Later diffs will add BPF code and its supporting code.
      
      Test Plan: Test added
      
      Reviewers: #stirling, oazizi
      
      Reviewed By: #stirling, oazizi
      
      Subscribers: oazizi
      Signed-off-by: default avataryzhao1012 <yzhao@pixielabs.ai>
      
      Differential Revision: https://phab.corp.pixielabs.ai/D10857
      
      GitOrigin-RevId: ca2acee5749d0c33030de82bb7e34bec8633cc5b
      7594a6e9
    • Michelle Nguyen's avatar
      PC-1437 Add service protos for configuring data retention plugin · 35827308
      Michelle Nguyen authored
      
      Summary:
      This diff adds the initial service protos for the plugin service for managing the data retention plugin. These will mainly be used to populate the plugin UI in the admin view.
      1. GetDataRetentionPluginsForOrg gets all available plugins, and the current plugins the org has configured.
      2. GetRetentionPluginConfig gets the configuration a user needs to fill out in order to enable a plugin.
      3. GetOrgRetentionPluginConfig gets the settings for how a user has configured a plugin.
      4. UpdateOrgRetentionPluginConfig is the mechanism for enabling/disabling a plugin and updating its configs.
      
      These changes currently do not cover configuring scripts with longterm data retention, just the initial configuration of the plugin values (such as endpoints).
      
      Test Plan: Everything builds, this change does not update any functionality/isn't used yet.
      
      Reviewers: vihang, nserrino
      
      Reviewed By: vihang
      
      JIRA Issues: PC-1437
      Signed-off-by: default avatarMichelle Nguyen <michellenguyen@pixielabs.ai>
      
      Differential Revision: https://phab.corp.pixielabs.ai/D10854
      
      GitOrigin-RevId: b5e1c4c0511a56b479285c2793e63ab53d1a768c
      35827308
    • Michelle Nguyen's avatar
      PC-1437 Add database tables for data retention plugin config · 0d162945
      Michelle Nguyen authored
      
      Summary:
      This diff adds the database tables which will be used to track a plugin's configuration.
      `data_retention_plugin_releases` will track the provider-specified configuration options for their plugin. For example, the preset scripts and config values that need to be filled out when enabling the plugin. This will be populated by a job, similar to artifact tracker.
      `org_data_retention_plugins` tracks an org's settings for a plugin, for example: their plugin version, what their values for each config setting are.
      
      This does not include a table for the longterm retention scripts that a user has yet. That will follow in a separate diff.
      
      Test Plan: Skaffold deploy, ensure that the migrations run. These tables are currently unused.
      
      Reviewers: vihang, nserrino
      
      Reviewed By: vihang
      
      JIRA Issues: PC-1437
      Signed-off-by: default avatarMichelle Nguyen <michellenguyen@pixielabs.ai>
      
      Differential Revision: https://phab.corp.pixielabs.ai/D10855
      
      GitOrigin-RevId: d47f1bdaf1ed30f0511bc8fbaf7e5b753ebafcd0
      0d162945
  3. 27 Feb, 2022 1 commit
  4. 26 Feb, 2022 4 commits
  5. 25 Feb, 2022 7 commits
  6. 24 Feb, 2022 10 commits
    • yzhao1012's avatar
      Add loggings of statistics of socket tracer data event sizes · 97182f94
      yzhao1012 authored
      
      Test Plan: Tested manually and see the printed logs
      
      Reviewers: #stirling, oazizi
      
      Reviewed By: #stirling, oazizi
      Signed-off-by: default avataryzhao1012 <yzhao@pixielabs.ai>
      
      Differential Revision: https://phab.corp.pixielabs.ai/D10835
      
      GitOrigin-RevId: b0055efd43ed692a28d42b95501c52c462b6b534
      97182f94
    • Michelle Nguyen's avatar
      PC-1437 Add table for tracking plugin releases · 518c9e11
      Michelle Nguyen authored
      
      Summary: We will track plugin releases similarly to how we track vizier/CLI releases using artifact tracker. Releases that are published on Github will be used to update the plugin releases table in the plugin service.
      
      Test Plan: Skaffold deploy, to ensure that service starts up and migration runs
      
      Reviewers: vihang
      
      Reviewed By: vihang
      
      JIRA Issues: PC-1437
      Signed-off-by: default avatarMichelle Nguyen <michellenguyen@pixielabs.ai>
      
      Differential Revision: https://phab.corp.pixielabs.ai/D10849
      
      GitOrigin-RevId: bb9ed5960b613bc4ecc4910040450a23874ae8a2
      518c9e11
    • Michelle Nguyen's avatar
      PC-1438 Add boilerplate for plugin service/deployment · 63768778
      Michelle Nguyen authored
      
      Summary: We are adding the plugin service to Pixie cloud. This is just boilerplate for launching the deployment/service on kubernetes. The service does not do anything yet.
      
      Test Plan: Skaffold deploy
      
      Reviewers: vihang
      
      Reviewed By: vihang
      
      JIRA Issues: PC-1438
      Signed-off-by: default avatarMichelle Nguyen <michellenguyen@pixielabs.ai>
      
      Differential Revision: https://phab.corp.pixielabs.ai/D10847
      
      GitOrigin-RevId: 7e900be7476e86d18aee7ad475e2ad665c84435c
      63768778
    • James Bartlett's avatar
      Add px._HeapReleaseFreeMemory UDTF. · 56bdd209
      James Bartlett authored
      
      Summary:
      Adds a UDTF that calls ReleaseFreeMemory on all the agents.
      This causes tcmalloc to release spans in the free list to the OS. This is useful for experimenting with memory usage.
      
      Test Plan: Checked that px._HeapStats, showed about 600MB of free spans in the page heap, then after running the UDTF, another call to `px._HeapStats` showed that 500MB of that was returned to the OS.
      
      Reviewers: oazizi, vihang, nserrino
      
      Reviewed By: vihang
      Signed-off-by: default avatarJames Bartlett <jamesbartlett@pixielabs.ai>
      
      Differential Revision: https://phab.corp.pixielabs.ai/D10846
      
      GitOrigin-RevId: 7acee822d2514fa562ea1895ab7bcee54e1b5f56
      56bdd209
    • Vihang Mehta's avatar
      Fix loadtest superfluous WriteHeader · 3df4ce33
      Vihang Mehta authored
      
      Summary:
      `http.Error` sets headers but by the time `ResponseWriter.write` is
      called, headers are already sent. So we can't really do much with the error at
      that point. Just drop it instead.
      
      Test Plan:
      The sever shouldn't have logs saying
      ` http: superfluous response.WriteHeader call` anymore.
      
      Reviewers: jamesbartlett
      
      Reviewed By: jamesbartlett
      Signed-off-by: default avatarVihang Mehta <vihang@pixielabs.ai>
      
      Differential Revision: https://phab.corp.pixielabs.ai/D10844
      
      GitOrigin-RevId: 3886ac0ca8088ff7ee8bee85e97648a108df86e7
      3df4ce33
    • Phillip Kuznetsov's avatar
      [PP-3156] Fix output format for methods in python docs · 3ae2132b
      Phillip Kuznetsov authored
      
      Summary:
      gendoc.py generated python docs with an extra nesting. That meant the python docs wouldn't
      get generated properly. We must've given up on this earlier which is why we didn't notice the
      problem.
      
      Test Plan: Generated the docs and made sure the python docs render from the data.
      
      Reviewers: htroisi, michelle, vihang
      
      Reviewed By: vihang
      
      JIRA Issues: PP-3156
      Signed-off-by: default avatarPhillip Kuznetsov <pkuznetsov@pixielabs.ai>
      
      Differential Revision: https://phab.corp.pixielabs.ai/D10840
      
      GitOrigin-RevId: f5018c03aa42aacd349ae4bc3934eef66c30440a
      3ae2132b
    • Pete Stevenson's avatar
      PerfProfiler: handle symbol unload on Stirling side of Java symbolizer. · 431a4762
      Pete Stevenson authored
      
      Summary: The Java symbolization agent responds to a "method unload" callback. Here, we add support on the Stirling side for the same. Essentially, this removes a symbol from our Java symbol index.
      
      Test Plan: Existing.
      
      Reviewers: #stirling, oazizi
      
      Reviewed By: #stirling, oazizi
      
      Subscribers: yzhao, oazizi
      
      JIRA Issues: PP-2982, PP-3264
      Signed-off-by: default avatarPete Stevenson <jps@pixielabs.ai>
      
      Differential Revision: https://phab.corp.pixielabs.ai/D10805
      
      GitOrigin-RevId: 92db82567a1c91e608dbb507f10eafc3a4a53c7f
      431a4762
    • Pete Stevenson's avatar
      PerfProfiler: make the Java symbolizer uncacheable. · 102988b6
      Pete Stevenson authored
      
      Summary: Because of symbol unloading, keeping Java symbols cached is challenging. For now, make the Java symbolizer uncacheable. We do not anticipate significant loss of perf. because the Java symbolizer keeps its own symbol index in memory (i.e. is already like a symbol cache).
      
      Test Plan: Existing.
      
      Reviewers: #stirling, oazizi
      
      Reviewed By: #stirling, oazizi
      
      Subscribers: yzhao, oazizi
      
      JIRA Issues: PP-2982, PP-3264
      Signed-off-by: default avatarPete Stevenson <jps@pixielabs.ai>
      
      Differential Revision: https://phab.corp.pixielabs.ai/D10821
      
      GitOrigin-RevId: 9c6f1160c90357f3f9165003ec883f614c14e88e
      102988b6
    • Omid Azizi's avatar
      Fix some comments · 1c25fbde
      Omid Azizi authored
      
      Summary: Just a few typos and fixes noticed along the way.
      
      Test Plan: None. No functional changes.
      
      Reviewers: #stirling, jps
      
      Reviewed By: #stirling, jps
      Signed-off-by: default avatarOmid Azizi <oazizi@pixielabs.ai>
      
      Differential Revision: https://phab.corp.pixielabs.ai/D10843
      
      GitOrigin-RevId: 5e868e562cc785c754fa239d9595eddf7c6d5e60
      1c25fbde
    • James Bartlett's avatar
      DataStreamBuffer: Add alternative DataStreamBuffer implementation. · 41582918
      James Bartlett authored
      
      Summary:
      Adds alternative DataStreamBuffer implementation, which maintains events in a sorted map, until a call to `Head()` at which point the first contiguous events are merged into a contiguous buffer. This comes at the expense of an extra copy, but makes `RemovePrefix()` and future eviction work much faster, and also has much better memory properties when there are "gaps" in the data.
      
      Note that this diff removes `Get()` as a public API of DataStreamBuffer, and changes all call sites to use `Head()` instead (all call sites were in tests). Also changes Head to be non-const.
      
      Also adds a benchmark for the two DataStreamBufferImpl's.
      
      Using the socket tracer benchmark, and google/benchmark's compare.py tool, the following are the p values for the null hypothesis that the old and the new implementation are the same. These data suggest that the new implementation is statistically significantly faster on all benchmarks:
      ```
      BM_SocketTraceConnector/http1_no_gaps_pvalue                                0.0002          0.0002      U Test, Repetitions: 10 vs 10
      BM_SocketTraceConnector/http1_encode_chunked_no_gaps_pvalue                 0.0002          0.0002      U Test, Repetitions: 10 vs 10
      BM_SocketTraceConnector/mysql_no_gaps_pvalue                                0.0002          0.0002      U Test, Repetitions: 10 vs 10
      BM_SocketTraceConnector/postgres_no_gaps_pvalue                             0.0002          0.0002      U Test, Repetitions: 10 vs 10
      BM_SocketTraceConnector/cql_no_gaps_pvalue                                  0.0002          0.0002      U Test, Repetitions: 10 vs 10
      BM_SocketTraceConnector/nats_no_gaps_pvalue                                 0.0013          0.0013      U Test, Repetitions: 10 vs 10
      BM_SocketTraceConnector/http1_inter_iter_gaps_pvalue                        0.0002          0.0002      U Test, Repetitions: 10 vs 10
      BM_SocketTraceConnector/mysql_inter_iter_gaps_pvalue                        0.0002          0.0002      U Test, Repetitions: 10 vs 10
      BM_SocketTraceConnector/postgres_inter_iter_gaps_pvalue                     0.0002          0.0002      U Test, Repetitions: 10 vs 10
      BM_SocketTraceConnector/nats_inter_iter_gaps_pvalue                         0.0002          0.0002      U Test, Repetitions: 10 vs 10
      BM_SocketTraceConnector/cql_inter_iter_gaps_pvalue                          0.0002          0.0002      U Test, Repetitions: 10 vs 10
      BM_SocketTraceConnector/http1_intra_iter_gaps_pvalue                        0.0002          0.0002      U Test, Repetitions: 10 vs 10
      ```
      The mean on those benchmarks for the new implementation:
      ```
      BM_SocketTraceConnector/http1_no_gaps_mean                 8.90ms    22MB
      BM_SocketTraceConnector/http1_encode_chunked_no_gaps_mean  23.17ms   23MB
      BM_SocketTraceConnector/mysql_no_gaps_mean                 12.02ms   21MB
      BM_SocketTraceConnector/postgres_no_gaps_mean              16.25ms   23MB
      BM_SocketTraceConnector/cql_no_gaps_mean                   8.20ms    20MB
      BM_SocketTraceConnector/nats_no_gaps_mean                  45.20ms   23MB
      BM_SocketTraceConnector/http1_inter_iter_gaps_mean         39.08ms   23MB
      BM_SocketTraceConnector/mysql_inter_iter_gaps_mean         72.62ms   23MB
      BM_SocketTraceConnector/postgres_inter_iter_gaps_mean      99.01ms   25MB
      BM_SocketTraceConnector/nats_inter_iter_gaps_mean          219.77ms  24MB
      BM_SocketTraceConnector/cql_inter_iter_gaps_mean           37.61ms   22MB
      BM_SocketTraceConnector/http1_intra_iter_gaps_mean         36.24ms   64MB
      ```
      and for the old implementation:
      ```
      BM_SocketTraceConnector/http1_no_gaps_mean                 14.91ms   36MB
      BM_SocketTraceConnector/http1_encode_chunked_no_gaps_mean  39.66ms   39MB
      BM_SocketTraceConnector/mysql_no_gaps_mean                 19.47ms   38MB
      BM_SocketTraceConnector/postgres_no_gaps_mean              31.09ms   39MB
      BM_SocketTraceConnector/cql_no_gaps_mean                   19.58ms   36MB
      BM_SocketTraceConnector/nats_no_gaps_mean                  51.89ms   40MB
      BM_SocketTraceConnector/http1_inter_iter_gaps_mean         90.18ms   63MB
      BM_SocketTraceConnector/mysql_inter_iter_gaps_mean         124.34ms  62MB
      BM_SocketTraceConnector/postgres_inter_iter_gaps_mean      160.59ms  64MB
      BM_SocketTraceConnector/nats_inter_iter_gaps_mean          299.13ms  44MB
      BM_SocketTraceConnector/cql_inter_iter_gaps_mean           84.91ms   62MB
      BM_SocketTraceConnector/http1_intra_iter_gaps_mean         312.37ms  527MB
      ```
      
      Particularly of note is the dramatic improvement in memory usage for the `intra_iter_gaps` case from the new to the old.
      
      Test Plan:
      - Tested performance of new implementation in benchmarks, see above.
      - Tested correctness by making the data_stream_buffer_test test both the new and the old implementation.
      - Also tested that a skaffold deploy with the new DataStreamBuffer works on my dev cluster.
      
      Reviewers: #stirling, oazizi
      
      Reviewed By: #stirling, oazizi
      
      Subscribers: oazizi, yzhao
      
      JIRA Issues: PP-3223
      Signed-off-by: default avatarJames Bartlett <jamesbartlett@pixielabs.ai>
      
      Differential Revision: https://phab.corp.pixielabs.ai/D10812
      
      GitOrigin-RevId: a755ff6e7f288dece84193382cb9d9e4e1578ba0
      41582918