Log in

No account? Create an account
"threads r hard. let's go shopping!" - brad's life [entries|archive|friends|userinfo]
Brad Fitzpatrick

[ website | bradfitz.com ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

"threads r hard. let's go shopping!" [Mar. 1st, 2008|03:45 am]
Brad Fitzpatrick
[Tags|, ]

iTunes struggles ripping a CD, syncing an iPod, and importing a few dozen songs into the library all at the same time.

CPU? Nope, not pegged.
Network? Gigabit, not saturated.
Disk activity on the server? Barely any.

Conclusion: threads r hard.

yay spinny beachballs!

Computers suck.

[User Picture]From: theducks
2008-03-01 12:08 pm (UTC)
So if you want maximum love and compatibility, you will use MacOS clients in an enterprise environment with MacOS X Server, and use Appleshare to access files, using Apple File Protocol (AFP).

Which runs as two threads. For all the clients a XServe may handle, there are just two threads, of which only one actually does IO. Let's say you have a lot of files in a directory, like, say, Mail.app's Mail folder. Opening one of those STOPS IO for everyone else while it's traversing it.

God I hate my job sometimes..
(Reply) (Thread)
[User Picture]From: krow
2008-03-01 02:04 pm (UTC)
Most considered memory allocation hard. That is how we ended up with perl, python, and Java.

Threads? Welcome to the concept of map/reduce. Now we just need a language to wrap it in.
(Reply) (Thread)
From: jzawodn
2008-03-01 03:37 pm (UTC)

Language? Nah.

(Reply) (Parent) (Thread)
[User Picture]From: krow
2008-03-01 03:58 pm (UTC)

Re: Language? Nah.

I hate managing Java frameworks :(

This though doesn't solve the problem that I just bought a bunch of 8 way machines and I need to scale a process...

fork() is a crummy answer BTW.
(Reply) (Parent) (Thread)
[User Picture]From: jameth
2008-03-01 03:19 pm (UTC)
i blame your rick astley collection
(Reply) (Thread)
[User Picture]From: dossy
2008-03-01 03:53 pm (UTC)
Every time I talk about AOLserver employing both threads and event loops, and I get "you never need threads" in response, my knee jerk reaction has become to respond with "you mean you're just too stupid to use threads properly."

Yeah. "Threads are hard!" This is why it's critical to hire smart people.
(Reply) (Thread)
[User Picture]From: robflynn
2008-03-01 04:36 pm (UTC)
iTunes has always been annoyingly slow for me. I'd be afraid to try all of those things at once :P
(Reply) (Thread)
[User Picture]From: endquote
2008-03-01 11:49 pm (UTC)
I once dared to sync three iPods at one time and it actually worked just fine. I was pretty impressed.
(Reply) (Thread)