-
Notifications
You must be signed in to change notification settings - Fork 802
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
Configure FSI to use gcServer #5502
Comments
For context adding illustration of GC consequences when transforming a 30 gigabyte file on disk into an array of records, showing the ~linear speedup on an 18 core cpu.
let getRecords samplePeriod =
sasFile.Observations // SAS file loaded via type provider
|> Seq.toArray
|> Array.Parallel.choose(fun obs ->
match inSamplePeriod samplePeriod obs with
| true -> Some (parseSas obs) // converts SAS file row to record type
| false -> None)
GC.Collect()
// Timings based on running below line
let x = getRecords samplePeriod |
I'm going over open FSI issues. So the conclusion here was that we decided not to take the change in #5381, and we are using this issue to track the work that is necessary? Also, is the situation here the same with .NET Core? |
Yeah this one's for @KevinRansom to think a little more about |
I'm not sure what the situation is with gcServer and DotNETCore it's going to require some research. |
Thanks for checking in on this. It is still an issue in .NET Core and it has an enormous impact on PSeq and Array.Parallel data processing performance.
|
Here's a reproducible example using dotnet fsi from ionide, Microsoft (R) F# Interactive version 11.0.0.0 for F# 5.0. #time
let x =
[| 1.0 .. 10_000_000.0 |]
|> Array.groupBy(fun x -> x % 100.0)
System.GC.Collect()
// Timings are based on running this code below only
for i = 1 to 10 do
x
|> Array.Parallel.map(fun (_, xs) ->
xs
|> Array.map string
|> Array.map float
|> Array.sum)
// .NET Core GcServer: Real: 00:00:00.998, CPU: 00:00:49.921, GC gen0: 1, gen1: 1, gen2: 1
// .NET Core GcWorkstation: Real: 00:00:20.170, CPU: 00:02:42.296, GC gen0: 773, gen1: 273, gen2: 7 |
I think we do that now:
|
Inspired by #5381
In some situations gcServer may result in much more throughput for large sets of data being executed in FSI. This should be configurable in settings independently of an IDE, but should also have an option in VS.
The text was updated successfully, but these errors were encountered: