4.2. Bid Semantics and Syntax

The format for bids is

[asmith@alicehost ~]# tycoon host bid providinghost1 <duration> <pref1> <pref2> ...

<duration> is the amount of time before the bid expires. This time is expressed as a floating point number of time units followed by a unit letter. The supported units are (s)econds, (m)inutes, (h)ours, (d)ays, (w)eeks, m(o)nths, and (y)ears. A single duration expression may have multiple quantities concatenated together. Note that the exact lengths of months and years vary, depending on when the bid is sent. Month and year durations are computed as offsets from the current time. For example, "1o1y" is the length of the current year + the length of the current month. Use 0 to indicate that the duration should not be changed.

A <preference> for a non-unique resource (e.g., CPU, memory, or disk) is of the form <resource name>:weight,min,max. Note that a preference must not have any spaces in it. The weight is the proportion of the funds in the host account that should be spent on this resource. For example, a weight of 2 for CPU when the sum of the weights is 8 would allocate 1/4 of the funds to bidding on CPU.

The minimum and maximum constraints specify how much of the resource the user wants. These can specified as the fraction of the total capacity or as absolute amounts of the resource. For example, "CPU:2,0.1,0.9" specifies that the minimum desired CPU is 10% and the maximum is 90%. "CPU:2,100MHz,1GHz" specifies that the minimum is 100MHz and the maximum is 1GHz. Users can specify any of the SI prefixes. Thus, 10^3 = k (not K) and 2^10 = Ki

This is an example of a valid bid for 10% to 100% of a CPU with 2 * 10^9 bytes of disk space and 512 * 10^6 bytes of memory over 1 year:

[asmith@alicehost ~]# tycoon host bid providinghost1 1y CPU:1,0.1,1.0 \
disk:1,2GB,2GB memory:1,512MB,512MB

A <preference> for a TCP port has a different form because of its all-or-nothing nature. The form is TCPv4Port,<source_port>:<weight>,<dest_port>. The weight is the same as for non-unique resources. The source port is the port being bid for on the physical machine. For example, as web server would bid for port 80. Since the physical machine requires some ports for itself (notably the ssh port, 22), only a subset of source ports are available. The destination port is the port on the virtual machine that the external port should be directed to. This is an example of bidding for port 80 to be forward to port 80:

[asmith@alicehost ~]# tycoon host bid providinghost1 1y TCPv4Port,80:1,80

The form of an IP address preference is IPv4Address,<ip_address>:<weight>. The ip address is in the typical x.x.x.x form. This is an example of bidding for address 1.2.3.4:

[asmith@alicehost ~]# tycoon host bid providinghost1 1y IPv4Address,1.2.3.4:1