Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed issue with with vm's that have more then 50% ram.

  • Loading branch information...
commit 42c5b618ac97cc9cfb2b3aa56571d11ec3cf5849 1 parent 68a01da
@Licenser Licenser authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 apps/chunter/src/chunter_spec.erl
View
5 apps/chunter/src/chunter_spec.erl
@@ -113,10 +113,11 @@ generate_spec(Package, Dataset, OwnerData) ->
_ ->
0
end,
+ RamShare = round(1024*RamPerc),
Base0 = jsxd:thread([{select, [<<"uuid">>, <<"alias">>]},
{set, <<"resolvers">>, [<<"8.8.8.8">>, <<"8.8.4.4">>]},
- {set, <<"cpu_shares">>, jsxd:get(<<"cpu_shares">>, round((1024*RamPerc)), Package)},
- {set, <<"zfs_io_priority">>, jsxd:get(<<"zfs_io_priority">>, round((2048*RamPerc)), Package)},
+ {set, <<"cpu_shares">>, jsxd:get(<<"cpu_shares">>, RamShare, Package)},
+ {set, <<"zfs_io_priority">>, jsxd:get(<<"zfs_io_priority">>, RamShare, Package)},
{set, [<<"internal_metadata">>, <<"package">>],
jsxd:get(<<"uuid">>, <<"-">>, Package)},
{set, <<"cpu_cap">>, jsxd:get([<<"cpu_cap">>], 100, Package)},
Please sign in to comment.
Something went wrong with that request. Please try again.