Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cgosqlite: add more string interns, and optimize #97

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

raggi
Copy link
Member

@raggi raggi commented May 15, 2024

This adds string interning to column names, table names and database names, as well as optimizing the decltype interning code path to use runtime.findnull rather than C.strlen that must cross cgo again.

We don't yet know if this is effective in practice, and should test this before integrating.

This adds string interning to column names, table names and database
names, as well as optimizing the decltype interning code path to use
runtime.findnull rather than C.strlen that must cross cgo again.

We don't yet know if this is effective in practice, and should test this
before integrating.
@raggi
Copy link
Member Author

raggi commented May 15, 2024

Unclear just using storm.

Current code, storm runs:

        User time (seconds): 4758.12
        System time (seconds): 566.26
        Percent of CPU this job got: 4383%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 2:01.45
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 180950476
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 619
        Minor (reclaiming a frame) page faults: 47275173
        Voluntary context switches: 5860952
        Involuntary context switches: 126650
        Swaps: 0
        File system inputs: 0
        File system outputs: 283464
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0
        
        User time (seconds): 5058.74
        System time (seconds): 639.58
        Percent of CPU this job got: 4470%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 2:07.46
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 190345548
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 610
        Minor (reclaiming a frame) page faults: 49975464
        Voluntary context switches: 5827887
        Involuntary context switches: 126963
        Swaps: 0
        File system inputs: 0
        File system outputs: 316336
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0

New code:

        User time (seconds): 4948.85
        System time (seconds): 598.59
        Percent of CPU this job got: 4504%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 2:03.14
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 183879896
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 609
        Minor (reclaiming a frame) page faults: 48070053
        Voluntary context switches: 5578223
        Involuntary context switches: 134820
        Swaps: 0
        File system inputs: 0
        File system outputs: 314456
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0
        
        User time (seconds): 4746.86
        System time (seconds): 751.61
        Percent of CPU this job got: 4382%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 2:05.46
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 195039308
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 573
        Minor (reclaiming a frame) page faults: 51457263
        Voluntary context switches: 6213125
        Involuntary context switches: 128425
        Swaps: 0
        File system inputs: 0
        File system outputs: 303904
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant