Tuesday, 29 July 2014

Mavericks Server Deploy Studio Multicasting tests

I read the wiki page on multicasting from the Deploy Studio wiki pages.

When I'm imaging one machine, I'm getting a download rate of 8.5MB/s, and a variable write rate, but it is a compressed image. When I put 5 machines on, I'm getting about 1MB/s download rate, which is too slow for my liking, especially with a 89GB Image file.

The server is a new (2014 - July) mac mini server, 8GB RAM, 2 x SSD 256GB, Mirror RAID. Deploy Studio 1.6.11

Repository is stored on another server, on a different subnet which might cause issues? Shared via CIFS.

The Server is on GigaBit LAN so I'm trying a 10MB/s stream rate to start with.

The computer suite I'm testing on are Mac Mini's from 2011, 4GB RAM, 500GB SATA HD's.

To get the Client Write Disk Speed I put in this command in the terminal:

sudo dd if=/dev/zero of=/tmp/test bs=1024 count=1048576
Password:
1048576+0 records in
1048576+0 records out
1073741824 bytes transferred in 18.062331 secs (59446470 bytes/sec)

This converts to 59MB/s

Test 1

clients: 5
Stream Data Rate: 10MBs
Client Disk Speed: 43MBs

Conclusion: Got about 20 fails on each computer before 2% of a 89GB compressed image.

Realised I didn't scan for restore. At this point I scanned the image for restore using Disk Utility on Server.

Test 2

clients: 2
Stream Data Rate 10MBs
Client Disk Speed: 42MBs

Conclusion: Got about 7 fails on both machines before 2%

Test 3

clients: 16
Stream Data Rate 6MBs
Client Disk Speed: 38MBs

Conclusion: Got 2 fails in the first 2%, but 7 more fails in the next 6%. Interestingly, 7 out of the 16 started doing the recovery partition first, and as it was so quick, got onto the main image after the rest were over 2%. This might explain the packet loss. Getting a consistent 13 fails per 8%. Not sure if this works out at less then 20% or more? Seems to have failed to reimage 3 out of 16, which is good.




For the next test I wanted to see if having the images on the server itself would speed things up. I setup the repository in NetBootSP0 in /Library/Netboot/NetBootSP0


Test 4

Clients: 4
Stream Data Rate 6MBs
Client Disk Speed: 38MBs

Conclusion: 1 machine out of 4 got 20 fails before 2%, but then only got 2 more for the whole restore. Must have been a network spike or something. The others report very little (smallest so far) fails! Yay. Think I'll try and speed it up for next test.

Monday, 7 July 2014

Counting in Base and Prime Numbers

Whilst counting in a bases, it becomes apparent that some numbers are not prime. I.e. Any numbers ending in 2, 5 and 0 whilst counting in base 10.


This is because counting in base is a form of arithmetic.


Let's take base 10. It is divisible by 2 and 5. Hence the non-primes above. But also 4, 6 and 8, multiples of 2 smaller the 10.


Counting in base 3, you can only see numbers ending in 0 as being non-primes.


It appears that there is a correlation between number base systems and prime numbers (or non-prime numbers).


Based on the fact that these base systems seem to be linked, but in a rather limited way. For each number base being used, you can tell only the numbers which the base is divisible by. In this sense, the best base to work in is one which is divisible by many prime numbers.
e.g.
2x3=6
2x3x5=30
...
2x3x5x7x9x11=20790


This doesn’t seem very efficient. But perhaps we can improve things.


But first I want to discuss the point in using base systems. Surely all we need is an equation to work out prime numbers? Yes, but we have yet to find one which works efficiently with computing.


Hence investigating the base system, which is what humans and computers use to work these things out. Humans (mostly) in base 10, and (most) computers in base 2 (binary)


My thoughts were guided onto the idea of a new base system which relied on only prime numbers. The uniqueness of prime numbers is a good starting point. All numbers are either prime or not, and those that aren’t can be represented in terms of prime numbers. So in theory we don’t need to represent these numbers. Here is the initial number system idea, non-primes are represented as their prime factors (but using Base Prime) separated with a comma:


Base 10
Base 2
Base Prime
1
1
1
2
10
2
3
11
3
4
100
2,2
5
101
4
6
110
2,3
7
111
5
8
1000
2,2,2
9
1001
3,3
10
1010
2,4
11
1011
6


In base prime you can write any number down and immediately see if it is prime or not.
e.g.
4 is prime
5  is prime
10 is prime
2,2 is not prime
3,6,8 is not prime
100000000000 is prime!


The only problem (at the moment) is the fact that it is hard to work out what that number is in any ‘normal’ base system. i.e.


1 = 1
2 = 2
3 = 3
2,2 = 4
4 = 5
10000000000000 = ?????


What we need is a way of converting, but not algorithmically but logically, as this is how computers compute!


To do this I propose we must be able to do arithmetic using this new system. Once this can be done, we will be able to convert to other base systems.
e.g.
1+1 = 2
2+1 = 3
2+2 = 2,2
3+1 = 2,2
3+2 = 4
3+3 = 2,3
4+1 = 2,3
4+2 = 5
4+3 = 2,2,2
4+4 = 2,2,2
5+1 = 2,2,2
5+2 = 3,3
5+3 = 2,4
5+4 = 3,3
5+5 = 2,5

Arithmetic is the utilisation of patterns apparent in the number system being used.

One such pattern I've seen is the doubling of prime numbers:
1+1 = 2
2+2 = 2,2
3+3 = 2,3
4+4 = 2,4
5+5 = 2,5
6+6 = 2,6
7+7 = 2,7
8+8 = 2,8

Adding to itself is another way of saying 2x. This could be utilised for arithmetic.

A more obvious pattern is the use of multiplication.
1x1 = 1
2x2 = 2,2
3x2 = 3,2
3x3 = 3,3
4x2 = 4,2
4x3 = 4,3
4x4 = 4,4

2,2x2 = 2,2,2
3,4x4 = 3,4,4

Another question might be how to do arithmetic with non-primes?
2,2+1 = 4
2,3+1 = 5
2,2,2+1 = 3,3

For the moment I can see no pattern, but adding one to a number is very important thing to do! But I think we need to keep looking for patterns.

It appears that adding 1 is a difficult thing to do. I think this is because all other numbers, including primes, are divisible by two numbers, itself and 1, but 1 is only divisible by 1 thing. This makes it one of the uniques numbers, others being 0 and minus numbers. Perhaps it should be represented using another form. It can take the form: x/x where x is another number in the equation. e.g.

2,2 + 1 = 2,2 + (2,2 /2,2)

also, if we choose not to represent 1, we could use this figure to represent the first prime number 210

The same could also apply to 010 , which could be represented as x-x, e.g.

2,2 + 0 = 2,2 + 2,2 - 2,2

I think it's a valid thing to think about.

After playing with the Base Prime system there are some key points/questions I'd like to make:

  • In Base systems, the order you write the numbers is important. It doesn't appear to be important here? Should there be a system for the order in which you write the numbers? Perhaps smallest first?
  • It's hard to know what to do with the squares and cubes? for the time being I prefer to write all the numbers down. e.g. 810=2,2,2. Although it could be 23