Comments (8)
It looks like you do this using the flyctl scale vm
command - but the docs at https://fly.io/docs/flyctl/scale-vm/ are missing some details.
Filed a documentation bug with Fly about that here: superfly/flyctl#83
from datasette-publish-fly.
I can get the list of available sizes like so:
~ $ flyctl platform vm-sizes
NAME CPU CORES MEMORY PRICE (SECOND) PRICE (MONTH)
micro-1x 0.12 128 MB $0.000001 $2.670000
micro-2x 0.25 512 MB $0.000003 $8.000000
cpu1mem1 1 1 GB $0.000013 $35.000000
cpu2mem2 2 2 GB $0.000027 $70.000000
cpu4mem4 4 4 GB $0.000053 $140.000000
cpu8mem8 8 8 GB $0.000107 $280.000000
Displaying the price to users feels useful here.
from datasette-publish-fly.
flyctl platform vm-sizes --json
[
{
"Name": "micro-1x",
"CPUCores": 0.125,
"MemoryGB": 0.125,
"MemoryMB": 128,
"PriceMonth": 2.67,
"PriceSecond": 0.000001015
},
{
"Name": "micro-2x",
"CPUCores": 0.25,
"MemoryGB": 0.5,
"MemoryMB": 512,
"PriceMonth": 8,
"PriceSecond": 0.000003044
},
{
"Name": "cpu1mem1",
"CPUCores": 1,
"MemoryGB": 1,
"MemoryMB": 1024,
"PriceMonth": 35,
"PriceSecond": 0.000013318
},
{
"Name": "cpu2mem2",
"CPUCores": 2,
"MemoryGB": 2,
"MemoryMB": 2048,
"PriceMonth": 70,
"PriceSecond": 0.000026636
},
{
"Name": "cpu4mem4",
"CPUCores": 4,
"MemoryGB": 4,
"MemoryMB": 4096,
"PriceMonth": 140,
"PriceSecond": 0.000053272
},
{
"Name": "cpu8mem8",
"CPUCores": 8,
"MemoryGB": 8,
"MemoryMB": 8192,
"PriceMonth": 280,
"PriceSecond": 0.000106544
}
]
from datasette-publish-fly.
That's disappointing: I tried this command again today and it doesn't return accurate pricing information any more:
~ % flyctl platform vm-sizes --json
[
{
"Name": "shared-cpu-1x",
"CPUCores": 1,
"MemoryGB": 0,
"MemoryMB": 256,
"PriceMonth": 0,
"PriceSecond": 0
},
{
"Name": "dedicated-cpu-1x",
"CPUCores": 1,
"MemoryGB": 0,
"MemoryMB": 2048,
"PriceMonth": 0,
"PriceSecond": 0
},
...
from datasette-publish-fly.
Filed that as a bug: superfly/flyctl#339
from datasette-publish-fly.
Today the command returns this:
[
{
"Name": "shared-cpu-1x",
"CPUCores": 1,
"MemoryGB": 0.25,
"MemoryMB": 256,
"PriceMonth": 1.94,
"PriceSecond": 7.5e-7,
"MemoryIncrementsMB": [
256,
1024,
2048
]
},
{
"Name": "dedicated-cpu-1x",
"CPUCores": 1,
"MemoryGB": 2,
"MemoryMB": 2048,
"PriceMonth": 31,
"PriceSecond": 0.00001196,
"MemoryIncrementsMB": [
2048,
4096,
8192
]
},
{
"Name": "dedicated-cpu-2x",
"CPUCores": 2,
"MemoryGB": 4,
"MemoryMB": 4096,
"PriceMonth": 62,
"PriceSecond": 0.00002392,
"MemoryIncrementsMB": [
4096,
8192,
16384
]
},
{
"Name": "dedicated-cpu-4x",
"CPUCores": 4,
"MemoryGB": 8,
"MemoryMB": 8192,
"PriceMonth": 124,
"PriceSecond": 0.00004784,
"MemoryIncrementsMB": [
8192,
16384,
32768
]
},
{
"Name": "dedicated-cpu-8x",
"CPUCores": 8,
"MemoryGB": 16,
"MemoryMB": 16384,
"PriceMonth": 248,
"PriceSecond": 0.00009568,
"MemoryIncrementsMB": [
16384,
32768,
65536
]
}
]
from datasette-publish-fly.
The command for this is:
flyctl scale vm dedicated-cpu-1x
You can pass an optional --memory
option:
flyctl scale vm dedicated-cpu-1x --memory=2048
The docs are at https://fly.io/docs/flyctl/scale-vm/
Valid memory values aren't completely clear. Documentation says:
For dedicated vms, this should be a multiple of 1024MB.
For shared vms, this can be 256MB or a a multiple of 1024MB.
But... the output of flyctl platform vm-sizes --json
includes a MemoryIncrementsMB
key which looks like this for the largest instance:
{
"Name": "dedicated-cpu-8x",
"CPUCores": 8,
"MemoryGB": 16,
"MemoryMB": 16384,
"PriceMonth": 248,
"PriceSecond": 0.00009568,
"MemoryIncrementsMB": [
16384,
32768,
65536
]
}
Are those three values the only valid options for --memory
?
from datasette-publish-fly.
Posted a question about this here: superfly/flyctl#478
from datasette-publish-fly.
Related Issues (20)
- Support Fly volumes HOT 12
- Research how to deploy with latest flyctl and with a volume HOT 22
- `--generate-dir` option HOT 4
- `--plugin-secret` should use Fly secrets HOT 3
- Add output of `datasette publish fly --help` to the README HOT 1
- Also test against Python 3.10
- `*.db` database being created HOT 9
- `--generate-dir` works confusingly HOT 3
- Large sqlite db, 10min threshold guess HOT 1
- Return code not non-zero on errors HOT 2
- Deployment fails with "incompatible types: TOML value has type string; destination has type integer"
- Error org slug must be specified when not running interactively HOT 1
- Support configuration directory mode HOT 1
- Allow loading SQLite extensions
- --setting option HOT 1
- `--setting force_https_urls 1` fails due to missing imports HOT 3
- App published to fly.io with volume is losing data after `fly apps restart`
- Parameter --plugin-secret is not working HOT 3
- Document usage with datasette-scale-to-zero HOT 2
- Allow setting `force_https = true` in `fly.toml` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datasette-publish-fly.