-
Notifications
You must be signed in to change notification settings - Fork 102
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
warm start performance #17
Comments
current benchmark based on ./scripts/performance_test.sh
|
So I managed to statically link the project and got following numbers:
I think that looks very competitive ;) |
What?! 😱 @drexin this is super awesome! |
So to link statically, I first switched to Swift 5.2-dev, because previous versions did not come with all the necessary static libraries. Then we need to install some additional dependencies (these are the Ubuntu package names):
And then we need to modify the file
After all that we should be able to compile with I'm hoping to get these changes upstream soon. Obviously we can't just add all the libraries unconditionally, because it depends on the libraries we actually use. I'll see how the driver decides what's actually necessary. |
@drexin With this list it looks to me that I don't even need to install swift on my target Amazon Linux 2. Is this correct? |
That is correct! |
@fabianfett until we have official AL2 images, would be cool if you could create a 5.2-dev version with this patch, so we can try to build & test the test payload on real lambda. possible? |
@drexin these are amazing results, can't wait to use it |
master is fine, or 5.2 |
use aws?! |
@drexin I tried to compile and test the https://github.com/fabianfett/amazonlinux-swift/blob/run_tests/compile/Dockerfile Sadly I ran into an issue: CMakeError.log Do you know anything about this? Am I doing something wrong? |
@fabianfett - I think that you missed |
@compnerd Sorry for coming back to you but I'm not quite sure if I understand that correctly. I just reran my build with the same result. The checkout ended with Updating '/home/ec2-user/swift'
Tag 'swift-5.2-branch' does not exist for 'swift', just updating regularly
/home/ec2-user/swift
/home/ec2-user/swift
Current branch swift-5.2-branch is up to date.
/home/ec2-user/swift
update-checkout succeeded
cmake : f43a7d76c737c5bb9b903a2b1be5186c081ec21e
cmark : 1168665f6b36be747ffe6b7b90bc54cfc17f42b7
icu : fd123bf023882f07bfacf51c39111be2f946d8f8
indexstore-db : 14e6e25a53ca08946ae0927b6cc2b2bf36c311b9
llbuild : 15cb77c8b3e5ac21cbe47fd6f1f2c891d4b56093
llvm-project : 16b576d445bd278dace043e1f0a6e9b8eda9ddb5
ninja : ed7f67040b370189d989adbd60ff8ea29957231f
sourcekit-lsp : 7d18d3bb3841594f443868bc172bcd8a84d756b9
swift : 33150e32b4f5c5f9ecae234b3c3d8251877de402
swift-corelibs-foundation : 69232d2ef971acf99938569fdd2caa8a16cb7718
swift-corelibs-libdispatch : c992dacf3ca114806e6ac9ffc9113b19255be9fe
swift-corelibs-xctest : 8b0eefa96c02a4cb4d3eb74e6c289eba34a744fa
swift-format : 5e7ef93b6b93381c6805fea57b3ccfb05f718846
swift-integration-tests : 11f0f6e8b34ba9782b5841dbeaa207d0b4620152
swift-stress-tester : 225a973f42140890bb49648ca090d1a53f32ff8e
swift-syntax : 7251727261c6d2fb225245dc20ffded8f8d0f000
swift-tools-support-core : d08234c4cf8046786a3552143532222a56273720
swift-xcode-playground-support : 88043d7d320f92598efb39408c3f4b1903a4fff6
swiftpm : 75916ca4f00c6861d8dc1b03cb5684d6fc4f8f8d which let's me assume that
I'm sure I made a stupid mistake here but could you please point me in the correct direction. |
@drexin can you confirm the right branch for @fabianfett ^^ |
This sounds suspicious. Seems as though swift may have been cloned from the wrong place? |
Okay I could fix the problem. @compnerd thanks for your suggestion. Changing:
to
fixed the problem I had. Since I've been running into test failures again, I moved the error messages back into the open: |
Responded on the forums thread. One of the failures is interesting - the race test. I’d suggest rerun the tests, it may be a flake. |
Statically linking Swift LambdaToday I did some research regarding static linking. If anyone needs my Amazon Linux 2 binary, I'm happy to provide it. After being done with it, I thought maybe I should compile my static linked binary with Ubuntu. I have no idea if that would execute on Amazon Linux 2, though linked libs shouldn't be an issue. Anyway, if you need the Amazon Linux 2 Dockerimage, I used:
What was needed on Amazon Linux 2Needed to install: $ yum -y install glibc-static Linking against Foundation didn't work at all. Missing dependencies? For that reason I used a branch into which I merged #41 #42.
static-executable-argsI changed
Executable size:Unzipped:
Zipped:
PerformanceSwift 5.2, 256mb ram. Code:
Cold startI achieved forced restarts by setting env Warm start |
this issue is to track details re. warm start performance
The text was updated successfully, but these errors were encountered: