Skip to content

Commit

Permalink
fix: parallelize feature is moved to source block (#2536)
Browse files Browse the repository at this point in the history
The new PR we saw improved way of ingestion
+--------------------------------------------------------+------------+-------------------+
| Configuration                                          | %Cpu(s) us | Average rate (msg/sec) |
+--------------------------------------------------------+------------+-------------------+
| SC4S main parallelize off  --active-connections=1      |      9.0   |         14144.10  |
| SC4S main parallelize off  --active-connections=10     |     59.3   |         73743.32  |
| SC4S old parallelize on (10 threads)  --active-connections=1 |     11.8   |         17184.52  |
| SC4S pr-2536 parallelize on (10 threads)  --active-connections=1 |     58.4   |         77842.18  |
+--------------------------------------------------------+------------+-------------------+
  • Loading branch information
rjha-splunk authored Jul 24, 2024
1 parent 1f651ae commit 16fb3a5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@

log{
{%- if enable_parallelize == True %}
parallelize(partitions({{ parallelize_no_partitions }}));
{%- endif %}
{%- if mode == "SELECT" %}
parser {
app-parser(topic(sc4s-lp-dest-select-{{ destination }}));
Expand Down
2 changes: 0 additions & 2 deletions package/etc/conf.d/log_paths/2/lp_dest_alts_global/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,5 @@ def normalize_env_variable_input(env_variable: str):
mode=m["mode"],
filter=m["filter"],
dtype=m["dtype"],
enable_parallelize=normalize_env_variable_input(f"SC4S_ENABLE_PARALLELIZE"),
parallelize_no_partitions=int(os.getenv(f"SC4S_PARALLELIZE_NO_PARTITION", 4)),
)
print(msg)
4 changes: 3 additions & 1 deletion package/etc/conf.d/sources/source_syslog/plugin.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ source s_{{ port_id }} {
{%- endif %}
{%- endfor %}
};

{%- if enable_parallelize == True %}
parallelize(partitions({{ parallelize_no_partitions }}));
{%- endif %}
{%- if vendor and product %}
parser {
p_set_netsource_fields(
Expand Down
2 changes: 2 additions & 0 deletions package/etc/conf.d/sources/source_syslog/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,5 +131,7 @@ def normalize_env_variable_input(env_variable: str):
"HIGH:!aNULL:!eNULL:!kECDH:!aDH:!RC4:!3DES:!CAMELLIA:!MD5:!PSK:!SRP:!KRB5:@STRENGTH",
),
ebpf_no_sockets=int(os.getenv("SC4S_EBPF_NO_SOCKETS", 4)),
enable_parallelize=normalize_env_variable_input(f"SC4S_ENABLE_PARALLELIZE"),
parallelize_no_partitions=int(os.getenv(f"SC4S_PARALLELIZE_NO_PARTITION", 4)),
)
print(outputText)

0 comments on commit 16fb3a5

Please sign in to comment.