IxSet could be adapted to use CompactMap. That would eliminate the GC
overhead and give you the same compact binary format as with
checkpoints.
--
Cheers,
Lemmih
* I haven't had time to test a haskell system yet. I'm still busy
integrating hackage packgaes into nix. I will be done soon.
Anyway I was wondering for a long while: Should haskell be used for some
apps because it's easy to write multithreading apps? I mean if you write
it in C you don't even need multithreading (unless you have many
cores which can make a difference then) because C probably is 4 times
faster in typical cases.
And if you have about 1000 users and maybe 100 visitors a day you should
not need to buy a dedicated server for that task.
I mean compare this to a typicall PHP + MySQL application. It can serve
1000 users as well.
Anyway I keep watching this project with joy.
Marc Weber
Often, it isn't the easier multithreading that makes using Haskell
attractive but the type and memory safety it affords you over C.
That said...
Yes! I think Haskell should be used in part due to it's easy
threading - which is one reason I built Control-Engine. You can
always perform FFI to C for those performance critical parts and still
use the Haskell RTS to manage the threading. In some cases it isn't
so much a language issue as an algorithm issue - algorithms that scale
are frequently half or a quarter the speed of their sequential
equivalents so this current age with two and four core processors
isn't so friendly to those solutions - perhaps once we have 64 cores
in our laptops (Tilera anyone?) such solutions will finally give real
world benefit.
TomMD
That seems like a fruitful path. In general you should aim for GC to be
< 10% of your app.
You can also experiment with the compacting collector, and having larger
old generations.
-- Don
He was referring to the memory overhead.
--
Cheers,
Lemmih
Fire up the compacting GC then.
-c Enable compaction for all major collections
-G<n> Number of generations (default: 2)
-T<n> Number of steps in younger generations (default: 2)
-c<n> Auto-enable compaction of the oldest generation when live data is
at least <n>% of the maximum heap size set with -M (default: 30%)
-w Use mark-region for the oldest generation (experimental)
-I<sec> Perform full GC after <sec> idle time (default: 0.3, 0 == off)
Would be interesting to see results.
I didn't see anything quite that cheap from OVH. The cheapest I saw
was 35 pounds / month which currently equals about $57 / month. (More
elaboration in my response below.)
On Sat, Aug 15, 2009 at 10:39 AM, Matthew Elder<ma...@mattelder.org> wrote:
>
> I too was going to recommend switching to a physical host at some
> point, it is much more cost effective than a vps.
>
> I think you can get a 2gb server for around 99 bucks / month (USD)
>
> specs for the server from 1and1.com:
>
> * Opteron 1216
> * 2 x 2.4GHz
> * 2 GB RAM
> * 2 x 250GB Software-RAID
>
>
> You can use raid 1 for redundancy in the case of disk failure.
Right now I'm paying $50 / month (USD) with 900 MB RAM. So they are
not much cheaper in terms of dollars / MB, but it's a significantly
higher absolute cost (and probably not as easy to upgrade).
My main point in all this is that a LAMP site with my traffic could
easily run on < $10 / month shared hosting. So my costs are already
5x higher than they should be. In short, it seems like an all
in-memory solution may not be cost-effective for some types of small
start-up.
That said, some of the other responses had promising ideas, and I
already got an improvement with the compacting garbage collector. I'm
definitely not giving up hope. I just think we should investigate
this issue more closely.
It would help a lot if we could see the code.
--
Cheers,
Lemmih
I adapted created a Happstack.Data.Compact.IxSet and modified it to
use CompactMap. It looks like the only thing needed to be able to use
it is the splitLookup function for CompactMap. I looked at the
CompactMap code, but it looks like it will take me a significant
amount of studying before I can implement it.