You know when grown-ups tell you everything's going to be fine, and you think they're probably lying to make you feel better?
Yes.
Everything's going to be fine.
Wednesday, May 27
Unicode
Glitchr explains Unicode.
Ai Shinozaki explains Unicode.
Posted by: Pixy Misa at
09:47 AM
| Comments (6)
| Add Comment
| Trackbacks (Suck)
Post contains 12 words, total size 1 kb.
Posted by: Wonderduck at Wednesday, May 27 2015 02:56 PM (jGQR+)
2
It says there are 5 comments, but I only see the one from Wonderduck. Maybe Ai Shinozaki's plus-sized UTF's broke Unicode?
Posted by: kurt duncan at Friday, May 29 2015 07:46 AM (QKmzp)
3
To clarify, I only see one... and it is from Wonderduck. Well, now I see two (including my previous). And after I hit [Post] I will see 3. I think.
Posted by: kurt duncan at Friday, May 29 2015 07:47 AM (QKmzp)
4
Yes, the others were spam stuck in the moderation queue. All cleaned up now.
Posted by: Pixy Misa at Friday, May 29 2015 01:45 PM (PiXy!)
5
I only see the sexy gril!
Posted by: yiwu market at Friday, May 29 2015 04:45 PM (I9Zso)
6
Ah, I get it. It would be kind of cool if the Comments counter showed only those approved, or some such. Maybe:
Comments (n of m approved)
Posted by: Kurt Duncan at Saturday, May 30 2015 12:56 AM (c/F3T)
7
Yep, I'll get that fixed up.
I've been working on and off on a new version of Minx which is much easier to work with; the problem has been that it's significantly slower than the old version. Not
slow, as such, but slower. But I recently came up with a way to make it about 300x faster (seriously; it's amazingly quick now), so it's full steam ahead on that project now.
Not only does it have lots of new features, but the speed means I can replace my $200/month physical servers with $40/month cloud servers and still run faster than before.
Posted by: Pixy Misa at Sunday, May 31 2015 01:17 PM (PiXy!)
Hide Comments
| Add Comment
Sunday, May 24
So I Was Wondering
Note to self: Implement auto-save, dammit.
I already knew that LMDB supported multiple values per key. Reading the docs last week, I noticed that values within a key were stored in sorted order. This evening, I was wondering if it were possible to seek to a particular value within a key.
It is.
This is neat. It means you can use LMDB as an engine to implement a two-dimensional database like Cassandra, or a data structure server like Redis, with the elements of lists, sets, and hashes individually addressable.
Plus the advantage that unlike Redis, it can live on disk and have B-tree indexes rather than just a hash table. (Though of course Redis has the advantage of predictable performance - living in memory and accessed directly, it's very consistent.)
The other big advantage of LMDB (for me, anyway) is that it natively supports multiple processes - not just multiple threads, but independent processes - handling transactions and locking automatically. I love Python, but it has what is known as the Global Interpreter Lock - while you can have many threads, only one of them can be executing Python code at any time. The other threads can be handling I/O, or calling C libraries that don't access shared data, but can't actually be running your code at the same time.
That puts a limit on the performance of any single Python application, and breaking out into multiple processes means you need to find a way to share data between those processes, which is a lot more fiddly than it is with threads.
LMDB don't care. Thread, process, all the same, just works.
Neat.
It does have limitations - it's a single-writer/multiple-reader design, so it will only scale so far unless you implement some sort of sharding scheme on top of it. But I've clocked it at 100,000 transactions per second, and a million bulk writes per second, so it's not bad at all.
Admittedly that was with the write safety settings disabled, so server crash could have corrupted my database. But my main use for LMDB is as a smart distributed data structure cache, so if one node dies it can just be flushed and restarted. In practical use, as a robust database, the numbers are somewhat lower (though with a smart RAID controller you should still be able to do pretty well).
It also supports a rather nice hot backup facility, where the backup format is either a working LMDB database ready to go (without needing to restore) or a cdbmake format backup (which is plain text if you're using JSON for keys and values), and it can back up around 1GB per second - if you have the I/O bandwidth - and only about 20% slower if the database is in heavy use at the time.
Posted by: Pixy Misa at
01:08 AM
| No Comments
| Add Comment
| Trackbacks (Suck)
Post contains 472 words, total size 3 kb.
Friday, May 22
A Few Of My Favourite Things
Once I got past the segfaults, anyway. You should be using these things.
Elasticsearch (though their approach to security is
remarkably ass-backwards)
LZ4 (and its friend, LZ4_HC)
Posted by: Pixy Misa at
05:10 PM
| Comments (330)
| Add Comment
| Trackbacks (Suck)
Post contains 65 words, total size 2 kb.
1
I really am over the hill; I don't recognize any of those things.
Posted by: Steven Den Beste at Friday, May 22 2015 05:18 PM (+rSRq)
2
A lot of them are specific to Python, so you wouldn't have run into them. And even within the Python ecosystem, some of them are very specific. (Hoep is a high-performance Markdown parser, but there are a dozen other Markdown parsers just for Python. Hoep is the most efficient of all the ones I tested, and achieves that without sacrificing any features or compatibility.)
Nginx is a very popular front-end webserver/proxy; it's acting as the front-end to mee.nu right now. It's now the second most popular web server after Apache.
Posted by: Pixy Misa at Friday, May 22 2015 10:48 PM (PiXy!)
3
What language is nginx written in?
Posted by: Kurt Duncan at Saturday, May 23 2015 02:05 AM (c/F3T)
4
Bleach is what you use to get your clothes whiter!
Posted by: Wonderduck at Saturday, May 23 2015 03:27 AM (jGQR+)
5
No, silly, Bleach is a major league anime series!
Posted by: Steven Den Beste at Saturday, May 23 2015 03:43 AM (+rSRq)
6
This blog post has been rated
Unacceptable by the Bureau Of Obvious Blatant Service. Please supply sufficient padding to stimulate positive reactions from the audience.
-j
Posted by: J Greely at Saturday, May 23 2015 07:07 AM (fpXGN)
7
Padding?
Ai-chan doesn't use padding! She has no need of such things!
Posted by: Steven Den Beste at Saturday, May 23 2015 07:32 AM (+rSRq)
8
She has padding to spare, lifting spirits and separating us from our daily routine.
-j
Posted by: J Greely at Saturday, May 23 2015 07:54 AM (fpXGN)
9
is nginx a servlet container as well?
Posted by: RickC at Saturday, May 23 2015 11:00 AM (0a7VZ)
Posted by: RickC at Saturday, May 23 2015 11:02 AM (0a7VZ)
11
Hello Dear, are you in fact visiting this website on a regular basis, if so after that
you will absolutely get pleasant know-how.
Posted by: https://vid.me/ at Wednesday, June 10 2015 04:22 AM (ip0W1)
12
TKHuolto on nopea ja ammattitaitoinen tietokoneiden ja oheislaitteiden huoltoliike Hämeenlinnassa.
Posted by: Tietokonehuolto hämeenlinna tietokonehuolto atk huolto tietokoneitten huolto at Friday, June 12 2015 12:52 AM (AZuMO)
13
Hello, this weekend is pleasant designed for me, since this point in time i am reading this great educational article here at my residence.
Posted by: pixel gun 3d hack at Wednesday, June 17 2015 02:51 AM (eOCIl)
14
Greetings! This is my 1st comment here so I just wanted to give a quick shout out and tell you I really enjoy reading through your posts.
Can you suggest any other blogs/websites/forums
that cover the same topics? Many thanks!
Posted by: pirater un compte facebook at Monday, July 20 2015 09:35 PM (j1IUW)
15
Whenever you met with an unexpected fiscal trouble, you can consider any financial alternative that will allow you to out at any pint of time ed sheeran concert you tube one kind
of deferment is named an "economic hardship" deferment.
Posted by: ed sheeran concert you tube at Wednesday, July 22 2015 07:32 PM (cfaHD)
16
I don't know if it's just me or if everybody else encountering issues
with your website. It appears as if some of the written text in your posts are running off the screen. Can somebody else please provide feedback and let me know if this is happening to them as well?
This may be a issue with my web browser because I've
had this happen previously. Thank you
Posted by: anal cumshot at Friday, July 24 2015 11:59 AM (KbTIn)
17
I constantly spent my half an hour to read this blog's posts daily along
with a cup of coffee.
Posted by: Ian Leaf Scam at Thursday, July 30 2015 04:50 AM (8ZljZ)
Hide Comments
| Add Comment
Wednesday, May 13
Some Pig
So, I'm tinkering with what will become Minx 1.2, and testing various stuff, and I'm pretty happy with the performance.
Then I run the numbers, and realise that I'm flooding a 10GbE connection with HTTP requests using a $15 cloud server.
I think we can count that part of the problem space as solved.
Posted by: Pixy Misa at
05:30 PM
| Comments (4)
| Add Comment
| Trackbacks (Suck)
Post contains 56 words, total size 1 kb.
1
Those Moths are getting fat....
Posted by: Mauser at Wednesday, May 13 2015 07:45 PM (TJ7ih)
2
A fat moth is a happy moth!
Posted by: Pixy Misa at Wednesday, May 13 2015 11:24 PM (PiXy!)
3
The finest way yet devised to add padding to a blog post.
-j
Posted by: J Greely at Thursday, May 14 2015 03:03 AM (ZlYZd)
4
I
blame praise Steven's comment on the first post in the series...
Posted by: Mikeski at Thursday, May 14 2015 01:19 PM (aLP9q)
Hide Comments
| Add Comment
Hard Things
There are only two hard things in Computer Science: cache invalidation, naming things, and off-by-one errors.
Posted by: Pixy Misa at
11:27 AM
| Comments (2)
| Add Comment
| Trackbacks (Suck)
Post contains 18 words, total size 1 kb.
1
Nobody expects the Computer Science Inquisition!
Posted by: Steven Den Beste at Wednesday, May 13 2015 11:31 AM (+rSRq)
2
I hesitate to intrude on the CSI, but Brickmuppet is getting Akismetted again over at The Pond...
Posted by: Wonderduck at Thursday, May 14 2015 03:11 PM (jGQR+)
Hide Comments
| Add Comment
Tuesday, May 12
That'll Do
I was getting about 1000 random record reads per second.
I needed to achieve 10,000 reads per second to make things work.
I wanted to reach 100,000 reads per second to make things run nicely.
I'm currently at 1,000,000.*
That'll do.
* Best test run so far was ~1.6 million records per second, with some special-case optimisations.** Without optimisations, around 300k. Per thread.
** Since you asked, the problem was with unpacking large cached records into native objects. A common case in templates is that you only want to access one or two fields in a record - perhaps just the user's name - but unless the record is already a native object you need to load the external representation and parse it to find the field you need. The solution was to keep an immutable version of the of the object in the process, sign it with SHA-256, and sign the matching cache entry. Then, when we need to access the record, we can read the binary data from the cache, compare the signatures, and if they match, we're safe to continue using the existing native structure. If they don't match, we take the payload, decrypt it (if encryption is enabled) check that the decrypted payload matches the signature (if not, something is badly wrong), uncompress the payload (if compression is enabled), parse it (MsgPack or JSON), instantiate a new object, freeze it, and put it back into the native object cache. This can take as long as 20 microseconds.
Posted by: Pixy Misa at
05:53 PM
| Comments (1)
| Add Comment
| Trackbacks (Suck)
Post contains 253 words, total size 2 kb.
69kb generated in CPU 0.0265, elapsed 0.2723 seconds.
55 queries taking 0.2582 seconds, 374 records returned.
Powered by Minx 1.1.6c-pink.