Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

spdmlib use a lot of stack. It may cause stack overflow in small stack environment. #34

Closed
jyao1 opened this issue Aug 5, 2023 · 11 comments · Fixed by #188
Closed

spdmlib use a lot of stack. It may cause stack overflow in small stack environment. #34

jyao1 opened this issue Aug 5, 2023 · 11 comments · Fixed by #188
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation
Milestone

Comments

@jyao1
Copy link
Contributor

jyao1 commented Aug 5, 2023

Some old data:

default config:
requester stack use: 808040 bytes
responder stack use: 818632 bytes

change config: max_session_count = 10
requester stack use: 1580888 bytes
responder stack use: 1591480 bytes

change config: max_session_count = 1
requester stack use: 421640 bytes
responder stack use 447560 bytes

each session costs ~120k bytes

We need re-calculate latest data with hashed-transcript-data.

@jyao1
Copy link
Contributor Author

jyao1 commented Nov 6, 2023

@xiaoyuxlu , can we have latest data at first?

@jyao1 jyao1 added the documentation Improvements or additions to documentation label Nov 6, 2023
@jyao1
Copy link
Contributor Author

jyao1 commented Nov 6, 2023

We also need to add a environment.md to doc dir, to describe the stack/heap usage.

@xiaoyuxlu
Copy link
Contributor

xiaoyuxlu commented Nov 12, 2023

calculate b807532 data with hashed-transcript-data data:

default config session_count = 4:
requester stack use: 774568 bytes
responder stack use: 781608 bytes

change config: max_session_count = 10
requester stack use: 788104bytes
responder stack use: 795144 bytes

change config: max_session_count = 1
requester stack use: 767800 bytes
responder stack use 774840 bytes

each session costs ~2k bytes

calculate latest data without hashed-transcript-data.

default config session_count = 4:
requester stack use: 1100584 bytes
responder stack use: 1107624 bytes

change config: max_session_count = 10
requester stack use: 1639288 bytes
responder stack use 1646360 bytes

change config: max_session_count = 1
requester stack use: 831432 bytes
responder stack use: 838472 bytes

each session costs ~80k bytes

@xiaoyuxlu
Copy link
Contributor

xiaoyuxlu commented Nov 13, 2023

commit e154fab (without idekm/pcidoe) data with hashed-transcript-data data:

default config session_count = 4:
requester stack use: 3100156 bytes
responder stack use: 2100300 bytes

change config: max_session_count = 10
requester stack use: 3140764 bytes
responder stack use: 2140908 bytes

change config: max_session_count = 1
requester stack use: 3079852 bytes
responder stack use 2079996bytes

each session costs ~6k bytes

without hashed-transcript-data.

default config session_count = 4:
requester stack use: 3540076 bytes
responder stack use: 2580964 bytes

change config: max_session_count = 10
requester stack use: 4139444 bytes
responder stack use 3299236 bytes

change config: max_session_count = 1
requester stack use: 3270740 bytes
responder stack use: 2270868 bytes

each session costs ~96k bytes

@jyao1
Copy link
Contributor Author

jyao1 commented Nov 14, 2023

Please provide data based on: Memory = Static + Dynamic * Count

Count could be session, or connection number.

@longlongyang
Copy link
Contributor

applying bench.diff.txt to cb64cb5

without hashed-transcript-data.
default config session_count = 4

using executor
requester stack use: 1971020 bytes
responder stack use: 2344570 bytes

using tokio
requester stack use: 3397500 bytes
responder stack use: 2344570 bytes

@longlongyang
Copy link
Contributor

REF: #154

@longlongyang
Copy link
Contributor

longlongyang commented Nov 21, 2023

Requester only, and NO IDEKM and TDISP included:

DEBUG:
	without hashed-transcript-data:
	tokio + opt-level=0    -> 3,540,076
	tokio + opt-level=3    ->   994,940
	executor + opt-level=0 -> 1,971,020
	executor + opt-level=3 ->   281,388
	no async + opt-level=0 -> 1,100,584


	with hashed-transcript-data:
	tokio + opt-level=3    -> 839,140
	executor + opt-level=3 -> 272,228
	
	lack:
	no async + opt-level=3 + release
	default: opt-level=3 + release

@xiaoyuxlu
Copy link
Contributor

xiaoyuxlu commented Dec 22, 2023

based on: #185
No IDEKM and TDISP included
no async + opt-level =3 + release -> responder: 122074 requester_without idekm: 122026 requester_with_idekm: 480802

@jyao1
Copy link
Contributor Author

jyao1 commented Dec 22, 2023

please consider write a script to collect all those info, and check in.

@xiaoyuxlu
Copy link
Contributor

please consider write a script to collect all those info, and check in.

done. Ref: #188

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants