Feature #112
Price comparison page
Status: | New | Start: | 2013-11-04 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assigned to: | - | % Done: | 0% |
|
Category: | - | |||
Target version: | - | |||
Votes: | 0 |
Description
It would be nice if the panel said "This year you've used 15GB of your 30GB disk space and mostly use 500MB of your 1GB RAM - you may be better off downgrading to tariff X to save money" or "From our analysis of your usage, you're on the right tariff".
History
Updated by admin over 11 years ago
It is difficult to tell how much of a VPS's RAM or disk is actually used.
Some thoughts off the top of my head.
As far as RAM goes, there is no visibility from outside as to what the allocated memory is used for. Even from inside, it can be difficult sometimes to work it out as "unused" RAM will generally be used by Linux aggressively for disk cache. The first indication that there is too little RAM will often be performance problems, but how to know when there is too much RAM?
A good question would be, "how would you tell if a physical server has too much RAM?" It is not a question that often gets asked, and how to answer it is not immediately obvious. "Keep removing RAM until it doesn't work for its intended purpose any more" is a surprisingly valid approach. That clearly does not lend itself to non-intrusive helping hand methods.
As for disk, well okay as an example here's a 10 gigabyte block device that belongs to a VPS. What's on it? If it's 4 gig of 1s and 0s and then 6G in a row of 0s? Probably the last 6G is unused then. What if it's all 1s and 0s? Probably all in use then. That might be the best we can do. Seeking through an entire block device is quite resource intensive though.
Again, "If someone gave you an image file of 10GiB, how would you go about determining how much of it is in use?" is a useful question - can you think of a way that is both cheap and accurate?
The typical disk setup for a BitFolk customer is two block devices that are partitioned as disks, each with a single partition spanning the whole disk. The first disk is an ext3 filesystem used as root, the second disk is a swap partition.
The hypothetical "you have unused space" situation would be the ext3 filesystem isn't full. How to find out without seeking across the whole disk?
Assuming you were sure that this image file does represent a partitioned disk where the first partition is an ext3 filesystem, then it could actually be loopback-mounted read only and examined. Without considering how possible it is to be that sure, enough of the time, some other problems come to mind:- Customers may not like the idea of something periodically mounting their filesystem (even though they may never actually find out unless told)
- It would have to be done in a sacrificial sandbox because a customer-supplied filesystem is not trustworthy; you can crash the kernel of the thing trying to mount it
Any other ideas?
Maybe for disk you did not mean to keep track of how much of the allocated disk is being used, but perhaps you meant to highlight the situation where, say, a customer is allowed 20GiB of disk but they actually only have 10GiB of it allocated to block devices or backup? That would be easy to remind about, but it's a quite unusual situation for a customer to be in.
A much more common situation is when they've asked for disk space to be dedicated to backups but have never used anywhere near the amount. If the discrepancy was more than 5GiB then it could be worth letting the customer know that they could have that space removed to save money.
You did not mention anything about unused data transfer quota. Was this because you consider it already easy to see how much is being used and spot when you are paying for too much, or did you not think of that one? I know there are a few people paying for data transfer commit that they have never come anywhere near to using, but I haven't manually reminded anyone as it has always seemed a bit of an imposition. An automated note may be in order.