What caused that outage
41–50 of 65 posts
Re: What caused that outage
#42Which I believe should be called "lightning", right?
Re: What caused that outage
#43I thought 32-bit addressing gave 4GB of addresses…is there some sort of flag that's taking one bit? Not trying to be a smartass, just curious about the discrepancy.
dynamic languages end up using more memory, because extra information has to be stored about each item (I.e. Type, tc info, etc).
Re: What caused that outage
#44Earlier quoted context omitted.
dynamic languages end up using more memory, because extra information has to be stored about each item (I.e. Type, tc info, etc).
Down-voters, he is also right. It's common for dynamic languages to embed typing information in pointers as an optimization. For example, CLISP uses at least 2 bits to distinguish between common types. That way fixnum numbers can be recognized and added without slow memory accesses. The result is that you get less bits for the address. Hence less addressable memory.
For example, if you have an string type, which keeps track of it's length, then you might need 8 bytes. 4 for the pointer to the string of chars, 4 for the integer to keep count.
Here's a better example from tinyscheme:
struct cell {
unsigned int _flag;
union {
struct {
char *_svalue;
int _length;
} _string;
num _number;
port *_port;
foreign_func _ff;
struct {
struct cell *_car;
struct cell *_cdr;
} _cons;
} _object;
};
As a minimum, each object takes up max(sizeof(_string), sizeof(num), sizeof(port), sizeof(_cons), sizeof(foreign_func)); And num is defined as follows: typedef struct num {
char is_fixnum;
union {
long ivalue;
double rvalue;
} value;
} num;Re: What caused that outage
#45That's what happens when you make something in a new and unproven language. And I think that it deserves tremendous respect that you have done so. You could have hacked HN in python (or lisp?) in a weekend with the knowledge that it would scale, yet you decided to go with Arc. Very bold. And a great way to battletest a new language. It's great to see people eat their own dogfood.
Re: What caused that outage
#46Earlier quoted context omitted.
That's why you use intelligent caching.
For a site this small, there's absolutely no reason the entire database shouldn't be cached in RAM. 32GB of RAM costs about $800. That buys you plenty of time to not have to worry about caching, and instead gives you more time to work on interesting features. For a single-person operation (or even a few people), you have to spend your time wisely.
Re: What caused that outage
#47Why was the site using a 32-bit environment to begin with? Opterons have been cheap for years now, and all new Xeons are capable of 64-bit operation.
In my experience, 64bit isn't a good way to save memory.
Re: What caused that outage
#48Earlier quoted context omitted.
Down-voters, he is also right. It's common for dynamic languages to embed typing information in pointers as an optimization. For example, CLISP uses at least 2 bits to distinguish between common types. That way fixnum numbers can be recognized and added without slow memory accesses. The result is that you get less bits for the address. Hence less addressable memory.
Actually, no. These tag bits are usually stored in the lowest bits which are zero for all pointers (you would be mad not to align your data structurs to the four or eight byte boundaries your hardware uses for memory access). So you get the full width for pointers, but reduced width for your fixnums, because you have to set one of the least significant bits of the machine word to one to distinguish it from a pointer.…
Re: What caused that outage
#49Earlier quoted context omitted.
The OS sometimes reserves quite a chunk. For example, Windows XP really only has 2.25GB available. Putting more RAM in is pretty useless unless you switch to 64-bit.
Can't this be changed, you know, by hacking the registry or something ?!